@@ -148,26 +148,6 @@ describe('files: Filter in files list', { testIsolation: true }, () => {
148148 getRowForFile ( 'folder' ) . should ( 'be.visible' )
149149 } )
150150
151- it ( 'keeps name filter when changing the directory' , ( ) => {
152- // All are visible by default
153- getRowForFile ( 'folder' ) . should ( 'be.visible' )
154- getRowForFile ( 'file.txt' ) . should ( 'be.visible' )
155-
156- // Set up a search query
157- appNavigation . searchInput ( )
158- . type ( 'folder' )
159-
160- // See that only the folder is visible
161- getRowForFile ( 'folder' ) . should ( 'be.visible' )
162- getRowForFile ( 'file.txt' ) . should ( 'not.exist' )
163-
164- // go to that folder
165- navigateToFolder ( 'folder' )
166-
167- // see that the folder is also filtered
168- getRowForFile ( 'text.txt' ) . should ( 'not.exist' )
169- } )
170-
171151 it ( 'keeps type filter when changing the directory' , ( ) => {
172152 // All are visible by default
173153 getRowForFile ( 'folder' ) . should ( 'be.visible' )
@@ -250,6 +230,31 @@ describe('files: Filter in files list', { testIsolation: true }, () => {
250230 . and ( 'have.attr' , 'aria-checked' , 'true' )
251231 } )
252232
233+ /** Regression test of https://github.com/nextcloud/server/issues/53038 */
234+ it ( 'resets name filter when changing the directory' , ( ) => {
235+ // All are visible by default
236+ getRowForFile ( 'folder' ) . should ( 'be.visible' )
237+ getRowForFile ( 'file.txt' ) . should ( 'be.visible' )
238+
239+ // Set up a search query
240+ appNavigation . searchInput ( )
241+ . type ( 'folder' )
242+
243+ // See that only the folder is visible
244+ getRowForFile ( 'folder' ) . should ( 'be.visible' )
245+ getRowForFile ( 'file.txt' ) . should ( 'not.exist' )
246+
247+ // go to that folder
248+ navigateToFolder ( 'folder' )
249+
250+ // see the search is cleared
251+ appNavigation . searchInput ( )
252+ . should ( 'have.value' , '' )
253+
254+ // see that the folder content is showed
255+ getRowForFile ( 'text.txt' ) . should ( 'be.visible' )
256+ } )
257+
253258 it ( 'resets filter when changing the view' , ( ) => {
254259 // All are visible by default
255260 getRowForFile ( 'folder' ) . should ( 'be.visible' )
0 commit comments