@@ -231,7 +177,7 @@ function checkboxIconUncheckedTailwindClass(lc: LearningContent) {
{{
$t("circlePage.Dieser Inhalt gehört zu x", {
@@ -276,27 +222,54 @@ function checkboxIconUncheckedTailwindClass(lc: LearningContent) {
-
-
{{ $t("selfEvaluation.selfEvaluationYes") }}
+
+ {{ $t("a.Selbsteinschätzung") }}
+
-
-
{{ $t("selfEvaluation.selfEvaluationNo") }}
-
-
-
-
{{ $t("a.Selbsteinschätzung") }}
+
+
+ {{
+ performanceCriteriaStatusCount(
+ learningUnit.performance_criteria,
+ "SUCCESS"
+ )
+ }}
+
+
+
+ {{
+ performanceCriteriaStatusCount(
+ learningUnit.performance_criteria,
+ "FAIL"
+ )
+ }}
+
+
+
+ {{
+ performanceCriteriaStatusCount(
+ learningUnit.performance_criteria,
+ "UNKNOWN"
+ )
+ }}
+
diff --git a/client/src/services/circle.ts b/client/src/services/circle.ts
index 56b52813..2ee177aa 100644
--- a/client/src/services/circle.ts
+++ b/client/src/services/circle.ts
@@ -2,7 +2,7 @@ import type {
CircleType,
CourseCompletionStatus,
LearningSequence,
- LearningUnit,
+ LearningUnitPerformanceCriteria,
} from "@/types";
export function circleFlatChildren(circle: CircleType) {
@@ -49,22 +49,15 @@ export function allFinishedInLearningSequence(ls: LearningSequence) {
});
}
-export function calcSelfEvaluationStatus(
- learningUnit: LearningUnit
-): CourseCompletionStatus {
- if (learningUnit.performance_criteria.length > 0) {
- if (
- learningUnit.performance_criteria.every((q) => q.completion_status === "SUCCESS")
- ) {
- return "SUCCESS";
- }
- if (
- learningUnit.performance_criteria.every(
- (q) => q.completion_status === "FAIL" || q.completion_status === "SUCCESS"
- )
- ) {
- return "FAIL";
- }
- }
- return "UNKNOWN";
+export function performanceCriteriaStatusCount(
+ performanceCriteria: LearningUnitPerformanceCriteria[],
+ status: CourseCompletionStatus
+) {
+ return performanceCriteria.filter((pc) => pc.completion_status === status).length;
+}
+
+export function performanceCriteriaHasStatus(
+ performanceCriteria: LearningUnitPerformanceCriteria[]
+) {
+ return performanceCriteria.some((pc) => pc.completion_status !== "UNKNOWN");
}
diff --git a/cypress/e2e/assignment/assignmentStudent.cy.js b/cypress/e2e/assignment/assignmentStudent.cy.js
index 2144a55f..caea4744 100644
--- a/cypress/e2e/assignment/assignmentStudent.cy.js
+++ b/cypress/e2e/assignment/assignmentStudent.cy.js
@@ -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(
diff --git a/cypress/e2e/circle.cy.js b/cypress/e2e/circle.cy.js
index 591d95f0..3daaf0e6 100644
--- a/cypress/e2e/circle.cy.js
+++ b/cypress/e2e/circle.cy.js
@@ -1,4 +1,4 @@
-import { login } from "./helpers";
+import {login} from "./helpers";
describe("circle.cy.js", () => {
beforeEach(() => {
@@ -9,41 +9,19 @@ 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");
// workaround for flaky test in CI:
// for some strange reason, locally we don't have to do this
@@ -56,30 +34,30 @@ describe("circle.cy.js", () => {
"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»"
);
@@ -87,43 +65,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);
});
});
diff --git a/cypress/e2e/competenceNavi/selfEvaluation.cy.js b/cypress/e2e/competenceNavi/selfEvaluation.cy.js
index 60ff51b5..d926c8bd 100644
--- a/cypress/e2e/competenceNavi/selfEvaluation.cy.js
+++ b/cypress/e2e/competenceNavi/selfEvaluation.cy.js
@@ -12,21 +12,21 @@ 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");
// learning unit id = 687 also known as:
diff --git a/cypress/e2e/feedback/feedbackStudent.cy.js b/cypress/e2e/feedback/feedbackStudent.cy.js
index 1d9d5056..db15d44f 100644
--- a/cypress/e2e/feedback/feedbackStudent.cy.js
+++ b/cypress/e2e/feedback/feedbackStudent.cy.js
@@ -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"
});
}
);
diff --git a/cypress/e2e/learningPath.cy.js b/cypress/e2e/learningPath.cy.js
index 7f7914e2..b3a33c09 100644
--- a/cypress/e2e/learningPath.cy.js
+++ b/cypress/e2e/learningPath.cy.js
@@ -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");
diff --git a/server/vbv_lernwelt/core/management/commands/reset_iterativ_test_sessions.py b/server/vbv_lernwelt/core/management/commands/reset_iterativ_test_sessions.py
index ed690011..f22ac55b 100644
--- a/server/vbv_lernwelt/core/management/commands/reset_iterativ_test_sessions.py
+++ b/server/vbv_lernwelt/core/management/commands/reset_iterativ_test_sessions.py
@@ -40,7 +40,7 @@ IT_VV_TEST_COURSE = "Iterativ VV Testkurs"
IT_UK_TEST_COURSE = "Iterativ üK Testkurs"
IT_UK_TEST_REGION = "Iterativ Region"
TIME_FORMAT = "%d.%m.%Y, %H:%M"
-PASSWORD = "KqaDm3-x8zhCKHLWDV_oiqFrYWHg"
+PASSWORD = "myvbv1234"
logger = structlog.get_logger(__name__)
@@ -176,17 +176,21 @@ def add_trainers_to_course_session(
def get_or_create_users_uk():
members = [
_create_or_update_user(
- f"teilnehmer{n}.uk@iterativ.ch", "Teilnehmer üK", "Iterativ", PASSWORD, "de"
+ f"teilnehmer{n}.uk@iterativ.ch",
+ f"Teilnehmer{n} üK",
+ f"Iterativ{n}",
+ PASSWORD,
+ "de",
)
for n in range(1, 10)
]
trainer = _create_or_update_user(
- "trainer1.uk@iterativ.ch", "Trainer üK", "Iterativ", PASSWORD, "de"
+ "trainer1.uk@iterativ.ch", "Trainer1 üK", "Iterativ1", PASSWORD, "de"
)
regionenleiter = _create_or_update_user(
"regionenleiter1.uk@iterativ.ch",
- "Regionenleiter üK",
- "Iterativ",
+ "Regionenleiter1 üK",
+ "Iterativ1",
PASSWORD,
"de",
)
@@ -200,21 +204,25 @@ def get_or_create_users_uk():
def get_or_create_users_vv():
members = [
_create_or_update_user(
- f"teilnehmer{n}.vv@iterativ.ch", "Teilnehmer VV", "Iterativ", PASSWORD, "de"
+ f"teilnehmer{n}.vv@iterativ.ch",
+ f"Teilnehmer{n} VV ",
+ f"Iterativ{n}",
+ PASSWORD,
+ "de",
)
for n in range(1, 10)
]
member_with_mentor = _create_or_update_user(
- "teilnehmer1.vv.lb@iterativ.ch",
- "Teilnehmer VV mit LB",
- "Iterativ",
+ "teilnehmer1.mitlb.vv@iterativ.ch",
+ "Teilnehmer1 VV mit LB",
+ "Iterativ1",
PASSWORD,
"de",
)
mentor = _create_or_update_user(
"lernbegleitung1.vv@iterativ.ch",
- "Lernbegleitung VV",
- "Iterativ",
+ "Lernbegleitung1 VV",
+ "Iterativ1",
PASSWORD,
"de",
)
diff --git a/server/vbv_lernwelt/static/icons/icon-lc-competence-certificate-checked.svg b/server/vbv_lernwelt/static/icons/icon-lc-competence-certificate-checked.svg
index 9686627d..2cfbbf77 100644
--- a/server/vbv_lernwelt/static/icons/icon-lc-competence-certificate-checked.svg
+++ b/server/vbv_lernwelt/static/icons/icon-lc-competence-certificate-checked.svg
@@ -1,12 +1,13 @@
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+