From 9f4509655a8cbba621c9d4d15115c450a2781941 Mon Sep 17 00:00:00 2001 From: silver Date: Mon, 22 Dec 2025 16:37:58 +0100 Subject: [PATCH] fix(tests): wait for btn in attachments.spec to be visible before clicking Signed-off-by: silver --- cypress/e2e/attachments.spec.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/attachments.spec.js b/cypress/e2e/attachments.spec.js index d080ffb87cd..8289032090d 100644 --- a/cypress/e2e/attachments.spec.js +++ b/cypress/e2e/attachments.spec.js @@ -195,7 +195,9 @@ describe('Test all attachment insertion methods', () => { cy.get('.file-picker [data-filename="a"]').click() cy.get('.file-picker [data-filename="a.png"]').click() - cy.get('.dialog__actions button.button-vue--vue-primary').click() + cy.get('.dialog__actions button.button-vue--vue-primary') + .should('be.visible') + .click() return waitForRequestAndCheckAttachment(requestAlias) }) @@ -212,7 +214,9 @@ describe('Test all attachment insertion methods', () => { cy.get('.file-picker [data-filename="b"]').click() cy.get('.file-picker [data-filename="b.png"]').click() - cy.get('.dialog__actions button.button-vue--vue-primary').click() + cy.get('.dialog__actions button.button-vue--vue-primary') + .should('be.visible') + .click() return waitForRequestAndCheckAttachment(requestAlias) }) @@ -229,7 +233,9 @@ describe('Test all attachment insertion methods', () => { cy.log('Select the file in the filepicker') cy.get('.file-picker [data-filename="github.png"]').click() cy.log('Click OK in the filepicker') - cy.get('.dialog__actions button.button-vue--vue-primary').click() + cy.get('.dialog__actions button.button-vue--vue-primary') + .should('be.visible') + .click() return waitForRequestAndCheckAttachment(requestAlias) })