mirror of
https://github.com/frappe/lms.git
synced 2026-04-19 22:52:29 +03:00
test(ui): find course with the test title instead of checking the first course card
(cherry picked from commit 8c54d77740)
This commit is contained in:
@@ -104,15 +104,17 @@ describe("Course Creation", () => {
|
||||
cy.closeOnboardingModal();
|
||||
|
||||
cy.url().should("include", "/lms/courses");
|
||||
cy.get(".grid a:first").within(() => {
|
||||
cy.get("div").contains("Test Course");
|
||||
cy.get("div").contains(
|
||||
"Test Course Short Introduction to test the UI"
|
||||
);
|
||||
cy.get(".bg-cover")
|
||||
.invoke("css", "background-image")
|
||||
.should("include", "/files/profile");
|
||||
});
|
||||
cy.get("div")
|
||||
.contains("Test Course")
|
||||
.closest("a")
|
||||
.within(() => {
|
||||
cy.get("div").contains(
|
||||
"Test Course Short Introduction to test the UI"
|
||||
);
|
||||
cy.get(".bg-cover")
|
||||
.invoke("css", "background-image")
|
||||
.should("include", "/files/profile");
|
||||
});
|
||||
cy.get(".grid a:first").click();
|
||||
cy.url().should("include", "/lms/courses/test-course");
|
||||
cy.get("div").contains("Test Course");
|
||||
|
||||
Reference in New Issue
Block a user