@@ -282,11 +282,8 @@ test.describe('Filter Messages by Timestamp', () => {
282282 // Wait for URL to update and remove timestamp parameter
283283 await page . waitForURL ( ( url ) => ! url . searchParams . has ( 't' ) , { timeout : 5000 } ) ;
284284
285- const currentUrl = page . url ( ) ;
286- expect ( currentUrl ) . not . toContain ( 't=' ) ;
287-
288285 // Verify timestamp parameter is not in URL
289- const urlParams = new URL ( currentUrl ) . searchParams ;
286+ const urlParams = new URL ( page . url ( ) ) . searchParams ;
290287 const urlTimestamp = urlParams . get ( 't' ) ;
291288 expect ( urlTimestamp ) . toBeNull ( ) ;
292289 } ) ;
@@ -302,10 +299,7 @@ test.describe('Filter Messages by Timestamp', () => {
302299 await beginningOption . click ( ) ;
303300
304301 // Verify timestamp parameter is still not in URL
305- const currentUrl = page . url ( ) ;
306- expect ( currentUrl ) . not . toContain ( 't=' ) ;
307-
308- const urlParams = new URL ( currentUrl ) . searchParams ;
302+ const urlParams = new URL ( page . url ( ) ) . searchParams ;
309303 const urlTimestamp = urlParams . get ( 't' ) ;
310304 expect ( urlTimestamp ) . toBeNull ( ) ;
311305 } ) ;
@@ -320,11 +314,7 @@ test.describe('Filter Messages by Timestamp', () => {
320314 await expect ( offsetOption ) . toBeVisible ( ) ;
321315 await offsetOption . click ( ) ;
322316
323- // Verify timestamp parameter is still not in URL
324- const currentUrl = page . url ( ) ;
325- expect ( currentUrl ) . not . toContain ( 't=' ) ;
326-
327- const urlParams = new URL ( currentUrl ) . searchParams ;
317+ const urlParams = new URL ( page . url ( ) ) . searchParams ;
328318 const urlTimestamp = urlParams . get ( 't' ) ;
329319 expect ( urlTimestamp ) . toBeNull ( ) ;
330320 } ) ;
@@ -393,11 +383,8 @@ test.describe('Filter Messages by Timestamp', () => {
393383 // Wait for URL to update and remove timestamp parameter
394384 await page . waitForURL ( ( url ) => ! url . searchParams . has ( 't' ) , { timeout : 5000 } ) ;
395385
396- const currentUrl = page . url ( ) ;
397- expect ( currentUrl ) . not . toContain ( 't=' ) ;
398-
399386 // Verify timestamp parameter is not in URL
400- const urlParams = new URL ( currentUrl ) . searchParams ;
387+ const urlParams = new URL ( page . url ( ) ) . searchParams ;
401388 const urlTimestamp = urlParams . get ( 't' ) ;
402389 expect ( urlTimestamp ) . toBeNull ( ) ;
403390 } ) ;
0 commit comments