diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-03-22 18:30:52 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-03-22 19:13:48 +0100 |
commit | b0b2811211658f5977e86c225f9026fcc03893a5 (patch) | |
tree | 108158e887b89d629a6ef12bd9c091c502c51396 /cypress | |
parent | f3f73ba25552b030d4634a63a3ccc06e59d7bb77 (diff) | |
download | nextcloud-server-b0b2811211658f5977e86c225f9026fcc03893a5.tar.gz nextcloud-server-b0b2811211658f5977e86c225f9026fcc03893a5.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 | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/cypress/e2e/files/files_copy-move.cy.ts b/cypress/e2e/files/files_copy-move.cy.ts index 7fd5b613866..7c80cb12ead 100644 --- a/cypress/e2e/files/files_copy-move.cy.ts +++ b/cypress/e2e/files/files_copy-move.cy.ts @@ -72,7 +72,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') @@ -138,8 +140,23 @@ 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') + + copyFile('foo.bar', '.') + + getRowForFile('foo.bar').should('be.visible') + getRowForFile('foo.bar (copy)').should('be.visible') + }) + /** Test for https://github.com/nextcloud/server/issues/43329 */ - context.only('escaping file and folder names', () => { + context('escaping file and folder names', () => { it('Can handle files with special characters', () => { cy.uploadContent(currentUser, new Blob(), 'text/plain', '/original.txt') .mkdir(currentUser, '/can\'t say') |