parent
c696e1f483
commit
844cc881ca
|
|
@ -9,71 +9,71 @@ describe("circle.cy.js", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("can open circle page", () => {
|
it("can open circle page", () => {
|
||||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("can toggle learning content", () => {
|
it("can toggle learning content", () => {
|
||||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox\"]"
|
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||||
).should("have.class", "cy-unchecked");
|
).should("have.class", "cy-unchecked");
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox\"]"
|
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||||
).click();
|
).click();
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox\"]"
|
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||||
).should("have.class", "cy-checked");
|
).should("have.class", "cy-checked");
|
||||||
|
|
||||||
// completion data should still be there after reload
|
// completion data should still be there after reload
|
||||||
cy.reload();
|
cy.reload();
|
||||||
cy.get(
|
cy.get(
|
||||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox\"]"
|
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||||
).should("have.class", "cy-checked");
|
).should("have.class", "cy-checked");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("can open learning contents and complete them by continuing", () => {
|
it("can open learning contents and complete them by continuing", () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick\"]"
|
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick"]'
|
||||||
).click();
|
).click();
|
||||||
cy.get("[data-cy=\"lc-title\"]").should(
|
cy.get('[data-cy="lc-title"]').should(
|
||||||
"contain",
|
"contain",
|
||||||
"Verschaffe dir einen Überblick"
|
"Verschaffe dir einen Überblick"
|
||||||
);
|
);
|
||||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||||
|
|
||||||
cy.get("[data-cy=\"ls-continue-button\"]").click({ force: true });
|
cy.get('[data-cy="ls-continue-button"]').click();
|
||||||
cy.get("[data-cy=\"lc-title\"]").should(
|
cy.get('[data-cy="lc-title"]').should(
|
||||||
"contain",
|
"contain",
|
||||||
"Handlungsfeld «Fahrzeug»"
|
"Handlungsfeld «Fahrzeug»"
|
||||||
);
|
);
|
||||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick-checkbox\"]"
|
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick-checkbox"]'
|
||||||
).should("have.class", "cy-checked");
|
).should("have.class", "cy-checked");
|
||||||
cy.get(
|
cy.get(
|
||||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox\"]"
|
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||||
).should("have.class", "cy-checked");
|
).should("have.class", "cy-checked");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("continue button works", () => {
|
it("continue button works", () => {
|
||||||
cy.get("[data-cy=\"ls-continue-button\"]").should("contain", "Los geht's");
|
cy.get('[data-cy="ls-continue-button"]').should("contain", "Los geht's");
|
||||||
cy.get("[data-cy=\"ls-continue-button\"]").click();
|
cy.get('[data-cy="ls-continue-button"]').click();
|
||||||
|
|
||||||
cy.get("[data-cy=\"lc-title\"]").should(
|
cy.get('[data-cy="lc-title"]').should(
|
||||||
"contain",
|
"contain",
|
||||||
"Verschaffe dir einen Überblick"
|
"Verschaffe dir einen Überblick"
|
||||||
);
|
);
|
||||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||||
|
|
||||||
cy.get("[data-cy=\"ls-continue-button\"]").should("contain", "Weiter geht's");
|
cy.get('[data-cy="ls-continue-button"]').should("contain", "Weiter geht's");
|
||||||
cy.get("[data-cy=\"ls-continue-button\"]").click();
|
cy.get('[data-cy="ls-continue-button"]').click();
|
||||||
cy.get("[data-cy=\"lc-title\"]").should(
|
cy.get('[data-cy="lc-title"]').should(
|
||||||
"contain",
|
"contain",
|
||||||
"Handlungsfeld «Fahrzeug»"
|
"Handlungsfeld «Fahrzeug»"
|
||||||
);
|
);
|
||||||
|
|
@ -81,43 +81,43 @@ describe("circle.cy.js", () => {
|
||||||
|
|
||||||
it("can open learning content by url", () => {
|
it("can open learning content by url", () => {
|
||||||
cy.visit("/course/test-lehrgang/learn/fahrzeug/handlungsfeld-fahrzeug");
|
cy.visit("/course/test-lehrgang/learn/fahrzeug/handlungsfeld-fahrzeug");
|
||||||
cy.get("[data-cy=\"lc-title\"]").should(
|
cy.get('[data-cy="lc-title"]').should(
|
||||||
"contain",
|
"contain",
|
||||||
"Handlungsfeld «Fahrzeug»"
|
"Handlungsfeld «Fahrzeug»"
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.get("[data-cy=\"close-learning-content\"]").click();
|
cy.get('[data-cy="close-learning-content"]').click();
|
||||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("checks number of sequences and contents", () => {
|
it("checks number of sequences and contents", () => {
|
||||||
cy.get("[data-cy=\"lp-learning-sequence\"]").should("have.length", 3);
|
cy.get('[data-cy="lp-learning-sequence"]').should("have.length", 3);
|
||||||
cy.get("[data-cy=\"lp-learning-sequence\"]")
|
cy.get('[data-cy="lp-learning-sequence"]')
|
||||||
.first()
|
.first()
|
||||||
.should("contain", "Vorbereitung");
|
.should("contain", "Vorbereitung");
|
||||||
cy.get("[data-cy=\"lp-learning-sequence\"]")
|
cy.get('[data-cy="lp-learning-sequence"]')
|
||||||
.eq(1)
|
.eq(1)
|
||||||
.should("contain", "Training");
|
.should("contain", "Training");
|
||||||
cy.get("[data-cy=\"lp-learning-sequence\"]")
|
cy.get('[data-cy="lp-learning-sequence"]')
|
||||||
.last()
|
.last()
|
||||||
.should("contain", "Transfer");
|
.should("contain", "Transfer");
|
||||||
|
|
||||||
cy.get("[data-cy=\"lp-learning-content\"]").should("have.length", 10);
|
cy.get('[data-cy="lp-learning-content"]').should("have.length", 10);
|
||||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
cy.get('[data-cy="lp-learning-content"]')
|
||||||
.first()
|
.first()
|
||||||
.should("contain", "Verschaffe dir einen Überblick");
|
.should("contain", "Verschaffe dir einen Überblick");
|
||||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
cy.get('[data-cy="lp-learning-content"]')
|
||||||
.eq(4)
|
.eq(4)
|
||||||
.should("contain", "Präsenzkurs Fahrzeug");
|
.should("contain", "Präsenzkurs Fahrzeug");
|
||||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
cy.get('[data-cy="lp-learning-content"]')
|
||||||
.eq(7)
|
.eq(7)
|
||||||
.should("contain", "Reflexion");
|
.should("contain", "Reflexion");
|
||||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
cy.get('[data-cy="lp-learning-content"]')
|
||||||
.last()
|
.last()
|
||||||
.should("contain", "Feedback");
|
.should("contain", "Feedback");
|
||||||
|
|
||||||
cy.visit("/course/test-lehrgang/learn/reisen");
|
cy.visit("/course/test-lehrgang/learn/reisen");
|
||||||
cy.get("[data-cy=\"lp-learning-sequence\"]").should("have.length", 3);
|
cy.get('[data-cy="lp-learning-sequence"]').should("have.length", 3);
|
||||||
cy.get("[data-cy=\"lp-learning-content\"]").should("have.length", 9);
|
cy.get('[data-cy="lp-learning-content"]').should("have.length", 9);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue