From 70522c2d3d77cacd806b880e1b4437f0222989ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 11 May 2026 11:07:13 +0200 Subject: [PATCH] chore(ci): Use the proper helper function to trigger action on selected rows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- cypress/e2e/files/files-delete.cy.ts | 7 +------ cypress/e2e/files/files-download.cy.ts | 25 ++++--------------------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/cypress/e2e/files/files-delete.cy.ts b/cypress/e2e/files/files-delete.cy.ts index edb88519c59..1225b332413 100644 --- a/cypress/e2e/files/files-delete.cy.ts +++ b/cypress/e2e/files/files-delete.cy.ts @@ -49,12 +49,7 @@ describe('files: Delete files using file actions', { testIsolation: true }, () = // select all selectAllFiles() - cy.get('[data-cy-files-list-selection-actions]') - .findByRole('button', { name: 'Actions' }) - .click() - cy.get('[data-cy-files-list-selection-action="delete"]') - .findByRole('menuitem', { name: /^Delete files/ }) - .click() + triggerSelectionAction('delete') // see dialog for confirmation cy.findByRole('dialog', { name: 'Confirm deletion' }) diff --git a/cypress/e2e/files/files-download.cy.ts b/cypress/e2e/files/files-download.cy.ts index 06eb62094b8..50ec1ccde43 100644 --- a/cypress/e2e/files/files-download.cy.ts +++ b/cypress/e2e/files/files-download.cy.ts @@ -195,12 +195,7 @@ describe('files: Download files using selection', () => { }) // click download - cy.get('[data-cy-files-list-selection-actions]') - .findByRole('button', { name: 'Actions' }) - .click() - cy.findByRole('menuitem', { name: 'Download (selected)' }) - .should('be.visible') - .click() + triggerSelectionAction('download') // check a file is downloaded const downloadsFolder = Cypress.config('downloadsFolder') @@ -238,11 +233,7 @@ describe('files: Download files using selection', () => { }) // click download - cy.get('[data-cy-files-list-selection-actions]') - .findByRole('button', { name: 'Actions' }) - .click() - cy.findByRole('menuitem', { name: 'Download (selected)' }) - .click() + triggerSelectionAction('download') // check a file is downloaded const downloadsFolder = Cypress.config('downloadsFolder') @@ -283,11 +274,7 @@ describe('files: Download files using selection', () => { }) // click download - cy.get('[data-cy-files-list-selection-actions]') - .findByRole('button', { name: 'Actions' }) - .click() - cy.findByRole('menuitem', { name: 'Download (selected)' }) - .click() + triggerSelectionAction('download') // check a file is downloaded const downloadsFolder = Cypress.config('downloadsFolder') @@ -331,11 +318,7 @@ describe('files: Download files using selection', () => { }) // click download - cy.get('[data-cy-files-list-selection-actions]') - .findByRole('button', { name: 'Actions' }) - .click() - cy.findByRole('menuitem', { name: 'Download (selected)' }) - .click() + triggerSelectionAction('download') // check a file is downloaded const downloadsFolder = Cypress.config('downloadsFolder')