fix(e2e): fix SchemaTable test timeout and add proper API awaits on page navigation#27639
Open
fix(e2e): fix SchemaTable test timeout and add proper API awaits on page navigation#27639
Conversation
Contributor
Contributor
🔴 Playwright Results — 1 failure(s), 20 flaky✅ 3689 passed · ❌ 1 failed · 🟡 20 flaky · ⏭️ 89 skipped
Genuine Failures (failed on all attempts)❌
|
karanh37
previously approved these changes
Apr 23, 2026
Comment on lines
-156
to
-183
| test('Schema Table Pagination should work Properly', async ({ page }) => { | ||
| const tableResponse = page.waitForResponse(`/api/v1/tables?limit=15**`); | ||
|
|
||
| await page.goto('/databaseSchema/sample_data.ecommerce_db.shopify'); | ||
| await tableResponse; | ||
|
|
||
| await expect(page.getByTestId('page-size-selection-dropdown')).toHaveText( | ||
| '15 / Page' | ||
| ); | ||
|
|
||
| await expect(page.getByTestId('previous')).toBeDisabled(); | ||
|
|
||
| await expect(page.getByTestId('next')).not.toBeDisabled(); | ||
|
|
||
| const tableResponse2 = page.waitForResponse(`/api/v1/tables?**limit=15**`); | ||
| await page.getByTestId('next').click(); | ||
| await tableResponse2; | ||
|
|
||
| await expect(page.getByTestId('previous')).not.toBeDisabled(); | ||
|
|
||
| await expect(page.getByTestId('page-indicator')).toContainText('2'); | ||
|
|
||
| const tableResponse3 = page.waitForResponse(`/api/v1/tables?**limit=15**`); | ||
| await page.getByTestId('previous').click(); | ||
| await tableResponse3; | ||
|
|
||
| await expect(page.getByTestId('page-indicator')).toContainText('1'); | ||
| }); |
Collaborator
There was a problem hiding this comment.
Why we removed this test?
Contributor
Author
There was a problem hiding this comment.
We already have a test for schema table pagination, in Pagination.spec
Code Review ✅ ApprovedIncreases SchemaTable test timeouts and integrates API awaits during page navigation to stabilize flaky E2E tests. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Describe your changes:
Fixed waitForAllLoadersToDisappear using wrong page context (page instead of currentPage) in the schema table test loop, causing timeout and "Target page has been closed" errors
Replaced bare page.goto(clipboardText) calls with Promise.all that awaits both the table fields API (fields=) and the table profile API (profile) before asserting UI state — matches the pattern used across other tests
Added a 150_000ms timeout on the profile API wait as a safety margin — the table profile API can have high latency intermittently, so this prevents flaky failures without masking real issues.
Also removed the duplicate pagination test, as it is already covered in the Pagination.spec
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>