diff --git a/cypress/e2e/files/files-filtering.cy.ts b/cypress/e2e/files/files-filtering.cy.ts index 521ba8ad7ee16..47516cc15ae46 100644 --- a/cypress/e2e/files/files-filtering.cy.ts +++ b/cypress/e2e/files/files-filtering.cy.ts @@ -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')