Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): Make linter happy in cypress tests #50318

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cypress/e2e/files_sharing/FilesSharingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface ShareSetting {
read: boolean
update: boolean
delete: boolean
create: boolean
share: boolean
download: boolean
note: string
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/files_sharing/files-copy-move.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type { User } from '@nextcloud/cypress'
import { createShare } from './FilesSharingUtils.ts'
import {
getRowForFile,
moveFile,
copyFile,
navigateToFolder,
triggerActionForFile,
Expand Down Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/files_sharing/note-to-recipient.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/files_trashbin/files-trash-action.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand Down
Loading