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