File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -252,14 +252,12 @@ test.describe('Pagination', () => {
252252 await page . click ( '.pagination button:has-text("2")' ) ;
253253 await expect ( page ) . toHaveURL ( new RegExp ( `/tag/${ uniqueTag } \\?page=2` ) ) ;
254254
255- // Click Global Feed
255+ // Click Global Feed and wait for URL to change to root path
256256 await page . click ( '.nav-link:has-text("Global Feed")' ) ;
257- await page . waitForSelector ( '.article-preview' , { timeout : 10000 } ) ;
257+ await expect ( page ) . toHaveURL ( '/' ) ;
258258
259- // Should be on page 1 (no ?page param)
260- const url = new URL ( page . url ( ) ) ;
261- expect ( url . pathname ) . toBe ( '/' ) ;
262- expect ( url . searchParams . has ( 'page' ) ) . toBe ( false ) ;
259+ // Verify articles loaded
260+ await page . waitForSelector ( '.article-preview' , { timeout : 10000 } ) ;
263261 } ) ;
264262
265263 test ( 'tag pagination shows correct articles per page' , async ( { page, request } ) => {
You can’t perform that action at this time.
0 commit comments