diff --git a/cypress/e2e/files/FilesUtils.ts b/cypress/e2e/files/FilesUtils.ts index 71ea341a7bf..70767b5ecf1 100644 --- a/cypress/e2e/files/FilesUtils.ts +++ b/cypress/e2e/files/FilesUtils.ts @@ -120,7 +120,10 @@ export const moveFile = (fileName: string, dirPath: string) => { if (dirPath === '/') { // select home folder - cy.get('button[title="Home"]').should('be.visible').click() + cy.get('.breadcrumb') + .findByRole('button', { name: 'All files' }) + .should('be.visible') + .click() // click move cy.contains('button', 'Move').should('be.visible').click() } else if (dirPath === '.') { @@ -151,7 +154,10 @@ export const copyFile = (fileName: string, dirPath: string) => { if (dirPath === '/') { // select home folder - cy.get('button[title="Home"]').should('be.visible').click() + cy.get('.breadcrumb') + .findByRole('button', { name: 'All files' }) + .should('be.visible') + .click() // click copy cy.contains('button', 'Copy').should('be.visible').click() } else if (dirPath === '.') { diff --git a/cypress/e2e/files/files-copy-move.cy.ts b/cypress/e2e/files/files-copy-move.cy.ts index 086248eef3c..197283bd65c 100644 --- a/cypress/e2e/files/files-copy-move.cy.ts +++ b/cypress/e2e/files/files-copy-move.cy.ts @@ -78,7 +78,7 @@ describe('Files: Move or copy files', { testIsolation: true }, () => { getRowForFile('original folder').should('not.exist') }) - it('Can move a file to its parent folder', () => { + it.only('Can move a file to its parent folder', () => { cy.mkdir(currentUser, '/new-folder') cy.uploadContent(currentUser, new Blob(), 'text/plain', '/new-folder/original.txt') cy.login(currentUser) diff --git a/cypress/e2e/files_sharing/files-copy-move.cy.ts b/cypress/e2e/files_sharing/files-copy-move.cy.ts index 6ad01cb2219..eca292e960f 100644 --- a/cypress/e2e/files_sharing/files-copy-move.cy.ts +++ b/cypress/e2e/files_sharing/files-copy-move.cy.ts @@ -40,7 +40,10 @@ export const moveFileForbidden = (fileName: string, dirPath: string) => { cy.intercept('MOVE', /\/(remote|public)\.php\/dav\/files\//).as('moveFile') // select home folder - cy.get('button[title="Home"]').should('be.visible').click() + cy.get('.breadcrumb') + .findByRole('button', { name: 'All files' }) + .should('be.visible') + .click() const directories = dirPath.split('/') directories.forEach((directory) => { diff --git a/cypress/e2e/theming/user-settings_background.cy.ts b/cypress/e2e/theming/user-settings_background.cy.ts index 8abcb5bace1..4c6ebc1df41 100644 --- a/cypress/e2e/theming/user-settings_background.cy.ts +++ b/cypress/e2e/theming/user-settings_background.cy.ts @@ -222,7 +222,7 @@ describe('User select a custom background', function() { // Pick background cy.get('[data-user-theming-background-custom]').click() cy.get('.file-picker__files tr').contains(image).click() - cy.get('.dialog__actions .button-vue--vue-primary').click() + cy.findByRole('button', { name: 'Select background' }).click() // Wait for background to be set cy.wait('@setBackground') @@ -260,7 +260,7 @@ describe('User changes settings and reload the page', function() { // Pick background cy.get('[data-user-theming-background-custom]').click() cy.get('.file-picker__files tr').contains(image).click() - cy.get('.dialog__actions .button-vue--vue-primary').click() + cy.findByRole('button', { name: 'Select background' }).click() // Wait for background to be set cy.wait('@setBackground')