diff --git a/cypress/e2e/quizPreview.cy.ts b/cypress/e2e/quizPreview.cy.ts index ea596109..4fbc3499 100644 --- a/cypress/e2e/quizPreview.cy.ts +++ b/cypress/e2e/quizPreview.cy.ts @@ -6,6 +6,7 @@ describe("Quiz preview", () => { cy.get("[data-cy=create-quiz-card]").click(); cy.get("[data-cy=select-quiz-layout-standard]").click(); cy.get("[data-cy=setup-questions]").click(); + cy.get("[data-cy=toggle-quiz-preview]").click(); }); it("container and layout elements should exist", () => { @@ -15,7 +16,6 @@ describe("Quiz preview", () => { describe("Variant question", () => { beforeEach(function fillTitleAndOptions() { - cy.get("[data-cy=expand-question]").click(); cy.get("[data-cy=select-questiontype-variant]").click(); cy.get("[data-cy=quiz-question-card]").eq(0).within(() => { cy.get("[data-cy=quiz-question-title]").type("Question Title"); diff --git a/package.json b/package.json index c283310b..524f482f 100755 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@emoji-mart/react": "^1.1.1", "@types/react-beautiful-dnd": "^13.1.4", "@types/react-cytoscapejs": "^1.2.4", - "craco-alias": "^3.0.1" + "craco-alias": "^3.0.1", + "cypress": "^13.4.0" } } diff --git a/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx b/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx index 57601c65..b641c541 100644 --- a/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx +++ b/src/pages/Questions/AnswerDraggableList/AnswerItem.tsx @@ -205,6 +205,7 @@ console.log(provided) }} inputProps={{ sx: { fontSize: "18px", lineHeight: "21px", py: 0, ml: "13px" }, + "data-cy": "quiz-variant-question-answer", }} /> {additionalMobile} diff --git a/src/pages/startPage/steptwo.tsx b/src/pages/startPage/steptwo.tsx index e27de7c7..4aa18413 100755 --- a/src/pages/startPage/steptwo.tsx +++ b/src/pages/startPage/steptwo.tsx @@ -39,6 +39,7 @@ export default function Steptwo() { >