Skip to content

Commit ca06dc8

Browse files
committed
test(files): drop menu-open wait from action helpers
The added cy.get('#menuId').should('be.visible') wait was fragile on CI and regressed files-renaming; the atomic action-button query already waits via its own should('be.visible'). Keep the atomic queries, drop the extra wait. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: Micke Nordin <kano@sunet.se>
1 parent 11ea344 commit ca06dc8

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

cypress/e2e/files/FilesUtils.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,9 @@ export function triggerActionForFileId(fileid: number, actionId: string) {
7575
.click({ force: true }) // force to avoid issues with overlaying file list header
7676
getActionButtonForFileId(fileid)
7777
.should('have.attr', 'aria-controls')
78-
.then((menuId) => {
79-
// Wait for the menu to actually open, then query the action atomically
80-
cy.get(`#${menuId}`).should('be.visible')
81-
cy.get(`#${menuId} [data-cy-files-list-row-action="${CSS.escape(actionId)}"] button`)
82-
.should('be.visible')
83-
.click()
84-
})
78+
.then((menuId) => cy.get(`#${menuId} [data-cy-files-list-row-action="${CSS.escape(actionId)}"] button`)
79+
.should('be.visible')
80+
.click())
8581
}
8682

8783
/**
@@ -96,13 +92,9 @@ export function triggerActionForFile(filename: string, actionId: string) {
9692
.click({ force: true }) // force to avoid issues with overlaying file list header
9793
getActionButtonForFile(filename)
9894
.should('have.attr', 'aria-controls')
99-
.then((menuId) => {
100-
// Wait for the menu to actually open, then query the action atomically
101-
cy.get(`#${menuId}`).should('be.visible')
102-
cy.get(`#${menuId} [data-cy-files-list-row-action="${CSS.escape(actionId)}"] button`)
103-
.should('be.visible')
104-
.click()
105-
})
95+
.then((menuId) => cy.get(`#${menuId} [data-cy-files-list-row-action="${CSS.escape(actionId)}"] button`)
96+
.should('be.visible')
97+
.click())
10698
}
10799

108100
/**

0 commit comments

Comments
 (0)