mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
test: adjust FilePicker tests to new dialogs version
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
a3871346e1
commit
689cbdf790
4 changed files with 15 additions and 6 deletions
|
|
@ -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 === '.') {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue