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 Dec 14, 2023
1 parent 65cf519 commit 851560c
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 @@ -111,7 +111,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 851560c

Please sign in to comment.