Skip to content

fix(e2e): fix SchemaTable test timeout and add proper API awaits on page navigation#27639

Open
Rohit0301 wants to merge 2 commits intomainfrom
schema-table-spec
Open

fix(e2e): fix SchemaTable test timeout and add proper API awaits on page navigation#27639
Rohit0301 wants to merge 2 commits intomainfrom
schema-table-spec

Conversation

@Rohit0301
Copy link
Copy Markdown
Contributor

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 ...

Screenshot 2026-04-22 at 11 12 08 PM

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@github-actions
Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
62.02% (60342/97290) 42.02% (31636/75281) 45.04% (9502/21095)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

🔴 Playwright Results — 1 failure(s), 20 flaky

✅ 3689 passed · ❌ 1 failed · 🟡 20 flaky · ⏭️ 89 skipped

Shard Passed Failed Flaky Skipped
🔴 Shard 1 478 1 2 4
🟡 Shard 2 650 0 6 7
🟡 Shard 3 662 0 3 1
🟡 Shard 4 645 0 3 27
🟡 Shard 5 610 0 1 42
🟡 Shard 6 644 0 5 8

Genuine Failures (failed on all attempts)

Pages/SearchIndexApplication.spec.ts › Search Index Application (shard 1)
Error: �[2mexpect(�[22m�[31mreceived�[39m�[2m).�[22mtoEqual�[2m(�[22m�[32mexpected�[39m�[2m) // deep equality�[22m

Expected: �[32mStringMatching /success|activeError/g�[39m
Received: �[31m"failed"�[39m
🟡 20 flaky test(s) (passed on retry)
  • Pages/AuditLogs.spec.ts › should apply both User and EntityType filters simultaneously (shard 1, 1 retry)
  • Pages/Customproperties-part1.spec.ts › no duplicate card after update (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/BulkImport.spec.ts › Keyboard Delete selection (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportBasic.spec.ts › should redirect to Table Data Quality tab when canceling table-level bulk edit (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › EditAll User: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with TEST_CASE.EDIT_ALL can see edit action on test case (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Flow/SchemaTable.spec.ts › schema table test (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Topic (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for DashboardDataModel (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel.spec.ts › Should perform CRUD and Removal operations for table (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Tag.spec.ts › Add and Remove Assets for Data Consumer (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

karanh37
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');
});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we removed this test?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a test for schema table pagination, in Pagination.spec

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 23, 2026

Code Review ✅ Approved

Increases SchemaTable test timeouts and integrates API awaits during page navigation to stabilize flaky E2E tests. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants