test: adjust FilePicker tests to new dialogs version

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2025-10-15 13:56:43 +02:00
parent a3871346e1
commit 689cbdf790
4 changed files with 15 additions and 6 deletions

View file

@ -120,7 +120,10 @@ export const moveFile = (fileName: string, dirPath: string) => {
if (dirPath === '/') {
// select home folder
cy.get('button[title="Home"]').should('be.visible').click()
cy.get('.breadcrumb')
.findByRole('button', { name: 'All files' })
.should('be.visible')
.click()
// click move
cy.contains('button', 'Move').should('be.visible').click()
} else if (dirPath === '.') {
@ -151,7 +154,10 @@ export const copyFile = (fileName: string, dirPath: string) => {
if (dirPath === '/') {
// select home folder
cy.get('button[title="Home"]').should('be.visible').click()
cy.get('.breadcrumb')
.findByRole('button', { name: 'All files' })
.should('be.visible')
.click()
// click copy
cy.contains('button', 'Copy').should('be.visible').click()
} else if (dirPath === '.') {

View file

@ -78,7 +78,7 @@ describe('Files: Move or copy files', { testIsolation: true }, () => {
getRowForFile('original folder').should('not.exist')
})
it('Can move a file to its parent folder', () => {
it.only('Can move a file to its parent folder', () => {
cy.mkdir(currentUser, '/new-folder')
cy.uploadContent(currentUser, new Blob(), 'text/plain', '/new-folder/original.txt')
cy.login(currentUser)

View file

@ -40,7 +40,10 @@ export const moveFileForbidden = (fileName: string, dirPath: string) => {
cy.intercept('MOVE', /\/(remote|public)\.php\/dav\/files\//).as('moveFile')
// select home folder
cy.get('button[title="Home"]').should('be.visible').click()
cy.get('.breadcrumb')
.findByRole('button', { name: 'All files' })
.should('be.visible')
.click()
const directories = dirPath.split('/')
directories.forEach((directory) => {

View file

@ -222,7 +222,7 @@ describe('User select a custom background', function() {
// Pick background
cy.get('[data-user-theming-background-custom]').click()
cy.get('.file-picker__files tr').contains(image).click()
cy.get('.dialog__actions .button-vue--vue-primary').click()
cy.findByRole('button', { name: 'Select background' }).click()
// Wait for background to be set
cy.wait('@setBackground')
@ -260,7 +260,7 @@ describe('User changes settings and reload the page', function() {
// Pick background
cy.get('[data-user-theming-background-custom]').click()
cy.get('.file-picker__files tr').contains(image).click()
cy.get('.dialog__actions .button-vue--vue-primary').click()
cy.findByRole('button', { name: 'Select background' }).click()
// Wait for background to be set
cy.wait('@setBackground')