test: adjust cypress tests for changes filter behavior

In https://github.com/nextcloud/server/issues/53038 we changed the
behavior: The filename filter is reset when changing the directory.
So we need to also adjust the Cypress tests.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/55892/head
Ferdinand Thiessen 2025-10-21 19:36:29 +07:00
parent 43de6b82ac
commit 81718a035a
No known key found for this signature in database
GPG Key ID: 45FAE7268762B400
1 changed files with 25 additions and 20 deletions

@ -149,26 +149,6 @@ describe('files: Filter in files list', { testIsolation: true }, () => {
getRowForFile('folder').should('be.visible')
})
it('keeps name filter when changing the directory', () => {
// All are visible by default
getRowForFile('folder').should('be.visible')
getRowForFile('file.txt').should('be.visible')
// Set up a search query
appNavigation.searchInput()
.type('folder')
// See that only the folder is visible
getRowForFile('folder').should('be.visible')
getRowForFile('file.txt').should('not.exist')
// go to that folder
navigateToFolder('folder')
// see that the folder is also filtered
getRowForFile('text.txt').should('not.exist')
})
it('keeps type filter when changing the directory', () => {
// All are visible by default
getRowForFile('folder').should('be.visible')
@ -251,6 +231,31 @@ describe('files: Filter in files list', { testIsolation: true }, () => {
.and('have.attr', 'aria-checked', 'true')
})
/** Regression test of https://github.com/nextcloud/server/issues/53038 */
it('resets name filter when changing the directory', () => {
// All are visible by default
getRowForFile('folder').should('be.visible')
getRowForFile('file.txt').should('be.visible')
// Set up a search query
appNavigation.searchInput()
.type('folder')
// See that only the folder is visible
getRowForFile('folder').should('be.visible')
getRowForFile('file.txt').should('not.exist')
// go to that folder
navigateToFolder('folder')
// see the search is cleared
appNavigation.searchInput()
.should('have.value', '')
// see that the folder content is showed
getRowForFile('text.txt').should('be.visible')
})
it('resets filter when changing the view', () => {
// All are visible by default
getRowForFile('folder').should('be.visible')