diff --git a/cypress/e2e/image/Bunner.png b/cypress/e2e/image/Bunner.png
new file mode 100644
index 00000000..bd06b317
Binary files /dev/null and b/cypress/e2e/image/Bunner.png differ
diff --git a/cypress/e2e/quizPublish.cy.ts b/cypress/e2e/quizPublish.cy.ts
new file mode 100644
index 00000000..06203589
--- /dev/null
+++ b/cypress/e2e/quizPublish.cy.ts
@@ -0,0 +1,296 @@
+import "cypress-file-upload";
+
+describe("Форма Входа", () => {
+ beforeEach(() => {
+ cy.visit("http://localhost:3000");
+ cy.wait(1000);
+ cy.contains("Регистрация / Войти").click();
+ const login = "valid_user@exammple.com";
+ const password = "valid_password";
+
+ cy.get("#email").type(login);
+ cy.get("#password").type(password);
+ cy.get('button[type="submit"]').click();
+ });
+
+ it("Тестирование создания, публикации и удаления опросника с проверкой обязательных вопросов", () => {
+ cy.get('[data-cy="create-quiz"]').click();
+ cy.wait(1000);
+ cy.get('button[data-cy="create-quiz-card"]').eq(0).click();
+ cy.wait(1000);
+ cy.get('button[data-cy="select-quiz-layout-standard"]').click();
+
+ cy.get('input[type="checkbox"]').click();
+
+ cy.get('[data-cy="setup-questions"]').click();
+ cy.contains("button", "Варианты с картинками").click();
+
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(0).type("1").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(1).should("have.value", "").type("2").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(2).should("have.value", "").type("3").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(3).should("have.value", "").type("4").type("{enter}");
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.contains("div", "1").click();
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ //Варианты ответов +
+
+ cy.contains("button", "Варианты ответов").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(0).type("1").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(1).should("have.value", "").type("2").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(2).should("have.value", "").type("3").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(3).should("have.value", "").type("4").type("{enter}");
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.contains("label", "1").click();
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+
+ cy.get('[data-cy="create-question"]').click();
+
+ // Варианты и картинка +
+
+ cy.contains("button", "Варианты и картинка").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(0).type("1").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(1).should("have.value", "").type("2").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(2).should("have.value", "").type("3").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(3).should("have.value", "").type("4").type("{enter}");
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.contains("div", "1").click();
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ //Эмоджи +
+
+ cy.contains("button", "Эмоджи").click();
+ cy.contains("label", "Необязательный вопрос").click();
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(0).type("1").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(1).should("have.value", "").type("2").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(2).should("have.value", "").type("3").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(3).should("have.value", "").type("4").type("{enter}");
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.contains("div", "1").click();
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ //Своё поле для ввода +
+
+ cy.contains("button", "Своё поле для ввода").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.get('input[placeholder="Пример ответа"]').eq(0).type("1").type("{enter}");
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.get('input[type="text"]').type("email@invalid.com");
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ //Выпадающий список +
+
+ cy.contains("button", "Выпадающий список").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(0).type("1").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(1).should("have.value", "").type("2").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(2).should("have.value", "").type("3").type("{enter}");
+ cy.get('[data-cy="quiz-variant-question-answer"]').eq(3).should("have.value", "").type("4").type("{enter}");
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.get("#display-select").click();
+ cy.get("li").eq(0).click();
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ //Дата +
+
+ cy.contains("button", "Дата").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.get('button[data-cy="open-datepicker"]').click();
+
+ cy.wait(500);
+
+ cy.get('button[role="gridcell"]').eq(16).click();
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ //Ползунок +
+
+ cy.contains("button", "Ползунок").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.get('input[aria-invalid="false"][id=":r0:"][placeholder="0"]').type("10");
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ //Загрузка файла +
+
+ cy.contains("button", "Загрузка файла").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.get('label.MuiButtonBase-root input[type="file"]').attachFile("./image/Bunner.png");
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ // Рейтинг
+
+ cy.contains("button", "Рейтинг").click();
+ cy.contains("label", "Необязательный вопрос").click();
+
+ cy.visit("http://localhost:3000/view");
+ cy.wait(500);
+
+ cy.contains("Далее →").should("be.disabled");
+ cy.contains("label", "4 Stars").click();
+
+ cy.wait(500);
+ cy.contains("Далее →").should("not.be.disabled");
+
+ cy.visit("http://localhost:3000/view");
+ cy.visit("http://localhost:3000/edit");
+
+ cy.wait(500);
+ cy.get('[data-cy="delete-question"]').click();
+
+ cy.wait(5000);
+ cy.get('[data-cy="create-question"]').click();
+
+ // Удаления Квиза
+
+ cy.visit("http://localhost:3000/list");
+ cy.wait(500);
+ cy.get('[data-cy="delete-quiz"]').each(($button) => {
+ cy.wrap($button).click();
+ cy.wait(500);
+ cy.contains("button", "Удалить").click();
+ });
+ });
+});
diff --git a/package.json b/package.json
index d27ff52f..3208fa17 100755
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"@types/react-dnd": "^3.0.2",
"@types/react-dom": "^18.0.0",
"axios": "^1.5.1",
+ "cypress-file-upload": "^5.0.8",
"cytoscape": "^3.26.0",
"cytoscape-popper": "^2.0.0",
"dayjs": "^1.11.10",
@@ -78,6 +79,6 @@
"@types/react-beautiful-dnd": "^13.1.4",
"@types/react-cytoscapejs": "^1.2.4",
"craco-alias": "^3.0.1",
- "cypress": "^13.4.0"
+ "cypress": "^13.6.1"
}
}
diff --git a/src/assets/icons/ArrowLeftSP.tsx b/src/assets/icons/ArrowLeftSP.tsx
new file mode 100644
index 00000000..1ba692e1
--- /dev/null
+++ b/src/assets/icons/ArrowLeftSP.tsx
@@ -0,0 +1,27 @@
+import {Box, SxProps, Theme, useTheme} from "@mui/material";
+
+
+interface Props {
+ right: boolean
+}
+
+export default function ArrowLeftSP({right} : Props) {
+ const theme = useTheme();
+
+ return (
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/assets/icons/CropIcon.tsx b/src/assets/icons/CropIcon.tsx
index 520e90d9..16b098a7 100644
--- a/src/assets/icons/CropIcon.tsx
+++ b/src/assets/icons/CropIcon.tsx
@@ -1,40 +1,10 @@
import { FC, SVGProps } from "react";
-export const CropIcon: FC = () => (
-