fix broken tests
This commit is contained in:
parent
2d47eb0058
commit
87760f3498
@ -6,6 +6,7 @@ describe("Quiz preview", () => {
|
|||||||
cy.get("[data-cy=create-quiz-card]").click();
|
cy.get("[data-cy=create-quiz-card]").click();
|
||||||
cy.get("[data-cy=select-quiz-layout-standard]").click();
|
cy.get("[data-cy=select-quiz-layout-standard]").click();
|
||||||
cy.get("[data-cy=setup-questions]").click();
|
cy.get("[data-cy=setup-questions]").click();
|
||||||
|
cy.get("[data-cy=toggle-quiz-preview]").click();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("container and layout elements should exist", () => {
|
it("container and layout elements should exist", () => {
|
||||||
@ -15,7 +16,6 @@ describe("Quiz preview", () => {
|
|||||||
|
|
||||||
describe("Variant question", () => {
|
describe("Variant question", () => {
|
||||||
beforeEach(function fillTitleAndOptions() {
|
beforeEach(function fillTitleAndOptions() {
|
||||||
cy.get("[data-cy=expand-question]").click();
|
|
||||||
cy.get("[data-cy=select-questiontype-variant]").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-card]").eq(0).within(() => {
|
||||||
cy.get("[data-cy=quiz-question-title]").type("Question Title");
|
cy.get("[data-cy=quiz-question-title]").type("Question Title");
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
"@emoji-mart/react": "^1.1.1",
|
"@emoji-mart/react": "^1.1.1",
|
||||||
"@types/react-beautiful-dnd": "^13.1.4",
|
"@types/react-beautiful-dnd": "^13.1.4",
|
||||||
"@types/react-cytoscapejs": "^1.2.4",
|
"@types/react-cytoscapejs": "^1.2.4",
|
||||||
"craco-alias": "^3.0.1"
|
"craco-alias": "^3.0.1",
|
||||||
|
"cypress": "^13.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,6 +205,7 @@ console.log(provided)
|
|||||||
}}
|
}}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
sx: { fontSize: "18px", lineHeight: "21px", py: 0, ml: "13px" },
|
sx: { fontSize: "18px", lineHeight: "21px", py: 0, ml: "13px" },
|
||||||
|
"data-cy": "quiz-variant-question-answer",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{additionalMobile}
|
{additionalMobile}
|
||||||
|
@ -39,6 +39,7 @@ export default function Steptwo() {
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant="text"
|
variant="text"
|
||||||
|
data-cy="select-quiz-layout-standard"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
updateQuizesList(params, { startpage: "standard" });
|
updateQuizesList(params, { startpage: "standard" });
|
||||||
}}
|
}}
|
||||||
|
@ -60,6 +60,7 @@ export default function QuizPreview() {
|
|||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
ref={rndParentRef}
|
ref={rndParentRef}
|
||||||
|
data-cy="quiz-preview-container"
|
||||||
sx={{
|
sx={{
|
||||||
position: "fixed",
|
position: "fixed",
|
||||||
top: NAVBAR_HEIGHT + DRAG_PARENT_MARGIN,
|
top: NAVBAR_HEIGHT + DRAG_PARENT_MARGIN,
|
||||||
@ -119,6 +120,7 @@ export default function QuizPreview() {
|
|||||||
)}
|
)}
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={toggleQuizPreview}
|
onClick={toggleQuizPreview}
|
||||||
|
data-cy="toggle-quiz-preview"
|
||||||
sx={{
|
sx={{
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
right: 0,
|
right: 0,
|
||||||
|
@ -75,6 +75,7 @@ export default function QuizPreviewLayout() {
|
|||||||
return (
|
return (
|
||||||
<Paper
|
<Paper
|
||||||
className="quiz-preview-draghandle"
|
className="quiz-preview-draghandle"
|
||||||
|
data-cy="quiz-preview-layout"
|
||||||
sx={{
|
sx={{
|
||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
Loading…
Reference in New Issue
Block a user