aboutsummaryrefslogtreecommitdiffstats
path: root/cypress/e2e/files/FilesUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cypress/e2e/files/FilesUtils.ts')
-rw-r--r--cypress/e2e/files/FilesUtils.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/cypress/e2e/files/FilesUtils.ts b/cypress/e2e/files/FilesUtils.ts
index 345b6402f1f..0f2b1154200 100644
--- a/cypress/e2e/files/FilesUtils.ts
+++ b/cypress/e2e/files/FilesUtils.ts
@@ -9,8 +9,8 @@ export const getRowForFile = (filename: string) => cy.get(`[data-cy-files-list-r
export const getActionsForFileId = (fileid: number) => getRowForFileId(fileid).find('[data-cy-files-list-row-actions]')
export const getActionsForFile = (filename: string) => getRowForFile(filename).find('[data-cy-files-list-row-actions]')
-export const getActionButtonForFileId = (fileid: number) => getActionsForFileId(fileid).find('button[aria-label="Actions"]')
-export const getActionButtonForFile = (filename: string) => getActionsForFile(filename).find('button[aria-label="Actions"]')
+export const getActionButtonForFileId = (fileid: number) => getActionsForFileId(fileid).findByRole('button', { name: 'Actions' })
+export const getActionButtonForFile = (filename: string) => getActionsForFile(filename).findByRole('button', { name: 'Actions' })
export const triggerActionForFileId = (fileid: number, actionId: string) => {
getActionButtonForFileId(fileid).click()
@@ -34,7 +34,7 @@ export const moveFile = (fileName: string, dirPath: string) => {
cy.get('.file-picker').within(() => {
// intercept the copy so we can wait for it
- cy.intercept('MOVE', /\/remote.php\/dav\/files\//).as('moveFile')
+ cy.intercept('MOVE', /\/(remote|public)\.php\/dav\/files\//).as('moveFile')
if (dirPath === '/') {
// select home folder
@@ -65,7 +65,7 @@ export const copyFile = (fileName: string, dirPath: string) => {
cy.get('.file-picker').within(() => {
// intercept the copy so we can wait for it
- cy.intercept('COPY', /\/remote.php\/dav\/files\//).as('copyFile')
+ cy.intercept('COPY', /\/(remote|public)\.php\/dav\/files\//).as('copyFile')
if (dirPath === '/') {
// select home folder
@@ -95,7 +95,7 @@ export const renameFile = (fileName: string, newFileName: string) => {
triggerActionForFile(fileName, 'rename')
// intercept the move so we can wait for it
- cy.intercept('MOVE', /\/remote.php\/dav\/files\//).as('moveFile')
+ cy.intercept('MOVE', /\/(remote|public)\.php\/dav\/files\//).as('moveFile')
getRowForFile(fileName).find('[data-cy-files-list-row-name] input').clear()
getRowForFile(fileName).find('[data-cy-files-list-row-name] input').type(`${newFileName}{enter}`)