Commit b0f00c4
authored
test: fixes pagination and sorting list-view tests due to hydration timing issues (#15925)
# Overview
Fixes flaky list view pagination / sorting e2e test failures in slow CI
environments caused by Next.js 16 hydration timing issues.
<img width="1123" height="536" alt="Screenshot 2026-03-12 at 9 25 25 AM"
src="https://github.com/user-attachments/assets/357d968c-5838-4308-adda-cc9b37002a07"
/>
## Key Changes
- Added `wait(500)` calls at strategic interaction points:
- After page loads/reloads before user interactions
- After clicks that trigger UI state changes
- After navigation actions
- After column/drawer toggles
- Applied to pagination, per-page limits, list drawer, and column
sorting tests
- Added CPU throttling (4x slower) to these tests to simulate slow CI
and catch regressions
## Design Decisions
In slow CI environments, React hydration takes longer to complete.
Playwright sees elements as visible and actionable before React event
handlers are fully attached, leading to:
- Clicks happening before handlers are ready
- Drawers/modals appearing briefly then disappearing (hydration
mismatch)
- Tests timing out before pages become truly interactive
The 500ms waits give Next.js 16 enough time to complete hydration before
interactions. CPU throttling was added to replicate slow CI conditions
locally and prevent future regressions.1 parent ef507a6 commit b0f00c4
File tree
4 files changed
+87
-15
lines changed- test
- access-control
- admin
- e2e/list-view
4 files changed
+87
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
328 | | - | |
| 327 | + | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
372 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| |||
717 | 718 | | |
718 | 719 | | |
719 | 720 | | |
720 | | - | |
721 | | - | |
| 721 | + | |
| 722 | + | |
722 | 723 | | |
723 | 724 | | |
724 | 725 | | |
| |||
731 | 732 | | |
732 | 733 | | |
733 | 734 | | |
734 | | - | |
735 | | - | |
| 735 | + | |
| 736 | + | |
736 | 737 | | |
737 | 738 | | |
738 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
1916 | 1919 | | |
1917 | 1920 | | |
1918 | 1921 | | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
1919 | 1932 | | |
1920 | 1933 | | |
1921 | 1934 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1519 | 1519 | | |
1520 | 1520 | | |
1521 | 1521 | | |
1522 | | - | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
1523 | 1525 | | |
1524 | 1526 | | |
1525 | 1527 | | |
| |||
1531 | 1533 | | |
1532 | 1534 | | |
1533 | 1535 | | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
1534 | 1543 | | |
| 1544 | + | |
1535 | 1545 | | |
1536 | | - | |
| 1546 | + | |
1537 | 1547 | | |
1538 | 1548 | | |
1539 | 1549 | | |
| |||
1547 | 1557 | | |
1548 | 1558 | | |
1549 | 1559 | | |
1550 | | - | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1551 | 1564 | | |
1552 | 1565 | | |
1553 | 1566 | | |
| 1567 | + | |
| 1568 | + | |
1554 | 1569 | | |
1555 | | - | |
| 1570 | + | |
| 1571 | + | |
1556 | 1572 | | |
1557 | 1573 | | |
1558 | | - | |
| 1574 | + | |
| 1575 | + | |
1559 | 1576 | | |
1560 | 1577 | | |
1561 | 1578 | | |
| |||
1566 | 1583 | | |
1567 | 1584 | | |
1568 | 1585 | | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
1569 | 1589 | | |
1570 | | - | |
| 1590 | + | |
1571 | 1591 | | |
1572 | 1592 | | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1573 | 1596 | | |
1574 | 1597 | | |
| 1598 | + | |
| 1599 | + | |
1575 | 1600 | | |
1576 | 1601 | | |
1577 | 1602 | | |
1578 | 1603 | | |
1579 | 1604 | | |
| 1605 | + | |
1580 | 1606 | | |
1581 | 1607 | | |
1582 | 1608 | | |
1583 | 1609 | | |
1584 | 1610 | | |
| 1611 | + | |
1585 | 1612 | | |
1586 | 1613 | | |
1587 | 1614 | | |
| |||
1594 | 1621 | | |
1595 | 1622 | | |
1596 | 1623 | | |
| 1624 | + | |
| 1625 | + | |
1597 | 1626 | | |
1598 | 1627 | | |
1599 | 1628 | | |
| |||
1627 | 1656 | | |
1628 | 1657 | | |
1629 | 1658 | | |
| 1659 | + | |
| 1660 | + | |
1630 | 1661 | | |
1631 | 1662 | | |
1632 | 1663 | | |
| 1664 | + | |
1633 | 1665 | | |
1634 | 1666 | | |
| 1667 | + | |
| 1668 | + | |
1635 | 1669 | | |
1636 | 1670 | | |
1637 | 1671 | | |
| |||
1792 | 1826 | | |
1793 | 1827 | | |
1794 | 1828 | | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
1795 | 1832 | | |
1796 | 1833 | | |
1797 | 1834 | | |
1798 | 1835 | | |
1799 | 1836 | | |
| 1837 | + | |
1800 | 1838 | | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
1801 | 1842 | | |
1802 | 1843 | | |
1803 | 1844 | | |
| |||
1806 | 1847 | | |
1807 | 1848 | | |
1808 | 1849 | | |
| 1850 | + | |
| 1851 | + | |
1809 | 1852 | | |
1810 | 1853 | | |
1811 | 1854 | | |
| |||
1824 | 1867 | | |
1825 | 1868 | | |
1826 | 1869 | | |
| 1870 | + | |
1827 | 1871 | | |
1828 | 1872 | | |
1829 | 1873 | | |
1830 | 1874 | | |
1831 | 1875 | | |
1832 | 1876 | | |
| 1877 | + | |
1833 | 1878 | | |
1834 | 1879 | | |
1835 | 1880 | | |
| |||
1849 | 1894 | | |
1850 | 1895 | | |
1851 | 1896 | | |
1852 | | - | |
| 1897 | + | |
1853 | 1898 | | |
1854 | 1899 | | |
1855 | 1900 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| |||
1548 | 1551 | | |
1549 | 1552 | | |
1550 | 1553 | | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1551 | 1564 | | |
1552 | 1565 | | |
1553 | 1566 | | |
| |||
0 commit comments