From d8dd3d605000819b55880f8f4be0ef7781911574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sat, 2 Aug 2025 23:38:30 +0200 Subject: [PATCH] fix(test): Less flaky note-to-recipient test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- cypress/e2e/files_sharing/FilesSharingUtils.ts | 4 ++++ cypress/e2e/files_sharing/note-to-recipient.cy.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/files_sharing/FilesSharingUtils.ts b/cypress/e2e/files_sharing/FilesSharingUtils.ts index d63e46914c7..bce9023e19a 100644 --- a/cypress/e2e/files_sharing/FilesSharingUtils.ts +++ b/cypress/e2e/files_sharing/FilesSharingUtils.ts @@ -30,6 +30,10 @@ export function createShare(fileName: string, username: string, shareSettings: P // HACK: Save the share and then update it, as permissions changes are currently not saved for new share. cy.get('[data-cy-files-sharing-share-editor-action="save"]').click({ scrollBehavior: 'nearest' }) + + // Success message is shown + cy.get('.toastify.toast-success').contains(/Share.+Saved/i).should('exist') + updateShare(fileName, 0, shareSettings) } diff --git a/cypress/e2e/files_sharing/note-to-recipient.cy.ts b/cypress/e2e/files_sharing/note-to-recipient.cy.ts index 8bca696e95c..08fee587d9a 100644 --- a/cypress/e2e/files_sharing/note-to-recipient.cy.ts +++ b/cypress/e2e/files_sharing/note-to-recipient.cy.ts @@ -72,7 +72,7 @@ describe('files_sharing: Note to recipient', { testIsolation: true }, () => { createShare('folder', sharee.userId, { read: true, download: true, note: 'Hello, this is the note.' }) // reload just to be sure - cy.reload() + cy.visit('/apps/files') // open the sharing tab openSharingPanel('folder')