Browse Source
chore(tests): Make linter happy in cypress tests
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/50318/head
Ferdinand Thiessen
11 months ago
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
4 changed files with
7 additions and
8 deletions
-
cypress/e2e/files_sharing/FilesSharingUtils.ts
-
cypress/e2e/files_sharing/files-copy-move.cy.ts
-
cypress/e2e/files_sharing/note-to-recipient.cy.ts
-
cypress/e2e/files_trashbin/files-trash-action.cy.ts
|
|
|
@ -9,6 +9,7 @@ export interface ShareSetting { |
|
|
|
read: boolean |
|
|
|
update: boolean |
|
|
|
delete: boolean |
|
|
|
create: boolean |
|
|
|
share: boolean |
|
|
|
download: boolean |
|
|
|
note: string |
|
|
|
|
|
|
|
@ -6,7 +6,6 @@ import type { User } from '@nextcloud/cypress' |
|
|
|
import { createShare } from './FilesSharingUtils.ts' |
|
|
|
import { |
|
|
|
getRowForFile, |
|
|
|
moveFile, |
|
|
|
copyFile, |
|
|
|
navigateToFolder, |
|
|
|
triggerActionForFile, |
|
|
|
@ -66,7 +65,6 @@ describe('files_sharing: Move or copy files', { testIsolation: true }, () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
it('can create a file in a shared folder', () => { |
|
|
|
// share the folder
|
|
|
|
cy.mkdir(user, '/folder') |
|
|
|
|
|
|
|
@ -4,7 +4,7 @@ |
|
|
|
*/ |
|
|
|
import type { User } from '@nextcloud/cypress' |
|
|
|
import { createShare, openSharingPanel } from './FilesSharingUtils.ts' |
|
|
|
import { getRowForFile, navigateToFolder } from '../files/FilesUtils.ts' |
|
|
|
import { navigateToFolder } from '../files/FilesUtils.ts' |
|
|
|
|
|
|
|
describe('files_sharing: Note to recipient', { testIsolation: true }, () => { |
|
|
|
let user: User |
|
|
|
|
|
|
|
@ -12,10 +12,10 @@ describe('files_trashbin: Empty trashbin action', { testIsolation: true }, () => |
|
|
|
beforeEach(() => { |
|
|
|
cy.createRandomUser().then(($user) => { |
|
|
|
user = $user |
|
|
|
// create 10 fake files
|
|
|
|
new Array(FILE_COUNT).fill(0).forEach((_, index) => { |
|
|
|
// create 5 fake files
|
|
|
|
for (let index = 0; index < FILE_COUNT; index++) { |
|
|
|
cy.uploadContent(user, new Blob(['<content>']), 'text/plain', `/file${index}.txt`) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
cy.login(user) |
|
|
|
cy.visit('/apps/files') |
|
|
|
@ -44,9 +44,9 @@ describe('files_trashbin: Empty trashbin action', { testIsolation: true }, () => |
|
|
|
|
|
|
|
it('Can empty trashbin', () => { |
|
|
|
// Delete files from home
|
|
|
|
new Array(FILE_COUNT).fill(0).forEach((_, index) => { |
|
|
|
for (let index = 0; index < FILE_COUNT; index++) { |
|
|
|
deleteFileWithRequest(user, `/file${index}.txt`) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// Home have no files (or the default welcome file)
|
|
|
|
cy.visit('/apps/files') |
|
|
|
|