Skip to content

Commit

Permalink
Check for deletion failure in cypress test
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Jan 2, 2024
1 parent 164040f commit c09c947
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cypress/e2e/groupfolders.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ describe('Groupfolders ACLs and trashbin behavior', () => {
cy.uploadContent(managerUser, new Blob(['Content of the file']), 'text/plain', `/${groupFolderName}/subfolder1/file1.txt`)

// Delete file
cy.logout()
cy.login(managerUser)
cy.visit('/apps/files')
enterFolder(groupFolderName)
Expand Down Expand Up @@ -240,6 +241,7 @@ describe('Groupfolders ACLs and trashbin behavior', () => {
setACLPermissions(groupFolderId, '/subfolder1', [`-${PERMISSION_READ}`], undefined, user2.userId)

// Delete file
cy.logout()
cy.login(managerUser)
cy.visit('/apps/files')
enterFolder(groupFolderName)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/groupfoldersUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export function deleteFile(name: string) {
cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${name}"] [data-cy-files-list-row-actions]`).click()
cy.get(`[data-cy-files-list] [data-cy-files-list-row-action="delete"]`).scrollIntoView()
cy.get(`[data-cy-files-list] [data-cy-files-list-row-action="delete"]`).click()
cy.wait('@delete')
cy.wait('@delete').its('response.statusCode').should('eq', 204)
}

export function restoreFile(name: string) {
Expand Down

0 comments on commit c09c947

Please sign in to comment.