mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore(ci): Use the proper helper function to trigger action on selected rows
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
3771f4f9d6
commit
622e06117d
2 changed files with 7 additions and 29 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import type { User } from '@nextcloud/e2e-test-server/cypress'
|
||||
|
||||
import { getRowForFile, navigateToFolder, selectAllFiles, triggerActionForFile } from './FilesUtils.ts'
|
||||
import { getRowForFile, navigateToFolder, selectAllFiles, triggerActionForFile, triggerSelectionAction } from './FilesUtils.ts'
|
||||
|
||||
describe('files: Delete files using file actions', { testIsolation: true }, () => {
|
||||
let user: User
|
||||
|
|
@ -50,12 +50,7 @@ describe('files: Delete files using file actions', { testIsolation: true }, () =
|
|||
|
||||
// select all
|
||||
selectAllFiles()
|
||||
cy.get('[data-cy-files-list-selection-actions]')
|
||||
.findByRole('button', { name: 'Actions' })
|
||||
.click()
|
||||
cy.get('[data-cy-files-list-selection-action="delete"]')
|
||||
.findByRole('menuitem', { name: /^Delete files/ })
|
||||
.click()
|
||||
triggerSelectionAction('delete')
|
||||
|
||||
// see dialog for confirmation
|
||||
cy.findByRole('dialog', { name: 'Confirm deletion' })
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import type { User } from '@nextcloud/e2e-test-server/cypress'
|
|||
import { zipFileContains } from '../../support/utils/assertions.ts'
|
||||
import { deleteDownloadsFolderBeforeEach } from '../../support/utils/deleteDownloadsFolder.ts'
|
||||
import { randomString } from '../../support/utils/randomString.ts'
|
||||
import { getRowForFile, navigateToFolder, triggerActionForFile } from './FilesUtils.ts'
|
||||
import { getRowForFile, navigateToFolder, triggerActionForFile, triggerSelectionAction } from './FilesUtils.ts'
|
||||
|
||||
describe('files: Download files using file actions', { testIsolation: true }, () => {
|
||||
let user: User
|
||||
|
|
@ -194,12 +194,7 @@ describe('files: Download files using selection', () => {
|
|||
})
|
||||
|
||||
// click download
|
||||
cy.get('[data-cy-files-list-selection-actions]')
|
||||
.findByRole('button', { name: 'Actions' })
|
||||
.click()
|
||||
cy.findByRole('menuitem', { name: 'Download (selected)' })
|
||||
.should('be.visible')
|
||||
.click()
|
||||
triggerSelectionAction('download')
|
||||
|
||||
// check a file is downloaded
|
||||
const downloadsFolder = Cypress.config('downloadsFolder')
|
||||
|
|
@ -237,11 +232,7 @@ describe('files: Download files using selection', () => {
|
|||
})
|
||||
|
||||
// click download
|
||||
cy.get('[data-cy-files-list-selection-actions]')
|
||||
.findByRole('button', { name: 'Actions' })
|
||||
.click()
|
||||
cy.findByRole('menuitem', { name: 'Download (selected)' })
|
||||
.click()
|
||||
triggerSelectionAction('download')
|
||||
|
||||
// check a file is downloaded
|
||||
const downloadsFolder = Cypress.config('downloadsFolder')
|
||||
|
|
@ -282,11 +273,7 @@ describe('files: Download files using selection', () => {
|
|||
})
|
||||
|
||||
// click download
|
||||
cy.get('[data-cy-files-list-selection-actions]')
|
||||
.findByRole('button', { name: 'Actions' })
|
||||
.click()
|
||||
cy.findByRole('menuitem', { name: 'Download (selected)' })
|
||||
.click()
|
||||
triggerSelectionAction('download')
|
||||
|
||||
// check a file is downloaded
|
||||
const downloadsFolder = Cypress.config('downloadsFolder')
|
||||
|
|
@ -330,11 +317,7 @@ describe('files: Download files using selection', () => {
|
|||
})
|
||||
|
||||
// click download
|
||||
cy.get('[data-cy-files-list-selection-actions]')
|
||||
.findByRole('button', { name: 'Actions' })
|
||||
.click()
|
||||
cy.findByRole('menuitem', { name: 'Download (selected)' })
|
||||
.click()
|
||||
triggerSelectionAction('download')
|
||||
|
||||
// check a file is downloaded
|
||||
const downloadsFolder = Cypress.config('downloadsFolder')
|
||||
|
|
|
|||
Loading…
Reference in a new issue