From d5387a0d1ab749c5519eedf8f570d3af1be40676 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Wed, 27 Sep 2023 19:57:37 +0530 Subject: [PATCH] test: fix course creation test --- cypress/e2e/course_creation.cy.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/course_creation.cy.js b/cypress/e2e/course_creation.cy.js index 48f3c5dd..98ae26cc 100644 --- a/cypress/e2e/course_creation.cy.js +++ b/cypress/e2e/course_creation.cy.js @@ -33,15 +33,16 @@ describe("Course Creation", () => { cy.get("#lesson-title").type("Test Lesson"); // Content - cy.get(".ce-block").click().type("{enter}"); - cy.get(".ce-toolbar__plus").click(); - cy.get('[data-item-name="youtube"]').click(); + cy.get(".collapse-section.collapsed:first").click(); + cy.get("#lesson-content .ce-block").click().type("{enter}"); + cy.get("#lesson-content .ce-toolbar__plus").click(); + cy.get('#lesson-content [data-item-name="youtube"]').click(); cy.get('input[data-fieldname="youtube"]').type("GoDtyItReto"); cy.button("Insert").click(); cy.wait(1000); - cy.get(".ce-block:last").click().type("{enter}"); - cy.get(".ce-block:last") + cy.get("#lesson-content .ce-block:last").click().type("{enter}"); + cy.get("#lesson-content .ce-block:last") .click() .type( "This is an extremely big paragraph that is meant to test the UI. This is a very long paragraph. It contains more than once sentence. Its meant to be this long as this is a UI test. Its unbearably long and I'm not sure why I'm typing this much. I'm just going to keep typing until I feel like its long enough. I think its long enough now. I'm going to stop typing now."