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
parent
commit
ed852118ac
No known key found for this signature in database GPG Key ID: 45FAE7268762B400
  1. 1
      cypress/e2e/files_sharing/FilesSharingUtils.ts
  2. 2
      cypress/e2e/files_sharing/files-copy-move.cy.ts
  3. 2
      cypress/e2e/files_sharing/note-to-recipient.cy.ts
  4. 10
      cypress/e2e/files_trashbin/files-trash-action.cy.ts

1
cypress/e2e/files_sharing/FilesSharingUtils.ts

@ -9,6 +9,7 @@ export interface ShareSetting {
read: boolean
update: boolean
delete: boolean
create: boolean
share: boolean
download: boolean
note: string

2
cypress/e2e/files_sharing/files-copy-move.cy.ts

@ -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')

2
cypress/e2e/files_sharing/note-to-recipient.cy.ts

@ -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

10
cypress/e2e/files_trashbin/files-trash-action.cy.ts

@ -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')

Loading…
Cancel
Save