feat: circle cleanup
This commit is contained in:
parent
d95bfd9495
commit
4e3b4785f0
|
|
@ -21,11 +21,13 @@ withDefaults(defineProps<Props>(), {
|
|||
"
|
||||
v-if="category === 'certificate'"
|
||||
class="h-[32px] w-[32px]"
|
||||
:aria-checked="completed"
|
||||
></component>
|
||||
<div
|
||||
v-else
|
||||
class="flex h-[32px] w-[32px] items-center justify-center rounded-full border"
|
||||
:class="[completed ? 'border-black' : 'border-gray-500']"
|
||||
:aria-checked="completed"
|
||||
>
|
||||
<it-icon-check v-if="completed" class="block h-6 w-6 text-black"></it-icon-check>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@ type LearninContentWithCompetenceCertificate =
|
|||
<div class="pb-6">
|
||||
<div class="flex items-center gap-4">
|
||||
<CompletionStatus
|
||||
:data-cy="`${learningContent.slug}-status`"
|
||||
:completed="learningContent.completion_status === 'SUCCESS'"
|
||||
:category="
|
||||
belongsToCompetenceCertificate(learningContent)
|
||||
|
|
@ -226,7 +227,14 @@ type LearninContentWithCompetenceCertificate =
|
|||
:data-cy="`${learningUnit.slug}`"
|
||||
@click="!props.readonly && circleStore.openSelfEvaluation(learningUnit)"
|
||||
>
|
||||
<div class="flex items-center gap-4">
|
||||
<div
|
||||
class="flex items-center gap-4"
|
||||
:data-cy="
|
||||
performanceCriteriaHasStatus(learningUnit.performance_criteria)
|
||||
? 'status'
|
||||
: 'no-status'
|
||||
"
|
||||
>
|
||||
<CompletionStatus />
|
||||
{{ $t("a.Selbsteinschätzung") }}
|
||||
</div>
|
||||
|
|
@ -235,7 +243,7 @@ type LearninContentWithCompetenceCertificate =
|
|||
v-if="performanceCriteriaHasStatus(learningUnit.performance_criteria)"
|
||||
class="flex items-center space-x-2 pl-12"
|
||||
>
|
||||
<it-icon-smiley-happy></it-icon-smiley-happy>
|
||||
<it-icon-smiley-happy data-cy="success"></it-icon-smiley-happy>
|
||||
<span class="pr-2">
|
||||
{{
|
||||
performanceCriteriaStatusCount(
|
||||
|
|
@ -244,7 +252,7 @@ type LearninContentWithCompetenceCertificate =
|
|||
)
|
||||
}}
|
||||
</span>
|
||||
<it-icon-smiley-thinking></it-icon-smiley-thinking>
|
||||
<it-icon-smiley-thinking data-cy="fail"></it-icon-smiley-thinking>
|
||||
<span class="pr-2">
|
||||
{{
|
||||
performanceCriteriaStatusCount(
|
||||
|
|
@ -253,7 +261,7 @@ type LearninContentWithCompetenceCertificate =
|
|||
)
|
||||
}}
|
||||
</span>
|
||||
<it-icon-smiley-neutral></it-icon-smiley-neutral>
|
||||
<it-icon-smiley-neutral data-cy="unknown"></it-icon-smiley-neutral>
|
||||
<span>
|
||||
{{
|
||||
performanceCriteriaStatusCount(
|
||||
|
|
|
|||
|
|
@ -113,8 +113,8 @@ function completePraxisAssignment() {
|
|||
});
|
||||
cy.reload();
|
||||
cy.get(
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lc-mein-kundenstamm-checkbox\"]"
|
||||
).should("have.class", "cy-checked");
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lc-mein-kundenstamm-status\"]"
|
||||
).should("have.attr", "aria-checked", "true");
|
||||
}
|
||||
|
||||
describe("assignmentStudent.cy.js", () => {
|
||||
|
|
@ -338,8 +338,8 @@ describe("assignmentStudent.cy.js", () => {
|
|||
cy.visit("/course/test-lehrgang/learn/fahrzeug/");
|
||||
|
||||
cy.get(
|
||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-überprüfen-einer-motorfahrzeug-versicherungspolice-checkbox\"]"
|
||||
).should("have.class", "cy-checked");
|
||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-überprüfen-einer-motorfahrzeug-versicherungspolice-status\"]"
|
||||
).should("have.attr", "aria-checked", "true");
|
||||
|
||||
//reopening page should get directly to last step
|
||||
cy.visit(
|
||||
|
|
|
|||
|
|
@ -9,71 +9,49 @@ describe("circle.cy.js", () => {
|
|||
});
|
||||
|
||||
it("can open circle page", () => {
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||
});
|
||||
|
||||
it("can toggle learning content", () => {
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||
).should("have.class", "cy-unchecked");
|
||||
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||
).click();
|
||||
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||
).should("have.class", "cy-checked");
|
||||
|
||||
// completion data should still be there after reload
|
||||
cy.reload();
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||
).should("have.class", "cy-checked");
|
||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
||||
});
|
||||
|
||||
it("can open learning contents and complete them by continuing", () => {
|
||||
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();
|
||||
cy.get('[data-cy="lc-title"]').should(
|
||||
cy.get("[data-cy=\"lc-title\"]").should(
|
||||
"contain",
|
||||
"Verschaffe dir einen Überblick"
|
||||
);
|
||||
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
||||
|
||||
cy.get('[data-cy="ls-continue-button"]').click();
|
||||
cy.get('[data-cy="lc-title"]').should(
|
||||
cy.get("[data-cy=\"ls-continue-button\"]").click();
|
||||
cy.get("[data-cy=\"lc-title\"]").should(
|
||||
"contain",
|
||||
"Handlungsfeld «Fahrzeug»"
|
||||
);
|
||||
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
||||
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick-checkbox"]'
|
||||
).should("have.class", "cy-checked");
|
||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-verschaffe-dir-einen-überblick-status\"]"
|
||||
).should("have.attr", "aria-checked", "true");
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-checkbox"]'
|
||||
).should("have.class", "cy-checked");
|
||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-handlungsfeld-fahrzeug-status\"]"
|
||||
).should("have.attr", "aria-checked", "true");
|
||||
});
|
||||
|
||||
it("continue button works", () => {
|
||||
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\"]").should("contain", "Los geht's");
|
||||
cy.get("[data-cy=\"ls-continue-button\"]").click();
|
||||
|
||||
cy.get('[data-cy="lc-title"]').should(
|
||||
cy.get("[data-cy=\"lc-title\"]").should(
|
||||
"contain",
|
||||
"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"]').click();
|
||||
cy.get('[data-cy="lc-title"]').should(
|
||||
cy.get("[data-cy=\"ls-continue-button\"]").should("contain", "Weiter geht's");
|
||||
cy.get("[data-cy=\"ls-continue-button\"]").click();
|
||||
cy.get("[data-cy=\"lc-title\"]").should(
|
||||
"contain",
|
||||
"Handlungsfeld «Fahrzeug»"
|
||||
);
|
||||
|
|
@ -81,43 +59,43 @@ describe("circle.cy.js", () => {
|
|||
|
||||
it("can open learning content by url", () => {
|
||||
cy.visit("/course/test-lehrgang/learn/fahrzeug/handlungsfeld-fahrzeug");
|
||||
cy.get('[data-cy="lc-title"]').should(
|
||||
cy.get("[data-cy=\"lc-title\"]").should(
|
||||
"contain",
|
||||
"Handlungsfeld «Fahrzeug»"
|
||||
);
|
||||
|
||||
cy.get('[data-cy="close-learning-content"]').click();
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||
cy.get("[data-cy=\"close-learning-content\"]").click();
|
||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
||||
});
|
||||
|
||||
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"]')
|
||||
cy.get("[data-cy=\"lp-learning-sequence\"]").should("have.length", 3);
|
||||
cy.get("[data-cy=\"lp-learning-sequence\"]")
|
||||
.first()
|
||||
.should("contain", "Vorbereitung");
|
||||
cy.get('[data-cy="lp-learning-sequence"]')
|
||||
cy.get("[data-cy=\"lp-learning-sequence\"]")
|
||||
.eq(1)
|
||||
.should("contain", "Training");
|
||||
cy.get('[data-cy="lp-learning-sequence"]')
|
||||
cy.get("[data-cy=\"lp-learning-sequence\"]")
|
||||
.last()
|
||||
.should("contain", "Transfer");
|
||||
|
||||
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\"]").should("have.length", 10);
|
||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
||||
.first()
|
||||
.should("contain", "Verschaffe dir einen Überblick");
|
||||
cy.get('[data-cy="lp-learning-content"]')
|
||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
||||
.eq(4)
|
||||
.should("contain", "Präsenzkurs Fahrzeug");
|
||||
cy.get('[data-cy="lp-learning-content"]')
|
||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
||||
.eq(7)
|
||||
.should("contain", "Reflexion");
|
||||
cy.get('[data-cy="lp-learning-content"]')
|
||||
cy.get("[data-cy=\"lp-learning-content\"]")
|
||||
.last()
|
||||
.should("contain", "Feedback");
|
||||
|
||||
cy.visit("/course/test-lehrgang/learn/reisen");
|
||||
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-sequence\"]").should("have.length", 3);
|
||||
cy.get("[data-cy=\"lp-learning-content\"]").should("have.length", 9);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,66 +12,66 @@ describe("selfEvaluation.cy.js", () => {
|
|||
});
|
||||
|
||||
it("self evaluation should be neutral", () => {
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]')
|
||||
.find('[data-cy="unknown"]')
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen\"]")
|
||||
.find("[data-cy=\"no-status\"]")
|
||||
.should("exist");
|
||||
});
|
||||
|
||||
it("self evaluation from KompetenzNavi", () => {
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]')
|
||||
.find('[data-cy="unknown"]')
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen\"]")
|
||||
.find("[data-cy=\"no-status\"]")
|
||||
.should("exist");
|
||||
|
||||
// data in KompetenzNavi/Übersicht is correct
|
||||
cy.visit("/course/test-lehrgang/competence");
|
||||
cy.get('[data-cy="self-evaluation-fail"]').should("have.text", "0");
|
||||
cy.get('[data-cy="self-evaluation-success"]').should("have.text", "0");
|
||||
cy.get('[data-cy="self-evaluation-unknown"]').should("have.text", "4");
|
||||
cy.get("[data-cy=\"self-evaluation-fail\"]").should("have.text", "0");
|
||||
cy.get("[data-cy=\"self-evaluation-success\"]").should("have.text", "0");
|
||||
cy.get("[data-cy=\"self-evaluation-unknown\"]").should("have.text", "4");
|
||||
|
||||
// data in KompetenzNavi/Selbsteinschätzungen is correct
|
||||
cy.visit("/course/test-lehrgang/competence/criteria");
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-fail"]').should(
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-fail\"]").should(
|
||||
"have.text",
|
||||
"0"
|
||||
);
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-success"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-success\"]"
|
||||
).should("have.text", "0");
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-unknown"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-unknown\"]"
|
||||
).should("have.text", "2");
|
||||
|
||||
// it can open self evaluation from within KompetenzNavi
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-open"]').click();
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-open\"]").click();
|
||||
|
||||
// starting the self evaluation will return to KompetenzNavi
|
||||
cy.makeSelfEvaluation([true, false]);
|
||||
cy.url().should("include", "/course/test-lehrgang/competence/criteria");
|
||||
|
||||
// check data again on KompetenzNavi
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-fail"]').should(
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-fail\"]").should(
|
||||
"have.text",
|
||||
"1"
|
||||
);
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-success"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-success\"]"
|
||||
).should("have.text", "1");
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-unknown"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-unknown\"]"
|
||||
).should("have.text", "0");
|
||||
|
||||
// data in KompetenzNavi/Übersicht is correct
|
||||
cy.visit("/course/test-lehrgang/competence");
|
||||
cy.get('[data-cy="self-evaluation-fail"]').should("have.text", "1");
|
||||
cy.get('[data-cy="self-evaluation-success"]').should("have.text", "1");
|
||||
cy.get('[data-cy="self-evaluation-unknown"]').should("have.text", "2");
|
||||
cy.get("[data-cy=\"self-evaluation-fail\"]").should("have.text", "1");
|
||||
cy.get("[data-cy=\"self-evaluation-success\"]").should("have.text", "1");
|
||||
cy.get("[data-cy=\"self-evaluation-unknown\"]").should("have.text", "2");
|
||||
});
|
||||
|
||||
it("should be able to make a happy self evaluation", () => {
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]').click();
|
||||
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"]')
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen\"]")
|
||||
.find("[data-cy=\"success\"]")
|
||||
.should("exist");
|
||||
|
||||
// starting the self evaluation from circle should return to circle
|
||||
|
|
@ -79,57 +79,57 @@ describe("selfEvaluation.cy.js", () => {
|
|||
|
||||
// data in KompetenzNavi / Selbsteinschätzungen is correct
|
||||
cy.visit("/course/test-lehrgang/competence/criteria");
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-fail"]').should(
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-fail\"]").should(
|
||||
"have.text",
|
||||
"0"
|
||||
);
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-success"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-success\"]"
|
||||
).should("have.text", "2");
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-unknown"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-unknown\"]"
|
||||
).should("have.text", "0");
|
||||
});
|
||||
|
||||
it("should be able to make a fail self evaluation", () => {
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]').click();
|
||||
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"]')
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen\"]")
|
||||
.find("[data-cy=\"fail\"]")
|
||||
.should("exist");
|
||||
|
||||
// data in KompetenzNavi / Selbsteinschätzungen is correct
|
||||
cy.visit("/course/test-lehrgang/competence/criteria");
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-fail"]').should(
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-fail\"]").should(
|
||||
"have.text",
|
||||
"2"
|
||||
);
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-success"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-success\"]"
|
||||
).should("have.text", "0");
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-unknown"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-unknown\"]"
|
||||
).should("have.text", "0");
|
||||
});
|
||||
|
||||
it("should be able to make a mixed self evaluation", () => {
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen"]').click();
|
||||
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"]')
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen\"]")
|
||||
.find("[data-cy=\"fail\"]")
|
||||
.should("exist");
|
||||
|
||||
// data in KompetenzNavi / Selbsteinschätzungen is correct
|
||||
cy.visit("/course/test-lehrgang/competence/criteria");
|
||||
cy.get('[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-fail"]').should(
|
||||
cy.get("[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-fail\"]").should(
|
||||
"have.text",
|
||||
"1"
|
||||
);
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-success"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-success\"]"
|
||||
).should("have.text", "1");
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lu-reisen-unknown"]'
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lu-reisen-unknown\"]"
|
||||
).should("have.text", "0");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -30,23 +30,23 @@ describe("feedbackStudent.cy.js", () => {
|
|||
// fill feedback form
|
||||
// step 1
|
||||
cy.url().should("include", "step=1");
|
||||
cy.get('[data-cy="question-1"]').should(
|
||||
cy.get("[data-cy=\"question-1\"]").should(
|
||||
"contain",
|
||||
"Zufriedenheit insgesamt"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-4"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-4\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 2
|
||||
cy.url().should("include", "step=2");
|
||||
cy.get('[data-cy="question-2"]').should(
|
||||
cy.get("[data-cy=\"question-2\"]").should(
|
||||
"contain",
|
||||
"Zielerreichung insgesamt"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
// the system should store after every step -> check stored data
|
||||
cy.loadFeedbackResponse("feedback_user_id", TEST_STUDENT1_USER_ID).then(
|
||||
(ac) => {
|
||||
|
|
@ -55,67 +55,67 @@ describe("feedbackStudent.cy.js", () => {
|
|||
expect(ac.data.instructor_competence).to.equal(null);
|
||||
}
|
||||
);
|
||||
cy.get('[data-cy="radio-3"]').click();
|
||||
cy.get("[data-cy=\"radio-3\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 3
|
||||
cy.url().should("include", "step=3");
|
||||
cy.get('[data-cy="question-3"]').should(
|
||||
cy.get("[data-cy=\"question-3\"]").should(
|
||||
"contain",
|
||||
"Wie beurteilst du deine Sicherheit bezüglichen den Themen nach dem Kurs?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-80"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-80\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 4
|
||||
cy.url().should("include", "step=4");
|
||||
cy.get('[data-cy="question-4"]').should(
|
||||
cy.get("[data-cy=\"question-4\"]").should(
|
||||
"contain",
|
||||
"Waren die Vorbereitungsaufträge klar und verständlich?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-false"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-false\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 5
|
||||
cy.url().should("include", "step=5");
|
||||
cy.get('[data-cy="question-5"]').should(
|
||||
cy.get("[data-cy=\"question-5\"]").should(
|
||||
"contain",
|
||||
"Wie beurteilst du die Themensicherheit und Fachkompetenz des Kursleiters/der Kursleiterin?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-2"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-2\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 6
|
||||
cy.url().should("include", "step=6");
|
||||
cy.get('[data-cy="question-6"]').should(
|
||||
cy.get("[data-cy=\"question-6\"]").should(
|
||||
"contain",
|
||||
"Wurden Fragen und Anregungen der Kursteilnehmenden ernst genommen und aufgegriffen?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-1"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-1\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 7
|
||||
cy.url().should("include", "step=7");
|
||||
cy.get('[data-cy="question-7"]').should(
|
||||
cy.get("[data-cy=\"question-7\"]").should(
|
||||
"contain",
|
||||
"Was möchtest du dem Kursleiter/der Kursleiterin sonst noch sagen?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="it-textarea-instructor_open_feedback"]').type(
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"it-textarea-instructor_open_feedback\"]").type(
|
||||
"Der Kursleiter ist eigentlich ganz nett."
|
||||
);
|
||||
cy.wait(200);
|
||||
|
|
@ -124,25 +124,25 @@ describe("feedbackStudent.cy.js", () => {
|
|||
|
||||
// step 8
|
||||
cy.url().should("include", "step=8");
|
||||
cy.get('[data-cy="question-8"]').should(
|
||||
cy.get("[data-cy=\"question-8\"]").should(
|
||||
"contain",
|
||||
"Würdest du den Kurs weiterempfehlen?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-true"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-true\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 9
|
||||
cy.url().should("include", "step=9");
|
||||
cy.get('[data-cy="question-9"]').should(
|
||||
cy.get("[data-cy=\"question-9\"]").should(
|
||||
"contain",
|
||||
"Was hat dir besonders gut gefallen?"
|
||||
);
|
||||
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="it-textarea-course_positive_feedback"]').type(
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"it-textarea-course_positive_feedback\"]").type(
|
||||
"Ich bin zufrieden mit den meisten Dingen."
|
||||
);
|
||||
cy.wait(200);
|
||||
|
|
@ -151,12 +151,12 @@ describe("feedbackStudent.cy.js", () => {
|
|||
|
||||
// step 10
|
||||
cy.url().should("include", "step=10");
|
||||
cy.get('[data-cy="question-10"]').should(
|
||||
cy.get("[data-cy=\"question-10\"]").should(
|
||||
"contain",
|
||||
"Wo siehst du Verbesserungspotential?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="it-textarea-course_negative_feedback"]').type(
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"it-textarea-course_negative_feedback\"]").type(
|
||||
"Ich bin unzufrieden mit einigen Sachen."
|
||||
);
|
||||
cy.wait(200);
|
||||
|
|
@ -164,8 +164,8 @@ describe("feedbackStudent.cy.js", () => {
|
|||
cy.wait(200);
|
||||
|
||||
cy.url().should("include", "step=11");
|
||||
cy.get('[data-cy="sendFeedbackButton"]').click();
|
||||
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||
cy.get("[data-cy=\"sendFeedbackButton\"]").click();
|
||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
||||
|
||||
// marked complete in circle
|
||||
cy.url().should((url) => {
|
||||
|
|
@ -173,8 +173,8 @@ describe("feedbackStudent.cy.js", () => {
|
|||
});
|
||||
cy.reload();
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-fahrzeug-lc-feedback-checkbox"]'
|
||||
).should("have.class", "cy-checked");
|
||||
"[data-cy=\"test-lehrgang-lp-circle-fahrzeug-lc-feedback-status\"]"
|
||||
).should("have.attr", "aria-checked", "true");
|
||||
|
||||
// reopening page should get directly to last step
|
||||
cy.visit("/course/test-lehrgang/learn/fahrzeug/feedback");
|
||||
|
|
@ -197,7 +197,7 @@ describe("feedbackStudent.cy.js", () => {
|
|||
proficiency: 80,
|
||||
satisfaction: 4,
|
||||
would_recommend: true,
|
||||
feedback_type: "uk",
|
||||
feedback_type: "uk"
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
@ -219,7 +219,7 @@ describe("feedbackStudent.cy.js", () => {
|
|||
cy.url().should((url) => {
|
||||
expect(url).to.match(/\/reisen\/feedback(\?step=0)?$/);
|
||||
});
|
||||
cy.get('[data-cy="introduction"]').contains(
|
||||
cy.get("[data-cy=\"introduction\"]").contains(
|
||||
"Wir bitten dich um dein Feedback. Es hilft uns, damit wir deine Lernerlebnisse verbessern können."
|
||||
);
|
||||
|
||||
|
|
@ -230,23 +230,23 @@ describe("feedbackStudent.cy.js", () => {
|
|||
// fill feedback form
|
||||
// step 1
|
||||
cy.url().should("include", "step=1");
|
||||
cy.get('[data-cy="question-1"]').should(
|
||||
cy.get("[data-cy=\"question-1\"]").should(
|
||||
"contain",
|
||||
"Zufriedenheit insgesamt"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-4"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-4\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 2
|
||||
cy.url().should("include", "step=2");
|
||||
cy.get('[data-cy="question-2"]').should(
|
||||
cy.get("[data-cy=\"question-2\"]").should(
|
||||
"contain",
|
||||
"Zielerreichung insgesamt"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
// the system should store after every step -> check stored data
|
||||
cy.loadFeedbackResponse("feedback_user_id", TEST_STUDENT1_USER_ID).then(
|
||||
(ac) => {
|
||||
|
|
@ -255,56 +255,56 @@ describe("feedbackStudent.cy.js", () => {
|
|||
expect(ac.data.course_positive_feedback).to.equal(null);
|
||||
}
|
||||
);
|
||||
cy.get('[data-cy="radio-3"]').click();
|
||||
cy.get("[data-cy=\"radio-3\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 3
|
||||
cy.url().should("include", "step=3");
|
||||
cy.get('[data-cy="question-3"]').should(
|
||||
cy.get("[data-cy=\"question-3\"]").should(
|
||||
"contain",
|
||||
"Wie beurteilst du deine Sicherheit bezüglichen den Themen nach dem Circle?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-80"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-80\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 4
|
||||
cy.url().should("include", "step=4");
|
||||
cy.get('[data-cy="question-4"]').should(
|
||||
cy.get("[data-cy=\"question-4\"]").should(
|
||||
"contain",
|
||||
"Waren die Praxisaufträge klar und verständlich?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-false"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-false\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 5
|
||||
cy.url().should("include", "step=5");
|
||||
cy.get('[data-cy="question-5"]').should(
|
||||
cy.get("[data-cy=\"question-5\"]").should(
|
||||
"contain",
|
||||
"Würdest du den Circle weiterempfehlen?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="radio-false"]').click();
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"radio-false\"]").click();
|
||||
cy.wait(200);
|
||||
cy.learningContentMultiLayoutNextStep();
|
||||
cy.wait(200);
|
||||
|
||||
// step 6
|
||||
cy.url().should("include", "step=6");
|
||||
cy.get('[data-cy="question-6"]').should(
|
||||
cy.get("[data-cy=\"question-6\"]").should(
|
||||
"contain",
|
||||
"Was hat dir besonders gut gefallen?"
|
||||
);
|
||||
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="it-textarea-course_positive_feedback"]').type(
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"it-textarea-course_positive_feedback\"]").type(
|
||||
"Der Circle ist eigentlich ganz nett."
|
||||
);
|
||||
cy.wait(200);
|
||||
|
|
@ -313,12 +313,12 @@ describe("feedbackStudent.cy.js", () => {
|
|||
|
||||
// step 7
|
||||
cy.url().should("include", "step=7");
|
||||
cy.get('[data-cy="question-7"]').should(
|
||||
cy.get("[data-cy=\"question-7\"]").should(
|
||||
"contain",
|
||||
"Wo siehst du Verbesserungspotential?"
|
||||
);
|
||||
cy.get('[data-cy="next-step"]').should("be.disabled");
|
||||
cy.get('[data-cy="it-textarea-course_negative_feedback"]').type(
|
||||
cy.get("[data-cy=\"next-step\"]").should("be.disabled");
|
||||
cy.get("[data-cy=\"it-textarea-course_negative_feedback\"]").type(
|
||||
"Ich bin unzufrieden mit einigen Sachen."
|
||||
);
|
||||
cy.wait(200);
|
||||
|
|
@ -326,8 +326,8 @@ describe("feedbackStudent.cy.js", () => {
|
|||
cy.wait(200);
|
||||
|
||||
cy.url().should("include", "step=8");
|
||||
cy.get('[data-cy="sendFeedbackButton"]').click();
|
||||
cy.get('[data-cy="complete-and-continue"]').click({ force: true });
|
||||
cy.get("[data-cy=\"sendFeedbackButton\"]").click();
|
||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
||||
|
||||
// marked complete in circle
|
||||
cy.url().should((url) => {
|
||||
|
|
@ -335,8 +335,8 @@ describe("feedbackStudent.cy.js", () => {
|
|||
});
|
||||
cy.reload();
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lc-feedback-checkbox"]'
|
||||
).should("have.class", "cy-checked");
|
||||
"[data-cy=\"test-lehrgang-lp-circle-reisen-lc-feedback-status\"]"
|
||||
).should("have.attr", "aria-checked", "true");
|
||||
|
||||
// reopening page should get directly to last step
|
||||
cy.visit("/course/test-lehrgang/learn/reisen/feedback");
|
||||
|
|
@ -354,7 +354,7 @@ describe("feedbackStudent.cy.js", () => {
|
|||
proficiency: 80,
|
||||
satisfaction: 4,
|
||||
would_recommend: false,
|
||||
feedback_type: "vv",
|
||||
feedback_type: "vv"
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -8,55 +8,54 @@ describe("learningPath.cy.js", () => {
|
|||
});
|
||||
|
||||
it("can open learningPath page", () => {
|
||||
cy.get('[data-cy="learning-path-title"]').should(
|
||||
cy.get("[data-cy=\"learning-path-title\"]").should(
|
||||
"contain",
|
||||
"Test Lehrgang"
|
||||
);
|
||||
});
|
||||
|
||||
it("can click on circle to open it", () => {
|
||||
cy.get('[data-cy="circle-Fahrzeug"]').click({ force: true });
|
||||
cy.get("[data-cy=\"circle-Fahrzeug\"]").click({ force: true });
|
||||
|
||||
cy.url().should("include", "/course/test-lehrgang/learn/fahrzeug");
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
||||
});
|
||||
|
||||
it("switch between list and path view", () => {
|
||||
cy.get('[data-cy="lp-path-view"]').should("be.visible");
|
||||
cy.get('[data-cy="view-switch"]').click();
|
||||
cy.get('[data-cy="lp-list-view"]').should("be.visible");
|
||||
cy.get('[data-cy="view-switch"]').click();
|
||||
cy.get('[data-cy="lp-path-view"]').should("be.visible");
|
||||
cy.get("[data-cy=\"lp-path-view\"]").should("be.visible");
|
||||
cy.get("[data-cy=\"view-switch\"]").click();
|
||||
cy.get("[data-cy=\"lp-list-view\"]").should("be.visible");
|
||||
cy.get("[data-cy=\"view-switch\"]").click();
|
||||
cy.get("[data-cy=\"lp-path-view\"]").should("be.visible");
|
||||
});
|
||||
|
||||
it("weiter gehts button will open next circle", () => {
|
||||
// first click will open first circle
|
||||
cy.get('[data-cy="lp-continue-button"]')
|
||||
cy.get("[data-cy=\"lp-continue-button\"]")
|
||||
.filter(":visible")
|
||||
.should("contain", "Los geht's")
|
||||
.click();
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Fahrzeug");
|
||||
cy.get('[data-cy="back-to-learning-path-button"]').click();
|
||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Fahrzeug");
|
||||
cy.get("[data-cy=\"back-to-learning-path-button\"]").click();
|
||||
|
||||
// mark a learning content in second circle
|
||||
cy.get('[data-cy="circle-Reisen"]').click({ force: true });
|
||||
cy.get(
|
||||
'[data-cy="test-lehrgang-lp-circle-reisen-lc-fachcheck-reisen-checkbox"]'
|
||||
).click();
|
||||
cy.get('[data-cy="back-to-learning-path-button"]').click();
|
||||
cy.get("[data-cy=\"circle-Reisen\"]").click({ force: true });
|
||||
cy.get("[data-cy=\"ls-continue-button\"]").click();
|
||||
cy.get("[data-cy=\"complete-and-continue\"]").click({ force: true });
|
||||
cy.get("[data-cy=\"back-to-learning-path-button\"]").click();
|
||||
|
||||
// click on continue should go to unit-test-circle
|
||||
cy.get('[data-cy="lp-continue-button"]')
|
||||
cy.get("[data-cy=\"lp-continue-button\"]")
|
||||
.filter(":visible")
|
||||
.should("contain", "Weiter geht's")
|
||||
.click();
|
||||
cy.get('[data-cy="circle-title"]').should("contain", "Reisen");
|
||||
cy.get("[data-cy=\"circle-title\"]").should("contain", "Reisen");
|
||||
});
|
||||
|
||||
it("checks contents", () => {
|
||||
cy.get('[data-cy="lp-topic"]').should("have.length", 2);
|
||||
cy.get('[data-cy="lp-topic"]').first().should("contain", "Circle ÜK");
|
||||
cy.get('[data-cy="lp-topic"]').eq(1).should("contain", "Circle VV");
|
||||
cy.get("[data-cy=\"lp-topic\"]").should("have.length", 2);
|
||||
cy.get("[data-cy=\"lp-topic\"]").first().should("contain", "Circle ÜK");
|
||||
cy.get("[data-cy=\"lp-topic\"]").eq(1).should("contain", "Circle VV");
|
||||
|
||||
cy.get(".cy-lp-circle").should("have.length", 2);
|
||||
cy.get(".cy-lp-circle").first().should("contain", "Fahrzeug");
|
||||
|
|
|
|||
Loading…
Reference in New Issue