Skip to content

Commit

Permalink
fix(cypress): users
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Jul 8, 2023
1 parent 0f52efa commit 8b10788
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cypress/e2e/settings/users.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ describe('Settings: Create and delete users', function() {
cy.visit('/settings/users')

// see that the user is in the list
cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).within(() => {
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
// see that the list of users contains the user jdoe
cy.contains(jdoe.userId).should('exist')
// open the actions menu for the user
cy.get('.userActions button.action-item__menutoggle').click()
cy.get('td.row__cell--actions button.action-item__menutoggle').click()
})

// The "Delete user" action in the actions menu is shown and clicked
cy.get('.action-item__popper .action').contains('Delete user').should('exist').click()
// And confirmation dialog accepted
cy.get('.oc-dialog button').contains(`Delete ${jdoe.userId}`).click()
// deleted clicked the user is not shown anymore
cy.get(`.user-list-grid .row[data-id="${jdoe.userId}"]`).should('not.exist')
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').should('not.be.visible')
})
})

0 comments on commit 8b10788

Please sign in to comment.