Skip to content
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
6 changes: 4 additions & 2 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { configureNextcloud, startNextcloud, stopNextcloud, waitOnNextcloud } from '@nextcloud/cypress/docker'
import { configureNextcloud, runOcc, startNextcloud, stopNextcloud, waitOnNextcloud } from '@nextcloud/cypress/docker'
// eslint-disable-next-line n/no-extraneous-import
import { defineConfig } from 'cypress'

Expand Down Expand Up @@ -92,7 +92,9 @@ export default defineConfig({
// Setting container's IP as base Url
config.baseUrl = `http://${ip}/index.php`
await waitOnNextcloud(ip)
await configureNextcloud(['viewer'])
await configureNextcloud(['viewer', 'activity'])
// NC 34+ requires Chrome 142+ but Cypress uses Electron 118 — disable the browser check
await runOcc(['config:system:set', 'no_unsupported_browser_warning', '--value', 'true', '--type', 'boolean'])
return config
},
},
Expand Down
9 changes: 6 additions & 3 deletions cypress/e2e/filesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,16 @@ export function moveFile (fileName: string, dirName: string) {
}

export function getFileListRow(filename: string) {
return cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${CSS.escape(filename)}"]`)
return cy.get(`[data-cy-files-list-row-name="${CSS.escape(filename)}"]`)
}

export function toggleMenuAction(filename: string, action: 'details'|'favorite'|'move-copy'|'rename') {
// Wait for the preview to be loaded before interacting — ensures the row has
// finished receiving metadata updates (shares, tags, etc.) so that opening the
// actions menu won't be interrupted by a Vue re-render.
getFileListRow(filename)
.find('[data-cy-files-list-row-actions]')
.should('be.visible')
.find('.files-list__row-icon-preview--loaded')
.should('exist')

getFileListRow(filename)
.find('[data-cy-files-list-row-actions]')
Expand Down
Loading