From c6b09e9399ecb4225a61df501cdc1c4f0d573481 Mon Sep 17 00:00:00 2001 From: regularmute <93884347+Regularmute@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:07:06 +0300 Subject: [PATCH] improve instructorpage test readability, clear groups/reviews at start --- frontend/e2e/cypress/integration/instructorPage.spec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/e2e/cypress/integration/instructorPage.spec.js b/frontend/e2e/cypress/integration/instructorPage.spec.js index 8a57930..5e4fc61 100644 --- a/frontend/e2e/cypress/integration/instructorPage.spec.js +++ b/frontend/e2e/cypress/integration/instructorPage.spec.js @@ -255,8 +255,10 @@ const initTests = () => { cy.createPeerReviews(konf2vastaukset1) } -describe('Instructor review page', () => { +describe('Instructor page', () => { before(() => { + cy.deleteAllGroups() + cy.deleteAllPeerReviews() initTests() }) @@ -265,7 +267,7 @@ describe('Instructor review page', () => { cy.visit('/instructorpage') }) - it('Starting testing', () => { + it('shows correct url, contains configuration selector and displays its group', () => { // submit not successfull, still on same page cy.url().should('contain', '/instructorpage') cy.get('[data-cy=configuration-selector]').click() @@ -274,7 +276,7 @@ describe('Instructor review page', () => { cy.contains('2.50') }) - it('Change configuration twice', () => { + it('displays the corresponding groups of each configuration', () => { // submit not successfull, still on same page cy.get('[data-cy=configuration-selector]').click() cy.get('.configuration-menu-item').contains('Konfiguraatio 2').click()