mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
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>
This commit is contained in:
parent
43de6b82ac
commit
81718a035a
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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue