diff --git a/cypress/e2e/admin/administrateCtlTools.feature b/cypress/e2e/admin/administrateCtlTools.feature index 27f8ce44..5baf7432 100644 --- a/cypress/e2e/admin/administrateCtlTools.feature +++ b/cypress/e2e/admin/administrateCtlTools.feature @@ -1,4 +1,4 @@ -@release +# @release Feature: Admin CTL Tools - To add, edit and delete CTL tools by the admin As an admin I want to administrate the CTL tools used in the school @@ -12,10 +12,11 @@ Feature: Admin CTL Tools - To add, edit and delete CTL tools by the admin Then I see the external tools table Then I see at least one external tool When I click on delete external tool button - Then I see the external tool deletion dialog Then I see the external tool deletion dialog title - Then I see the external tool deletion information text + Then I see the external tool deletion dialog information text When I click on cancel external tool deletion button + Then I see the external tools table + Then I see at least one external tool diff --git a/cypress/support/pages/admin/pageAdministration.js b/cypress/support/pages/admin/pageAdministration.js index fe3e4da0..bd6919b8 100644 --- a/cypress/support/pages/admin/pageAdministration.js +++ b/cypress/support/pages/admin/pageAdministration.js @@ -55,7 +55,6 @@ class Management { static #externalToolsTable = '[data-testid="external-tool-section-table"]' static #editExternalToolButton = '[data-testId="editAction"]' static #deleteExternalToolButton = '[data-testId="deleteAction"]' - static #externalToolDeletionDialog = '[data-testid="delete-dialog"]' static #confirmSExternalToolDeletionButton = '[data-testid="delete-dialog-confirm"]' static #cancelExternalToolDeletionButton = '[data-testid="delete-dialog-cancel"]' static #externalToolDeletionDialogText = '[data-testid="delete-dialog-content"]' @@ -449,11 +448,6 @@ class Management { .should('be.visible') } - seeExternalToolDeletionDialog() { - cy.get(Management.#externalToolDeletionDialog) - .should('exist') - } - seeExternalToolDeletionDialogTitle() { cy.get(Management.#externalToolDeletionDialogTitle) .should('be.visible') @@ -465,7 +459,8 @@ class Management { } seeOneOrMoreExternalTools() { - cy.get(Management.#externalToolsTable).find('tr').should('have.length.at.least', 2); + cy.get(Management.#externalToolsTable).find('tbody').find('tr') + .should('have.length.gte', 1) } } diff --git a/cypress/support/step_definition/admin/administrateCtlToolSteps.spec.js b/cypress/support/step_definition/admin/administrateCtlToolSteps.spec.js index c27b543e..e8dd30c5 100644 --- a/cypress/support/step_definition/admin/administrateCtlToolSteps.spec.js +++ b/cypress/support/step_definition/admin/administrateCtlToolSteps.spec.js @@ -19,11 +19,7 @@ Then('I see the external tools table', () => { management.seeExternalToolTable() }) -Then('I see the external tool deletion dialog', () => { - management.seeExternalToolDeletionDialog() -}) - -Then('I see the external tool deletion information text', () => { +Then('I see the external tool deletion dialog information text', () => { management.seeExternalToolDeletionDialogInfoText() })