vatsrahul1001 commented on PR #60514:
URL: https://github.com/apache/airflow/pull/60514#issuecomment-3798864805

   **Pagination needs to follow the established pattern from PR #59400:**
   
   The current implementation differs from our merged pagination tests. Please 
reference:
   - **File:** `dags-list.spec.ts` 
   - **PR:** #59400 (Feat e2e test for Dags pagination)
   
   **Key differences to fix:**
   
   1. **Use `[data-testid="next/prev"]` buttons instead of page numbers:**
   // Current (incorrect)
   const page2Button = this.page.getByRole("button", { name: /page 2|^2$/ });
   
   // Reference pattern (from DagsPage.ts)
   this.paginationNextButton = page.locator('[data-testid="next"]');
   this.paginationPrevButton = page.locator('[data-testid="prev"]');2. **Remove 
`if (hasPage2)` conditional** - `beforeAll` ensures data exists, pagination 
should work.
   
   3. **Verify data actually changed** using `expect.poll()`:
   // Reference from dags-list.spec.ts
   const initialData = await dagsPage.getDagNames();
   await dagsPage.clickNextPage();
   const dataAfterNext = await dagsPage.getDagNames();
   expect(dataAfterNext).not.toEqual(initialData);  // Verifies data 
changed!See: https://github.com/apache/airflow/pull/59400


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to