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
Re-enable the move action in cy tests
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge authored and backportbot-nextcloud[bot] committed Dec 7, 2023
commit 39222c7597a65bcf4fa8a8d030c9f9a30d601022
16 changes: 9 additions & 7 deletions cypress/e2e/filesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,26 @@ export function renameFile(fileName: string, newName: string) {
}

export function goToDir(dirName: string) {
cy.get(`.files-fileList tr[data-file="${dirName}"]`).click()
cy.get(`[data-cy-files-list] [data-cy-files-list-row-name="${dirName}"]`).click()
cy.wait(500)
}

export function createFolder (dirName: string) {
cy.get('.files-list__header .breadcrumb__actions button.action-item__menutoggle').click()
cy.get('v-popper__popper').contains('New folder').click()
cy.get('.files-list form.files-list__row-rename input[type="text"]').type(dirName)
cy.get('.v-popper__popper').contains('New folder').click()
cy.get('.files-list form.files-list__row-rename input[type="text"]').clear().type(`${dirName}{enter}`)
cy.log('Created folder', dirName)
cy.wait(500)
}

export function moveFile (fileName: string, dirName: string) {
toggleMenuAction(fileName)
cy.get(`[data-cy-files-list] [data-cy-files-list-row-action="movecopy]"`).click()
cy.get(`.oc-dialog tr[data-entryname="${dirName}"]`).click()
cy.contains(`Move to ${dirName}`).click()
cy.wait(500)
cy.get(`[data-cy-files-list] [data-cy-files-list-row-action="move-copy"]`).click()
cy.get('.file-picker').within(() => {
cy.get(`[data-filename="${dirName}"]`).click()
cy.contains(`Move to ${dirName}`).click()
cy.wait(500)
})
}

export function toggleMenuAction(fileName: string) {
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/sidebar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ describe('Check activity listing in the sidebar', { testIsolation: true }, () =>
cy.get('.activity-entry').first().should('contains.text', 'You renamed')
})

// Re-enable when move action is implement in F2V
xit('Has move activity', () => {
it('Has move activity', () => {
createFolder('Test folder')
moveFile('welcome.txt', 'Test folder')
goToDir('Test folder')
Expand Down