Skip to content

Commit f180b54

Browse files
committed
wait for all quotas to load (without pagination)
1 parent 93c2ef1 commit f180b54

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

frontend/tests/test-variant-console/quotas/pagination.spec.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,23 @@ test.describe('Quotas - Display 50 quotas', () => {
2525

2626
await test.step('Navigate to quotas page', async () => {
2727
await quotaPage.goToQuotasList();
28+
29+
// Set rows per page to 50 to ensure all quotas can be displayed on one page
30+
await quotaPage.setRowsPerPage(50);
2831
});
2932

3033
await test.step(`Verify all ${QUOTAS_TEST_LIMIT} quotas are visible on the page`, async () => {
31-
// Count rows containing our test quota IDs
34+
// Wait for all quotas to load (app loads in batches)
35+
// Use toPass() to retry until all batches have loaded
36+
await expect(async () => {
37+
const visibleQuotaCount = await page
38+
.locator('tr')
39+
.filter({ hasText: `quota-test-${timestamp}` })
40+
.count();
41+
expect(visibleQuotaCount).toBe(QUOTAS_TEST_LIMIT);
42+
}).toPass({ timeout: 15_000, intervals: [500, 1000] });
43+
44+
// Final verification - count should now be stable at 50
3245
const visibleQuotaCount = await page
3346
.locator('tr')
3447
.filter({ hasText: `quota-test-${timestamp}` })

0 commit comments

Comments
 (0)