Add new content to test test lehrgang

This commit is contained in:
Christian Cueni 2023-11-23 12:00:17 +01:00
parent 766944d580
commit c3ff391968
4 changed files with 19 additions and 2 deletions

View File

@ -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);
});
});

View File

@ -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,

View File

@ -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

View File

@ -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")