diff --git a/cypress/e2e/circle.cy.js b/cypress/e2e/circle.cy.js index 4ffd2804..65a4193c 100644 --- a/cypress/e2e/circle.cy.js +++ b/cypress/e2e/circle.cy.js @@ -118,6 +118,6 @@ describe("circle.cy.js", () => { 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", 7); + cy.get('[data-cy="lp-learning-content"]').should("have.length", 8); }); }); diff --git a/server/vbv_lernwelt/course/creators/test_course.py b/server/vbv_lernwelt/course/creators/test_course.py index 0f7dbaf2..a0f2a717 100644 --- a/server/vbv_lernwelt/course/creators/test_course.py +++ b/server/vbv_lernwelt/course/creators/test_course.py @@ -70,6 +70,7 @@ from vbv_lernwelt.learnpath.tests.learning_path_factories import ( LearningContentAttendanceCourseFactory, LearningContentEdoniqTestFactory, LearningContentFeedbackFactory, + LearningContentKnowledgeAssessmentFactory, LearningContentLearningModuleFactory, LearningContentMediaLibraryFactory, LearningContentPlaceholderFactory, @@ -579,6 +580,11 @@ def create_test_circle_reisen(lp): title=f"Fachcheck Reisen", parent=parent, ) + LearningContentKnowledgeAssessmentFactory( + title="Wissens- und Verständnisfragen", + parent=parent, + content_url="https://s3.eu-central-1.amazonaws.com/myvbv-wbt.iterativ.ch/emma-und-ayla-campen-durch-amerika-analyse-xapi-FZoZOP9y/index.html", + ) LearningContentPlaceholderFactory( title="Reflexion", parent=parent, diff --git a/server/vbv_lernwelt/learnpath/tests/learning_path_factories.py b/server/vbv_lernwelt/learnpath/tests/learning_path_factories.py index 395f5543..e882ecca 100644 --- a/server/vbv_lernwelt/learnpath/tests/learning_path_factories.py +++ b/server/vbv_lernwelt/learnpath/tests/learning_path_factories.py @@ -8,6 +8,7 @@ from vbv_lernwelt.learnpath.models import ( LearningContentDocumentList, LearningContentEdoniqTest, LearningContentFeedback, + LearningContentKnowledgeAssessment, LearningContentLearningModule, LearningContentMediaLibrary, LearningContentPlaceholder, @@ -139,6 +140,16 @@ class LearningContentLearningModuleFactory(wagtail_factories.PageFactory): model = LearningContentLearningModule +class LearningContentKnowledgeAssessmentFactory(wagtail_factories.PageFactory): + title = "Beispiel Fachcheck" + minutes = 0 + content_url = "" + description = RichText("") + + class Meta: + model = LearningContentKnowledgeAssessment + + class LearningContentMediaLibraryFactory(wagtail_factories.PageFactory): title = "Mediathek" minutes = 0 diff --git a/server/vbv_lernwelt/learnpath/tests/test_api.py b/server/vbv_lernwelt/learnpath/tests/test_api.py index da6c8cc3..c68c0588 100644 --- a/server/vbv_lernwelt/learnpath/tests/test_api.py +++ b/server/vbv_lernwelt/learnpath/tests/test_api.py @@ -28,7 +28,7 @@ class TestRetrieveLearingPathContents(APITestCase): # topics and circles self.assertEqual(4, len(data["children"])) # circle "analyse" contents - self.assertEqual(13, len(data["children"][3]["children"])) + self.assertEqual(14, len(data["children"][3]["children"])) def test_normalUser_withoutCourseSession_cannotAccess(self): self.user = User.objects.get(username="student")