diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-03-22 18:30:52 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-04-18 12:53:28 +0200 |
commit | f8d451f95f42ef410c4144cd60c1f97c3a70ad69 (patch) | |
tree | b0c655324b050d69328b157fff2e0a583de442b9 /cypress | |
parent | 2a9a5b3513c8e11f1fcbc141dabb215018d323dd (diff) | |
download | nextcloud-server-f8d451f95f42ef410c4144cd60c1f97c3a70ad69.tar.gz nextcloud-server-f8d451f95f42ef410c4144cd60c1f97c3a70ad69.zip |
fix(files): When copying nodes only add the copy suffix for file before file extension
Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress')
-rw-r--r-- | cypress/e2e/files/files_copy-move.cy.ts | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/cypress/e2e/files/files_copy-move.cy.ts b/cypress/e2e/files/files_copy-move.cy.ts index 22f8f765662..d7892dbe3ba 100644 --- a/cypress/e2e/files/files_copy-move.cy.ts +++ b/cypress/e2e/files/files_copy-move.cy.ts @@ -93,7 +93,9 @@ describe('Files: Move or copy files', { testIsolation: true }, () => { getRowForFile('new-folder').should('not.exist') }) - // This was a bug previously + /** + * Test for https://github.com/nextcloud/server/issues/41768 + */ it('Can move a file to folder with similar name', () => { cy.uploadContent(currentUser, new Blob(), 'text/plain', '/original') .mkdir(currentUser, '/original folder') @@ -180,6 +182,30 @@ describe('Files: Move or copy files', { testIsolation: true }, () => { getRowForFile('original (copy 2).txt').should('be.visible') }) + /** + * Test that a copied folder with a dot will be renamed correctly ('foo.bar' -> 'foo.bar (copy)') + * Test for: https://github.com/nextcloud/server/issues/43843 + */ + it('Can copy a folder to same folder', () => { + cy.mkdir(currentUser, '/foo.bar') + cy.login(currentUser) + cy.visit('/apps/files') + + // intercept the copy so we can wait for it + cy.intercept('COPY', /\/remote.php\/dav\/files\//).as('copyFile') + + getRowForFile('foo.bar').should('be.visible') + triggerActionForFile('foo.bar', 'move-copy') + + // click copy + cy.get('.file-picker').contains('button', 'Copy').should('be.visible').click() + + cy.wait('@copyFile') + + getRowForFile('foo.bar').should('be.visible') + getRowForFile('foo.bar (copy)').should('be.visible') + }) + /** Test for https://github.com/nextcloud/server/issues/43329 */ context('escaping file and folder names', () => { it('Can handle files with special characters', () => { |