Skip to content

Commit

Permalink
fix(cypress): User table create/delete tests
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Oct 5, 2023
1 parent bf91114 commit 53350bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/settings/users.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Settings: Create and delete users', function() {
})

// see that the created user is in the list
cy.get(`tbody.user-list__body tr td[data-test="john"]`).parents('tr').within(() => {
cy.get('tbody.user-list__body tr[data-test="john"]').within(() => {
// see that the list of users contains the user john
cy.contains('john').should('exist')
})
Expand Down Expand Up @@ -126,7 +126,7 @@ describe('Settings: Create and delete users', function() {
})

// see that the created user is in the list
cy.get(`tbody.user-list__body tr td[data-test="john"]`).parents('tr').within(() => {
cy.get('tbody.user-list__body tr[data-test="john"]').within(() => {
// see that the list of users contains the user john
cy.contains('john').should('exist')
})
Expand All @@ -139,7 +139,7 @@ describe('Settings: Create and delete users', function() {
cy.reload().login(admin)

// see that the user is in the list
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').within(() => {
cy.get(`tbody.user-list__body tr[data-test="${jdoe.userId}"]`).within(() => {
// see that the list of users contains the user jdoe
cy.contains(jdoe.userId).should('exist')
// open the actions menu for the user
Expand All @@ -165,6 +165,6 @@ describe('Settings: Create and delete users', function() {
})

// deleted clicked the user is not shown anymore
cy.get(`tbody.user-list__body tr td[data-test="${jdoe.userId}"]`).parents('tr').should('not.be.visible')
cy.get(`tbody.user-list__body tr[data-test="${jdoe.userId}"]`).should('not.exist')
})
})

0 comments on commit 53350bf

Please sign in to comment.