Skip to content

Commit

Permalink
Check file list is loaded before checking if a file is there
Browse files Browse the repository at this point in the history
This is an attempt to lower timeout possibility.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Jan 2, 2024
1 parent 3a4b3d4 commit bd21518
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cypress/e2e/groupfoldersUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand All @@ -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')
}

Expand Down

0 comments on commit bd21518

Please sign in to comment.