diff --git a/cypress/e2e/files_external/files-user-credentials.cy.ts b/cypress/e2e/files_external/files-user-credentials.cy.ts index b20b06b69ba..bd36c795db5 100644 --- a/cypress/e2e/files_external/files-user-credentials.cy.ts +++ b/cypress/e2e/files_external/files-user-credentials.cy.ts @@ -62,7 +62,7 @@ describe('Files user credentials', { testIsolation: true }, () => { cy.get('@storageDialog').should('not.exist') // Storage dialog now closed, the user auth dialog should be visible - cy.findByRole('dialog', { name: 'Confirm your password' }).as('authDialog') + cy.findByRole('dialog', { name: 'Authentication required' }).as('authDialog') cy.get('@authDialog').should('be.visible') handlePasswordConfirmation(user1.password) @@ -104,7 +104,7 @@ describe('Files user credentials', { testIsolation: true }, () => { cy.get('@storageDialog').should('not.exist') // Storage dialog now closed, the user auth dialog should be visible - cy.findByRole('dialog', { name: 'Confirm your password' }).as('authDialog') + cy.findByRole('dialog', { name: 'Authentication required' }).as('authDialog') cy.get('@authDialog').should('be.visible') handlePasswordConfirmation(user2.password) diff --git a/cypress/e2e/files_external/settings.cy.ts b/cypress/e2e/files_external/settings.cy.ts index 9f017bbf951..99fe4cc2a15 100644 --- a/cypress/e2e/files_external/settings.cy.ts +++ b/cypress/e2e/files_external/settings.cy.ts @@ -62,7 +62,7 @@ describe('files_external settings', () => { .click() }) - cy.findByRole('dialog', { name: 'Confirm your password' }) + cy.findByRole('dialog', { name: 'Authentication required' }) .should('not.exist') }) @@ -79,7 +79,7 @@ describe('files_external settings', () => { .click() }) - cy.findByRole('dialog', { name: 'Confirm your password' }) + cy.findByRole('dialog', { name: 'Authentication required' }) .should('not.exist') }) @@ -98,7 +98,7 @@ describe('files_external settings', () => { .click() }) - cy.findByRole('dialog', { name: 'Confirm your password' }) + cy.findByRole('dialog', { name: 'Authentication required' }) .should('be.visible') }) }) diff --git a/cypress/e2e/settings/usersUtils.ts b/cypress/e2e/settings/usersUtils.ts index 7d8ea55d35b..d1c1b0bc8df 100644 --- a/cypress/e2e/settings/usersUtils.ts +++ b/cypress/e2e/settings/usersUtils.ts @@ -72,11 +72,13 @@ 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.get('input[type="password"]') + .type(adminPassword) + cy.findByRole('button', { name: 'Confirm' }) + .click() }) }