frontAnswerer/cypress/e2e/test-BC3VT3SQB.cy.ts

38 lines
2.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

describe("БС, 3 варианты ответов, таймер 3 сек, quiz ветвящийся BC3VT3SQB", () => {
it("необходимо завершить тест тремя вопросами, проверить отсутствие заголовка 'не ветвящийся' и проверить, отключена ли кнопка назад", () => {
cy.visit("/e69d4d52-50f6-4c2a-8fb6-cf92adaf6ca0");
cy.get("body").should("be.visible");
// Проверяем первый вопрос
cy.get("#test-question-title", { timeout: 10000 }).should("be.visible");
cy.get("#test-question-title").should("contain", "первый вопрос ветвления");
cy.get("#test-prev-button").should("be.disabled");
// Проверяем второй вопрос
cy.get("#test-question-title").should("be.visible");
cy.get("#test-question-title").should("contain", "второй вопрос ветвления");
cy.get("#test-prev-button").should("be.disabled");
// Проверяем третий вопрос
cy.get("#test-question-title").should("be.visible");
cy.get("#test-question-title").should("contain", "третий вопрос ветвления");
cy.get("#test-prev-button").should("be.disabled");
// Проверяем открытие страницы с контактной формой
cy.get("#test-contact-form").should("be.visible");
// Заполняем контактную форму
cy.get('input[placeholder*="Имя"], input[placeholder*="Name"]').type("Тестовое имя");
cy.get('input[placeholder*="Email"], input[placeholder*="Почта"]').type("test@example.com");
// Соглашаемся с условиями
cy.get('input[type="checkbox"]').check();
// Нажимаем кнопку получения результатов
cy.get("button").contains("Получить результаты").click();
// Проверяем открытие страницы с результатами
cy.get("#test-result-form").should("be.visible");
});
});