diff options
Diffstat (limited to 'cypress/e2e/files/FilesUtils.ts')
-rw-r--r-- | cypress/e2e/files/FilesUtils.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cypress/e2e/files/FilesUtils.ts b/cypress/e2e/files/FilesUtils.ts index ed2a9ac3389..b94ad3941ec 100644 --- a/cypress/e2e/files/FilesUtils.ts +++ b/cypress/e2e/files/FilesUtils.ts @@ -121,3 +121,18 @@ export const clickOnBreadcrumbs = (label: string) => { cy.get('[data-cy-files-content-breadcrumbs]').contains(label).click() cy.wait('@propfind') } + +export const createFolder = (folderName: string) => { + cy.intercept('MKCOL', /\/remote.php\/dav\/files\//).as('createFolder') + + // TODO: replace by proper data-cy selectors + cy.get('[data-cy-upload-picker] .action-item__menutoggle').first().click() + cy.contains('.upload-picker__menu-entry button', 'New folder').click() + cy.get('[data-cy-files-new-node-dialog]').should('be.visible') + cy.get('[data-cy-files-new-node-dialog-input]').type(`{selectall}${folderName}`) + cy.get('[data-cy-files-new-node-dialog-submit]').click() + + cy.wait('@createFolder') + + getRowForFile(folderName).should('be.visible') +} |