Add new content to test test lehrgang
This commit is contained in:
parent
766944d580
commit
c3ff391968
|
|
@ -118,6 +118,6 @@ describe("circle.cy.js", () => {
|
||||||
|
|
||||||
cy.visit("/course/test-lehrgang/learn/reisen");
|
cy.visit("/course/test-lehrgang/learn/reisen");
|
||||||
cy.get('[data-cy="lp-learning-sequence"]').should("have.length", 3);
|
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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ from vbv_lernwelt.learnpath.tests.learning_path_factories import (
|
||||||
LearningContentAttendanceCourseFactory,
|
LearningContentAttendanceCourseFactory,
|
||||||
LearningContentEdoniqTestFactory,
|
LearningContentEdoniqTestFactory,
|
||||||
LearningContentFeedbackFactory,
|
LearningContentFeedbackFactory,
|
||||||
|
LearningContentKnowledgeAssessmentFactory,
|
||||||
LearningContentLearningModuleFactory,
|
LearningContentLearningModuleFactory,
|
||||||
LearningContentMediaLibraryFactory,
|
LearningContentMediaLibraryFactory,
|
||||||
LearningContentPlaceholderFactory,
|
LearningContentPlaceholderFactory,
|
||||||
|
|
@ -579,6 +580,11 @@ def create_test_circle_reisen(lp):
|
||||||
title=f"Fachcheck Reisen",
|
title=f"Fachcheck Reisen",
|
||||||
parent=parent,
|
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(
|
LearningContentPlaceholderFactory(
|
||||||
title="Reflexion",
|
title="Reflexion",
|
||||||
parent=parent,
|
parent=parent,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ from vbv_lernwelt.learnpath.models import (
|
||||||
LearningContentDocumentList,
|
LearningContentDocumentList,
|
||||||
LearningContentEdoniqTest,
|
LearningContentEdoniqTest,
|
||||||
LearningContentFeedback,
|
LearningContentFeedback,
|
||||||
|
LearningContentKnowledgeAssessment,
|
||||||
LearningContentLearningModule,
|
LearningContentLearningModule,
|
||||||
LearningContentMediaLibrary,
|
LearningContentMediaLibrary,
|
||||||
LearningContentPlaceholder,
|
LearningContentPlaceholder,
|
||||||
|
|
@ -139,6 +140,16 @@ class LearningContentLearningModuleFactory(wagtail_factories.PageFactory):
|
||||||
model = LearningContentLearningModule
|
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):
|
class LearningContentMediaLibraryFactory(wagtail_factories.PageFactory):
|
||||||
title = "Mediathek"
|
title = "Mediathek"
|
||||||
minutes = 0
|
minutes = 0
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class TestRetrieveLearingPathContents(APITestCase):
|
||||||
# topics and circles
|
# topics and circles
|
||||||
self.assertEqual(4, len(data["children"]))
|
self.assertEqual(4, len(data["children"]))
|
||||||
# circle "analyse" contents
|
# 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):
|
def test_normalUser_withoutCourseSession_cannotAccess(self):
|
||||||
self.user = User.objects.get(username="student")
|
self.user = User.objects.get(username="student")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue