fix(cypress): Handle password confirmation dialog at the right time

According to failed CI it shows up earlier than expected when deleting a user

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-04-08 09:21:53 +02:00
parent b42a13f5df
commit baa79a9c40
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -115,12 +115,13 @@ describe('Settings: Create and delete accounts', function() {
// The "Delete account" action in the actions menu is shown and clicked
cy.get('.action-item__popper .action').contains('Delete account').should('exist').click({ force: true })
// And confirmation dialog accepted
cy.get('.nc-generic-dialog button').contains(`Delete ${testUser.userId}`).click({ force: true })
// Make sure no confirmation modal is shown
handlePasswordConfirmation(admin.password)
// And confirmation dialog accepted
cy.get('.nc-generic-dialog button').contains(`Delete ${testUser.userId}`).click({ force: true })
// deleted clicked the user is not shown anymore
getUserListRow(testUser.userId).should('not.exist')
})