diff options
author | Louis Chemineau <louis@chmn.me> | 2024-11-26 11:23:19 +0100 |
---|---|---|
committer | Louis Chemineau <louis@chmn.me> | 2024-12-04 16:23:39 +0100 |
commit | 8be7b9ea40e7e925d2d2f0adf2e3d6b166f0a1fa (patch) | |
tree | 849b396742b717ae41394374d95498315232a0f6 /cypress/e2e | |
parent | 10c6f70778dff0a367703cc2f49f361e59c6d470 (diff) | |
download | nextcloud-server-8be7b9ea40e7e925d2d2f0adf2e3d6b166f0a1fa.tar.gz nextcloud-server-8be7b9ea40e7e925d2d2f0adf2e3d6b166f0a1fa.zip |
fix: Copying a live photo to a folder with a conflicting mov file
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'cypress/e2e')
-rw-r--r-- | cypress/e2e/files/FilesUtils.ts | 2 | ||||
-rw-r--r-- | cypress/e2e/files/live_photos.cy.ts | 22 |
2 files changed, 18 insertions, 6 deletions
diff --git a/cypress/e2e/files/FilesUtils.ts b/cypress/e2e/files/FilesUtils.ts index f435272b9a2..6a62ff77e86 100644 --- a/cypress/e2e/files/FilesUtils.ts +++ b/cypress/e2e/files/FilesUtils.ts @@ -159,7 +159,7 @@ export const createFolder = (folderName: string) => { // 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-upload-picker-menu-entry="newFolder"] button').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() diff --git a/cypress/e2e/files/live_photos.cy.ts b/cypress/e2e/files/live_photos.cy.ts index 04c6775a398..8eb4efaaec0 100644 --- a/cypress/e2e/files/live_photos.cy.ts +++ b/cypress/e2e/files/live_photos.cy.ts @@ -68,21 +68,33 @@ describe('Files: Live photos', { testIsolation: true }, () => { getRowForFile(`${randomFileName} (copy).mov`).should('have.length', 1) }) - it.only('Keeps live photo link when copying folder', () => { - setShowHiddenFiles(false) - + it('Keeps live photo link when copying folder', () => { createFolder('folder') moveFile(`${randomFileName}.jpg`, 'folder') copyFile('folder', '.') navigateToFolder('folder (copy)') getRowForFile(`${randomFileName}.jpg`).should('have.length', 1) - getRowForFile(`${randomFileName}.mov`).should('have.length', 0) + getRowForFile(`${randomFileName}.mov`).should('have.length', 1) - setShowHiddenFiles(true) + setShowHiddenFiles(false) getRowForFile(`${randomFileName}.jpg`).should('have.length', 1) + getRowForFile(`${randomFileName}.mov`).should('have.length', 0) + }) + + it('Block copying live photo in a folder containing a mov file with the same name', () => { + createFolder('folder') + cy.uploadContent(user, new Blob(['mov file'], { type: 'video/mov' }), 'video/mov', `/folder/${randomFileName}.mov`) + cy.login(user) + cy.visit('/apps/files') + copyFile(`${randomFileName}.jpg`, 'folder') + navigateToFolder('folder') + + cy.get('[data-cy-files-list-row-fileid]').should('have.length', 1) getRowForFile(`${randomFileName}.mov`).should('have.length', 1) + getRowForFile(`${randomFileName}.jpg`).should('have.length', 0) + getRowForFile(`${randomFileName} (copy).jpg`).should('have.length', 0) }) it('Moves files when moving the .jpg', () => { |