aboutsummaryrefslogtreecommitdiffstats
path: root/cypress
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-25 01:23:59 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-25 01:24:26 +0200
commit80d797edf3538fb26f139b4f50fd1eec939a0a3b (patch)
treeda14624e34abc045d495d0b48ba88c02176a2dc2 /cypress
parent5dc8e06014f1f8b7197ec6bf8c030b4978f23da2 (diff)
downloadnextcloud-server-80d797edf3538fb26f139b4f50fd1eec939a0a3b.tar.gz
nextcloud-server-80d797edf3538fb26f139b4f50fd1eec939a0a3b.zip
fix: Ensure displayname is a string
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/e2e/files/files_sorting.cy.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/cypress/e2e/files/files_sorting.cy.ts b/cypress/e2e/files/files_sorting.cy.ts
index 925f2f7f590..250c5f195a6 100644
--- a/cypress/e2e/files/files_sorting.cy.ts
+++ b/cypress/e2e/files/files_sorting.cy.ts
@@ -41,6 +41,31 @@ describe('Files: Sorting the file list', { testIsolation: true }, () => {
})
})
+ /**
+ * Regression test of https://github.com/nextcloud/server/issues/45829
+ */
+ it('Filesnames with numbers are sorted by name ascending by default', () => {
+ cy.uploadContent(currentUser, new Blob(), 'text/plain', '/name.txt')
+ .uploadContent(currentUser, new Blob(), 'text/plain', '/name_03.txt')
+ .uploadContent(currentUser, new Blob(), 'text/plain', '/name_02.txt')
+ .uploadContent(currentUser, new Blob(), 'text/plain', '/name_01.txt')
+ cy.login(currentUser)
+ cy.visit('/apps/files')
+
+ cy.get('[data-cy-files-list-row]').each(($row, index) => {
+ switch (index) {
+ case 0: expect($row.attr('data-cy-files-list-row-name')).to.eq('name.txt')
+ break
+ case 1: expect($row.attr('data-cy-files-list-row-name')).to.eq('name_01.txt')
+ break
+ case 2: expect($row.attr('data-cy-files-list-row-name')).to.eq('name_02.txt')
+ break
+ case 3: expect($row.attr('data-cy-files-list-row-name')).to.eq('name_03.txt')
+ break
+ }
+ })
+ })
+
it('Can sort by size', () => {
cy.uploadContent(currentUser, new Blob(), 'text/plain', '/1 tiny.txt')
.uploadContent(currentUser, new Blob(['a'.repeat(1024)]), 'text/plain', '/z big.txt')