Fix tests
This commit is contained in:
parent
1693adce39
commit
4c0d73150e
|
|
@ -101,7 +101,7 @@ describe("circle.cy.js", () => {
|
|||
.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", 4);
|
||||
cy.get("[data-cy=\"lp-learning-content\"]").should("have.length", 11);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ describe("selfEvaluation.cy.js", () => {
|
|||
cy.get("[data-cy=\"self-evaluation-unknown\"]").should("have.text", "4");
|
||||
|
||||
|
||||
// learning unit id = 687 also known as:
|
||||
// learning unit id = 692 also known as:
|
||||
// Bedarfsanalyse, Ist- und Soll-Situation <<Reisen>>
|
||||
const identifier = "self-eval-687"
|
||||
const identifier = "self-eval-692"
|
||||
|
||||
// data in KompetenzNavi/Selbsteinschätzungen is correct
|
||||
cy.visit("/course/test-lehrgang/competence/self-evaluation-and-feedback");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ function selectDropboxItem(dropboxSelector, item) {
|
|||
cy.get(dropboxSelector).contains(item).click();
|
||||
}
|
||||
|
||||
describe("appointments.cy.js", () => {
|
||||
describe("dueDates.cy.js", () => {
|
||||
beforeEach(() => {
|
||||
cy.manageCommand("cypress_reset");
|
||||
login("test-student2@example.com", "test");
|
||||
|
|
|
|||
|
|
@ -175,24 +175,29 @@ def create_test_course(
|
|||
)
|
||||
csac.due_date.save()
|
||||
|
||||
csac = CourseSessionAttendanceCourse.objects.create(
|
||||
course_session=cs_bern,
|
||||
learning_content=LearningContentAttendanceCourse.objects.get(
|
||||
slug="test-lehrgang-lp-circle-reisen-lc-präsenzkurs-reisen"
|
||||
),
|
||||
location="Handelsschule KV Bern, Zimmer 123, Eigerstrasse 16, 3012 Bern",
|
||||
trainer="Roland Grossenbacher, roland.grossenbacher@helvetia.ch",
|
||||
)
|
||||
wednesday_in_four_weeks = (
|
||||
datetime.now() + relativedelta(weekday=TU) + relativedelta(weeks=4)
|
||||
)
|
||||
csac.due_date.start = timezone.make_aware(
|
||||
wednesday_in_four_weeks.replace(hour=8, minute=15, second=0, microsecond=0)
|
||||
)
|
||||
csac.due_date.end = timezone.make_aware(
|
||||
wednesday_in_four_weeks.replace(hour=17, minute=30, second=0, microsecond=0)
|
||||
)
|
||||
csac.due_date.save()
|
||||
if include_vv:
|
||||
csac = CourseSessionAttendanceCourse.objects.create(
|
||||
course_session=cs_bern,
|
||||
learning_content=LearningContentAttendanceCourse.objects.get(
|
||||
slug="test-lehrgang-lp-circle-reisen-lc-präsenzkurs-reisen"
|
||||
),
|
||||
location="Handelsschule KV Bern, Zimmer 123, Eigerstrasse 16, 3012 Bern",
|
||||
trainer="Roland Grossenbacher, roland.grossenbacher@helvetia.ch",
|
||||
)
|
||||
wednesday_in_four_weeks = (
|
||||
datetime.now() + relativedelta(weekday=TU) + relativedelta(weeks=4)
|
||||
)
|
||||
csac.due_date.start = timezone.make_aware(
|
||||
wednesday_in_four_weeks.replace(
|
||||
hour=8, minute=15, second=0, microsecond=0
|
||||
)
|
||||
)
|
||||
csac.due_date.end = timezone.make_aware(
|
||||
wednesday_in_four_weeks.replace(
|
||||
hour=17, minute=30, second=0, microsecond=0
|
||||
)
|
||||
)
|
||||
csac.due_date.save()
|
||||
|
||||
csa = CourseSessionAssignment.objects.create(
|
||||
course_session=cs_bern,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class TestRetrieveLearingPathContents(APITestCase):
|
|||
# topics and circles
|
||||
self.assertEqual(4, len(data["children"]))
|
||||
# circle "analyse" contents
|
||||
self.assertEqual(15, len(data["children"][3]["children"]))
|
||||
self.assertEqual(20, len(data["children"][3]["children"]))
|
||||
|
||||
def test_normalUser_withoutCourseSession_cannotAccess(self):
|
||||
self.user = User.objects.get(username="student")
|
||||
|
|
|
|||
Loading…
Reference in New Issue