Skip to content

Commit

Permalink
adjust test
Browse files Browse the repository at this point in the history
  • Loading branch information
MBergCap committed Nov 22, 2023
1 parent 4b7e168 commit 0bb124d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
7 changes: 4 additions & 3 deletions cypress/e2e/admin/administrateCtlTools.feature
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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



9 changes: 2 additions & 7 deletions cypress/support/pages/admin/pageAdministration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'
Expand Down Expand Up @@ -449,11 +448,6 @@ class Management {
.should('be.visible')
}

seeExternalToolDeletionDialog() {
cy.get(Management.#externalToolDeletionDialog)
.should('exist')
}

seeExternalToolDeletionDialogTitle() {
cy.get(Management.#externalToolDeletionDialogTitle)
.should('be.visible')
Expand All @@ -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)
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})

Expand Down

0 comments on commit 0bb124d

Please sign in to comment.