Skip to content

Commit 15dfb03

Browse files
susnuxAndyScherzinger
authored andcommitted
fix: Ensure displayname is a string
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> [skip ci]
1 parent 53d9f83 commit 15dfb03

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

cypress/e2e/files/files_sorting.cy.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,31 @@ describe('Files: Sorting the file list', { testIsolation: true }, () => {
5858
})
5959
})
6060

61+
/**
62+
* Regression test of https://github.com/nextcloud/server/issues/45829
63+
*/
64+
it('Filesnames with numbers are sorted by name ascending by default', () => {
65+
cy.uploadContent(currentUser, new Blob(), 'text/plain', '/name.txt')
66+
.uploadContent(currentUser, new Blob(), 'text/plain', '/name_03.txt')
67+
.uploadContent(currentUser, new Blob(), 'text/plain', '/name_02.txt')
68+
.uploadContent(currentUser, new Blob(), 'text/plain', '/name_01.txt')
69+
cy.login(currentUser)
70+
cy.visit('/apps/files')
71+
72+
cy.get('[data-cy-files-list-row]').each(($row, index) => {
73+
switch (index) {
74+
case 0: expect($row.attr('data-cy-files-list-row-name')).to.eq('name.txt')
75+
break
76+
case 1: expect($row.attr('data-cy-files-list-row-name')).to.eq('name_01.txt')
77+
break
78+
case 2: expect($row.attr('data-cy-files-list-row-name')).to.eq('name_02.txt')
79+
break
80+
case 3: expect($row.attr('data-cy-files-list-row-name')).to.eq('name_03.txt')
81+
break
82+
}
83+
})
84+
})
85+
6186
it('Can sort by size', () => {
6287
cy.uploadContent(currentUser, new Blob(), 'text/plain', '/1 tiny.txt')
6388
.uploadContent(currentUser, new Blob(['a'.repeat(1024)]), 'text/plain', '/z big.txt')

0 commit comments

Comments
 (0)