aboutsummaryrefslogtreecommitdiffstats
path: root/cypress
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-09-11 21:51:54 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-10-17 17:54:13 +0200
commit7b78a64fa877074cf44dda59c6c11e99ea194722 (patch)
treef11564a666dd6ba9093509ae9fd592b013711780 /cypress
parentc7d22f9773e52a26253bc7b00b547b40e819bb97 (diff)
downloadnextcloud-server-7b78a64fa877074cf44dda59c6c11e99ea194722.tar.gz
nextcloud-server-7b78a64fa877074cf44dda59c6c11e99ea194722.zip
test(files): Add tests for path handlingbackport/47905/stable30
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/e2e/files/duplicated-node-regression.cy.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/cypress/e2e/files/duplicated-node-regression.cy.ts b/cypress/e2e/files/duplicated-node-regression.cy.ts
new file mode 100644
index 00000000000..14355a62b9d
--- /dev/null
+++ b/cypress/e2e/files/duplicated-node-regression.cy.ts
@@ -0,0 +1,33 @@
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+import { createFolder, getRowForFile, triggerActionForFile } from './FilesUtils.ts'
+
+before(() => {
+ cy.createRandomUser()
+ .then((user) => {
+ cy.mkdir(user, '/only once')
+ cy.login(user)
+ cy.visit('/apps/files')
+ })
+})
+
+/**
+ * Regression test for https://github.com/nextcloud/server/issues/47904
+ */
+it('Ensure nodes are not duplicated in the file list', () => {
+ // See the folder
+ getRowForFile('only once').should('be.visible')
+ // Delete the folder
+ cy.intercept('DELETE', '**/remote.php/dav/**').as('deleteFolder')
+ triggerActionForFile('only once', 'delete')
+ cy.wait('@deleteFolder')
+ getRowForFile('only once').should('not.exist')
+ // Create the folder again
+ createFolder('only once')
+ // See folder exists only once
+ getRowForFile('only once')
+ .should('have.length', 1)
+})