60 lines
2.0 KiB
JavaScript
60 lines
2.0 KiB
JavaScript
import { login } from "./helpers";
|
|
|
|
describe("learningPath page", () => {
|
|
beforeEach(() => {
|
|
cy.manageCommand("cypress_reset");
|
|
});
|
|
|
|
it("can open learningPath page", () => {
|
|
login("admin", "test");
|
|
cy.visit("/learn/versicherungsvermittlerin");
|
|
|
|
cy.get('[data-cy="learning-path-title"]').should(
|
|
"contain",
|
|
"Versicherungsvermittler/in"
|
|
);
|
|
});
|
|
|
|
it("click on circle on learningPath page will open circle", () => {
|
|
login("admin", "test");
|
|
cy.visit("/learn/versicherungsvermittlerin");
|
|
|
|
cy.get('[data-cy="circle-analyse"]').click({ force: true });
|
|
|
|
cy.url().should("include", "/learn/versicherungsvermittlerin/analyse");
|
|
cy.get('[data-cy="circle-title"]').should("contain", "Analyse");
|
|
});
|
|
|
|
it("open listView and click on cirle will open circle", () => {
|
|
login("admin", "test");
|
|
cy.visit("/learn/versicherungsvermittlerin");
|
|
|
|
cy.get('[data-cy="show-list-view"]').click();
|
|
cy.get('[data-cy="full-screen-modal"]').should("be.visible");
|
|
|
|
cy.get('[data-cy="circle-analyse-vertical"]').click({ force: true });
|
|
|
|
cy.url().should("include", "/learn/versicherungsvermittlerin/analyse");
|
|
cy.get('[data-cy="circle-title"]').should("contain", "Analyse");
|
|
});
|
|
|
|
it("weiter gehts button will open next circle", () => {
|
|
login("admin", "test");
|
|
cy.visit("/learn/unit-test-lernpfad");
|
|
|
|
// first click will open first circle
|
|
cy.get('[data-cy="continue-button"]').click();
|
|
cy.get('[data-cy="circle-title"]').should("contain", "Basis");
|
|
cy.get('[data-cy="back-to-learning-path-button"]').click();
|
|
|
|
// mark a learning content in second circle
|
|
cy.get('[data-cy="circle-unit-test-circle"]').click({ force: true });
|
|
cy.get('[data-cy="lc-reiseversicherung-7"] > .cy-checkbox').click();
|
|
cy.get('[data-cy="back-to-learning-path-button"]').click();
|
|
|
|
// click on continue should go to unit-test-circle
|
|
cy.get('[data-cy="continue-button"]').click();
|
|
cy.get('[data-cy="circle-title"]').should("contain", "Unit-Test Circle");
|
|
});
|
|
});
|