44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
import { login } from "./helpers";
|
|
|
|
describe("Competence", () => {
|
|
beforeEach(() => {
|
|
cy.manageCommand("cypress_reset");
|
|
|
|
login("admin", "test");
|
|
|
|
// test-lehrgang-lp-circle-reisen-lu-reisen ist eine Selbstevaluation
|
|
// mit mehreren Schritten
|
|
cy.visit("/course/test-lehrgang/learn/reisen");
|
|
});
|
|
|
|
it("self evaluation should be neutral", () => {
|
|
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]')
|
|
.find('[data-cy="unknown"]')
|
|
.should("exist");
|
|
});
|
|
|
|
it("should be able to make a happy self evaluation", () => {
|
|
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]').click();
|
|
cy.makeSelfEvaluation([true, true]);
|
|
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]')
|
|
.find('[data-cy="success"]')
|
|
.should("exist");
|
|
});
|
|
|
|
it("should be able to make a fail self evaluation", () => {
|
|
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]').click();
|
|
cy.makeSelfEvaluation([false, false]);
|
|
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]')
|
|
.find('[data-cy="fail"]')
|
|
.should("exist");
|
|
});
|
|
|
|
it("should be able to make a mixed self evaluation", () => {
|
|
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]').click();
|
|
cy.makeSelfEvaluation([false, true]);
|
|
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]')
|
|
.find('[data-cy="fail"]')
|
|
.should("exist");
|
|
});
|
|
});
|