mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
test: adjust cypress tests for updated @nextcloud/password-confirmation
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
2de1030df9
commit
90156c8037
2 changed files with 5 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ describe('Files user credentials', { testIsolation: true }, () => {
|
|||
storageDialog.should('not.exist')
|
||||
|
||||
// Storage dialog now closed, the user auth dialog should be visible
|
||||
const authDialog = cy.findByRole('dialog', { name: 'Confirm your password' })
|
||||
const authDialog = cy.findByRole('dialog', { name: 'Authentication required' })
|
||||
authDialog.should('be.visible')
|
||||
handlePasswordConfirmation(user1.password)
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ describe('Files user credentials', { testIsolation: true }, () => {
|
|||
.should('not.exist')
|
||||
|
||||
// Storage dialog now closed, the user auth dialog should be visible
|
||||
cy.findByRole('dialog', { name: 'Confirm your password' })
|
||||
cy.findByRole('dialog', { name: 'Authentication required' })
|
||||
.as('authDialog')
|
||||
.should('be.visible')
|
||||
handlePasswordConfirmation(user2.password)
|
||||
|
|
|
|||
|
|
@ -72,11 +72,12 @@ export function toggleEditButton(user: User, toEdit = true) {
|
|||
*/
|
||||
export function handlePasswordConfirmation(adminPassword = 'admin') {
|
||||
const handleModal = (context: Cypress.Chainable) => {
|
||||
return context.contains('.modal-container', 'Confirm your password')
|
||||
return context.contains('.modal-container', 'Authentication required')
|
||||
.if()
|
||||
.within(() => {
|
||||
cy.get('input[type="password"]').type(adminPassword)
|
||||
cy.get('button').contains('Confirm').click()
|
||||
cy.findByRole('button', { name: 'Confirm' })
|
||||
.click()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue