55 lines
1.5 KiB
JavaScript
55 lines
1.5 KiB
JavaScript
import { login } from "./helpers";
|
|
|
|
describe("Competence", () => {
|
|
beforeEach(() => {
|
|
cy.manageCommand("cypress_reset");
|
|
|
|
login("admin", "test");
|
|
cy.visit("/course/versicherungsvermittler-in/learn/fahrzeug");
|
|
});
|
|
|
|
it("self evaluation should be neutral", () => {
|
|
cy.get(
|
|
'[data-cy="versicherungsvermittler-in-lp-circle-fahrzeug-lu-fahrzeug-1"]'
|
|
)
|
|
.find('[data-cy="unknown"]')
|
|
.should("exist");
|
|
});
|
|
|
|
it("should be able to make a happy self evaluation", () => {
|
|
cy.get(
|
|
'[data-cy="versicherungsvermittler-in-lp-circle-fahrzeug-lu-fahrzeug-1"]'
|
|
).click();
|
|
cy.makeSelfEvaluation([true]);
|
|
cy.get(
|
|
'[data-cy="versicherungsvermittler-in-lp-circle-fahrzeug-lu-fahrzeug-1"]'
|
|
)
|
|
.find('[data-cy="success"]')
|
|
.should("exist");
|
|
});
|
|
|
|
it("should be able to make a fail self evaluation", () => {
|
|
cy.get(
|
|
'[data-cy="versicherungsvermittler-in-lp-circle-fahrzeug-lu-fahrzeug-1"]'
|
|
).click();
|
|
cy.makeSelfEvaluation([false]);
|
|
cy.get(
|
|
'[data-cy="versicherungsvermittler-in-lp-circle-fahrzeug-lu-fahrzeug-1"]'
|
|
)
|
|
.find('[data-cy="fail"]')
|
|
.should("exist");
|
|
});
|
|
|
|
it.skip("should be able to make a mixed self evaluation", () => {
|
|
cy.get(
|
|
'[data-cy="versicherungsvermittler-in-alt-lp-circle-analyse-lu-fahrzeug"]'
|
|
).click();
|
|
cy.makeSelfEvaluation([false, true, true]);
|
|
cy.get(
|
|
'[data-cy="versicherungsvermittler-in-alt-lp-circle-analyse-lu-fahrzeug"]'
|
|
)
|
|
.find('[data-cy="fail"]')
|
|
.should("exist");
|
|
});
|
|
});
|