Skip to content

Commit

Permalink
fix: adjust tests for new @nextcloud/files update
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv committed Oct 20, 2023
1 parent 552a198 commit bffe87f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cypress/components/UploadPicker.cy.ts
@@ -1,7 +1,7 @@
/* eslint-disable no-unused-expressions */
// dist file might not be built when running eslint only
// eslint-disable-next-line import/no-unresolved,n/no-missing-import
import { Folder, Permission, addNewFileMenuEntry, Entry } from '@nextcloud/files'
import { Folder, Permission, addNewFileMenuEntry, type Entry } from '@nextcloud/files'
import { UploadPicker, getUploader } from '../../dist/index.mjs'
import { generateRemoteUrl } from '@nextcloud/router'

Expand Down Expand Up @@ -50,7 +50,7 @@ describe('NewFileMenu handling', () => {
displayName: 'Create empty file',
templateName: 'New file',
iconClass: 'icon-file',
if: (folder: Folder) => (folder.permissions & Permission.CREATE) !== 0,
enabled: (folder: Folder) => (folder.permissions & Permission.CREATE) !== 0,
handler() {},
} as Entry

Expand Down Expand Up @@ -117,6 +117,8 @@ describe('NewFileMenu handling', () => {
root: '/files/user',
}))
})

// Menu should not be visible anymore
cy.get('[data-cy-upload-picker] .action-item__menutoggle')
.as('menuButton')
.should('not.exist')
Expand Down

0 comments on commit bffe87f

Please sign in to comment.