Fix cypress tests
This commit is contained in:
parent
815d81a471
commit
f357e34536
|
|
@ -23,7 +23,7 @@ describe("mediaLibrary.cy.js", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("handlungsfeld should be accessible via direct url", () => {
|
it("handlungsfeld should be accessible via direct url", () => {
|
||||||
cy.visit("/course/test-lehrgang/media/category/fahrzeug");
|
cy.visit("/course/test-lehrgang/media/handlungsfelder/fahrzeug");
|
||||||
cy.get('[data-cy="hf-title"]').should("contain", "Fahrzeug");
|
cy.get('[data-cy="hf-title"]').should("contain", "Fahrzeug");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -31,6 +31,6 @@ describe("mediaLibrary.cy.js", () => {
|
||||||
cy.visit("/course/test-lehrgang/learn/fahrzeug/handlungsfeld-fahrzeug");
|
cy.visit("/course/test-lehrgang/learn/fahrzeug/handlungsfeld-fahrzeug");
|
||||||
cy.get('[data-cy="media-library-link"]')
|
cy.get('[data-cy="media-library-link"]')
|
||||||
.invoke("attr", "href")
|
.invoke("attr", "href")
|
||||||
.should("contain", "/media/category/fahrzeug");
|
.should("contain", "/media/handlungsfelder/fahrzeug");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,6 @@ class MediaLibraryAPITestCase(APITestCase):
|
||||||
data = response.json()
|
data = response.json()
|
||||||
|
|
||||||
self.assertEqual(media_library.title, data["title"])
|
self.assertEqual(media_library.title, data["title"])
|
||||||
self.assertEqual("Fahrzeug", data["children"][1]["title"])
|
self.assertEqual("Handlungsfelder", data["children"][0]["title"])
|
||||||
|
self.assertEqual("Allgemeines", data["children"][1]["title"])
|
||||||
|
self.assertEqual("Fahrzeug", data["children"][0]["children"][0]["title"])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue