@@ -212,6 +212,45 @@ describe("R2 Bucket", () => {
212212 await waitForText ( "images/" ) ;
213213 await waitForText ( "documents/" ) ;
214214 } ) ;
215+
216+ test ( "delimiter param persists when navigating to an object and back" , async ( {
217+ expect,
218+ } ) => {
219+ await navigateToR2Bucket ( "my-bucket" ) ;
220+ await waitForTableRows ( 1 ) ;
221+
222+ // Switch to ungrouped mode (sets delimiter=false in URL)
223+ await page . getByRole ( "button" , { name : / G r o u p e d | U n g r o u p e d / } ) . click ( ) ;
224+ await page
225+ . getByRole ( "menuitem" , { name : "Ungrouped" , exact : true } )
226+ . click ( ) ;
227+ await waitForTableRows ( 1 ) ;
228+ await waitForText ( "images/logo.svg" ) ;
229+
230+ // Navigate to an object
231+ const objectLink = page
232+ . getByRole ( "link" , { name : "images/logo.svg" } )
233+ . first ( ) ;
234+ await objectLink . click ( ) ;
235+ await waitForText ( "Object Details" ) ;
236+
237+ // URL should still contain delimiter=false
238+ expect ( page . url ( ) ) . toContain ( "delimiter=false" ) ;
239+
240+ // Navigate back via the bucket breadcrumb
241+ const bucketBreadcrumb = page
242+ . locator ( 'nav[aria-label="breadcrumb"]' )
243+ . getByRole ( "link" , { name : "my-bucket" } )
244+ . first ( ) ;
245+ await bucketBreadcrumb . click ( ) ;
246+ await waitForTableRows ( 1 ) ;
247+
248+ // Should still be in ungrouped mode — full keys visible, no directories
249+ await waitForText ( "images/logo.svg" ) ;
250+
251+ // The toolbar button should still show "Ungrouped"
252+ await waitForText ( "Ungrouped" ) ;
253+ } ) ;
215254 } ) ;
216255
217256 describe ( "object detail page" , ( ) => {
0 commit comments