diff --git a/client/src/components/ui/ItNavigationProgress.vue b/client/src/components/ui/ItNavigationProgress.vue index 3e87483e..ebd9e595 100644 --- a/client/src/components/ui/ItNavigationProgress.vue +++ b/client/src/components/ui/ItNavigationProgress.vue @@ -65,6 +65,7 @@ function calcStepIndex(step: number) { v-if="props.startBadgeText" class="inline-flex h-7 items-center justify-center whitespace-nowrap rounded-3xl px-3 text-sm" :class="startBadgeClasses" + data-cy="nav-progress-step-start" > {{ props.startBadgeText }} @@ -79,6 +80,7 @@ function calcStepIndex(step: number) {
{ "Teilaufgabe 1: Beispiel einer Versicherungspolice finden" ); - // 2 Steps forward, 1 step backwards - for (let i = 0; i !== 2; i++) { - cy.learningContentMultiLayoutNextStep(); - } + cy.learningContentMultiLayoutNextStep(); + cy.learningContentMultiLayoutNextStep(); + cy.testLearningContentTitle("Teilaufgabe 3: Aktuelle Versicherung"); + cy.learningContentMultiLayoutPreviousStep(); cy.testLearningContentTitle( @@ -66,4 +66,16 @@ describe("student test", () => { "Hallovelo" ); }); + + it("can visit sub step directly via url", () => { + cy.visit( + "/course/test-lehrgang/learn/fahrzeug/überprüfen-einer-motorfahrzeug-versicherungspolice?page=3" + ); + cy.testLearningContentTitle("Teilaufgabe 3: Aktuelle Versicherung"); + }); + + it("can visit sub step by clicking navigation bar", () => { + cy.get('[data-cy="nav-progress-step-4"]').click(); + cy.testLearningContentTitle("Teilaufgabe 4: Deine Empfehlungen"); + }); });