From 6b5f007acdd9ad0c286c6411a6c0f9b2e364242a Mon Sep 17 00:00:00 2001 From: Peter Ringelmann Date: Tue, 9 Jun 2026 12:19:09 +0200 Subject: [PATCH] test(files): make row action-menu lookup atomic to fix detached-DOM flake Signed-off-by: Peter Ringelmann --- cypress/e2e/files/FilesUtils.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/files/FilesUtils.ts b/cypress/e2e/files/FilesUtils.ts index 2d7a28ac6d677..aa3f952e569ba 100644 --- a/cypress/e2e/files/FilesUtils.ts +++ b/cypress/e2e/files/FilesUtils.ts @@ -26,9 +26,7 @@ export const getActionButtonForFile = (filename: string) => getActionsForFile(fi export function getActionEntryForFileId(fileid: number, actionId: string) { return getActionButtonForFileId(fileid) .should('have.attr', 'aria-controls') - .then((menuId) => cy.get(`#${menuId}`) - .should('exist') - .find(`[data-cy-files-list-row-action="${CSS.escape(actionId)}"]`)) + .then((menuId) => cy.get(`#${menuId} [data-cy-files-list-row-action="${CSS.escape(actionId)}"]`)) } /** @@ -39,9 +37,7 @@ export function getActionEntryForFileId(fileid: number, actionId: string) { export function getActionEntryForFile(file: string, actionId: string) { return getActionButtonForFile(file) .should('have.attr', 'aria-controls') - .then((menuId) => cy.get(`#${menuId}`) - .should('exist') - .find(`[data-cy-files-list-row-action="${CSS.escape(actionId)}"]`)) + .then((menuId) => cy.get(`#${menuId} [data-cy-files-list-row-action="${CSS.escape(actionId)}"]`)) } /**