From 9de1db0729bcc61ad3d67dbf62854c9f30561d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 2 Jan 2024 10:48:57 +0100 Subject: [PATCH] Check file list is loaded before checking if a file is there MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an attempt to lower timeout possibility. Signed-off-by: Côme Chilliet --- cypress/e2e/groupfoldersUtils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cypress/e2e/groupfoldersUtils.ts b/cypress/e2e/groupfoldersUtils.ts index 38b6bfbca..6e86d1894 100644 --- a/cypress/e2e/groupfoldersUtils.ts +++ b/cypress/e2e/groupfoldersUtils.ts @@ -75,6 +75,8 @@ export function deleteGroupFolder(groupFolderId: string) { } export function fileOrFolderExists(name: string) { + // Make sure file list is loaded first + cy.get(`[data-cy-files-list-tfoot],[data-cy-files-content-empty]`).should('be.visible') cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${name}"]`).should('be.visible') } @@ -85,6 +87,8 @@ export function fileOrFolderDoesNotExist(name: string) { } export function fileOrFolderExistsInTrashbin(name: string) { + // Make sure file list is loaded first + cy.get(`[data-cy-files-list-tfoot],[data-cy-files-content-empty]`).should('be.visible') cy.get(`[data-cy-files-list] [data-cy-files-list-row-name^="${name}.d"]`).should('be.visible') }