fix broken tests

This commit is contained in:
nflnkr 2023-11-03 16:10:47 +03:00
parent 2d47eb0058
commit 87760f3498
7 changed files with 716 additions and 22 deletions

@ -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");

@ -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"
}
}

@ -205,6 +205,7 @@ console.log(provided)
}}
inputProps={{
sx: { fontSize: "18px", lineHeight: "21px", py: 0, ml: "13px" },
"data-cy": "quiz-variant-question-answer",
}}
/>
{additionalMobile}

@ -39,6 +39,7 @@ export default function Steptwo() {
>
<Button
variant="text"
data-cy="select-quiz-layout-standard"
onClick={() => {
updateQuizesList(params, { startpage: "standard" });
}}

@ -60,6 +60,7 @@ export default function QuizPreview() {
return (
<Box
ref={rndParentRef}
data-cy="quiz-preview-container"
sx={{
position: "fixed",
top: NAVBAR_HEIGHT + DRAG_PARENT_MARGIN,
@ -119,6 +120,7 @@ export default function QuizPreview() {
)}
<IconButton
onClick={toggleQuizPreview}
data-cy="toggle-quiz-preview"
sx={{
position: "absolute",
right: 0,

@ -75,6 +75,7 @@ export default function QuizPreviewLayout() {
return (
<Paper
className="quiz-preview-draghandle"
data-cy="quiz-preview-layout"
sx={{
height: "100%",
display: "flex",

728
yarn.lock

File diff suppressed because it is too large Load Diff