Skip to content

chore(tests): promote Playwright experimental tests to stable#38924

Merged
sadpandajoe merged 14 commits intomasterfrom
chore-clean-up-playwright-tests
Apr 2, 2026
Merged

chore(tests): promote Playwright experimental tests to stable#38924
sadpandajoe merged 14 commits intomasterfrom
chore-clean-up-playwright-tests

Conversation

@sadpandajoe
Copy link
Copy Markdown
Member

@sadpandajoe sadpandajoe commented Mar 27, 2026

SUMMARY

Promote all 9 chart, dashboard, and dataset Playwright E2E tests from `experimental/` to stable test directories so they run as required CI blockers. Clean up the Cypress tests they supersede and remove orphaned Cypress helpers.

Moved to stable:

  • 9 Playwright test files from `tests/experimental/{chart,dashboard,dataset}/` to `tests/{chart,dashboard,dataset}/`
  • Fixed relative imports in all moved files

Cypress cleanup:

  • Deleted superseded Cypress tests: `chart_list/list.test.ts`, `dataset/dataset_list.test.ts`
  • Removed orphaned helpers from `explore/utils.ts`: `interceptBulkDelete`, `interceptDelete`, `interceptFavoriteStatus`, `interceptExploreJson`, `interceptFormDataKey`, `setFilter`
  • Removed orphaned helpers from `utils/index.ts`: `setGridMode`, `toggleBulkSelect`, `clearAllInputs`
  • Removed orphaned URL constants: `DATASET_LIST_PATH`, `ALERT_LIST`, `REPORT_LIST`, `LOGIN`, `REGISTER`
  • Restored exports still needed by kept `_skip.*` test files: `getChartAliasBySpec`, `getChartAliasesBySpec`, `vizPlugins`, `parsePostForm`

No CI workflow changes needed — `playwright.config.ts` `testIgnore: '/experimental/'` automatically picks up files moved out of `experimental/`.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A — no UI changes

TESTING INSTRUCTIONS

  1. `cd superset-frontend && npx playwright test --list` — verify all promoted tests are listed
  2. `grep -r "experimental" playwright/tests/` — only `README.md` should match
  3. Cypress type-check: `npx tsc -p cypress-base/tsconfig.json --noEmit` — should pass

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

…an up superseded Cypress tests

Move chart, dashboard, and dataset Playwright E2E tests from experimental/
to stable test directories so they run as required CI blockers. Delete the
Cypress chart_list and dataset_list tests that are now fully replaced, and
remove orphaned helpers from Cypress utils.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Promotes previously “experimental” Playwright E2E coverage for chart, dashboard, and dataset flows into the stable Playwright test suite so these scenarios run as required CI blockers, and removes now-superseded Cypress coverage/helpers.

Changes:

  • Moved Playwright chart/dashboard/dataset tests out of tests/experimental/** and updated their relative imports accordingly.
  • Deleted superseded Cypress E2E specs for chart list and dataset list.
  • Removed unused Cypress helpers/constants that no longer have consumers.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
superset-frontend/playwright/tests/dataset/dataset-test-helpers.ts Updates helper imports to match new (non-experimental) test location.
superset-frontend/playwright/tests/dataset/dataset-list.spec.ts Updates imports/fixture path after promotion to stable Playwright tests.
superset-frontend/playwright/tests/dataset/create-dataset.spec.ts Updates imports after promotion to stable Playwright tests.
superset-frontend/playwright/tests/dashboard/theme.spec.ts Updates imports after promotion to stable Playwright tests.
superset-frontend/playwright/tests/dashboard/export.spec.ts Updates imports after promotion to stable Playwright tests.
superset-frontend/playwright/tests/dashboard/dashboard-test-helpers.ts Updates helper imports after promotion to stable Playwright tests.
superset-frontend/playwright/tests/dashboard/dashboard-list.spec.ts Updates imports after promotion to stable Playwright tests.
superset-frontend/playwright/tests/chart/chart-test-helpers.ts Updates helper imports after promotion to stable Playwright tests.
superset-frontend/playwright/tests/chart/chart-list.spec.ts Updates imports after promotion to stable Playwright tests.
superset-frontend/cypress-base/cypress/utils/urls.ts Removes unused Cypress dataset list URL constant.
superset-frontend/cypress-base/cypress/utils/index.ts Removes unused Cypress list/grid + bulk-select helpers.
superset-frontend/cypress-base/cypress/e2e/explore/utils.ts Removes unused chart-list-specific intercept/filter helpers.
superset-frontend/cypress-base/cypress/e2e/dataset/dataset_list.test.ts Deletes superseded Cypress dataset list spec.
superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts Deletes superseded Cypress chart list spec.

sadpandajoe and others added 2 commits March 30, 2026 12:11
The gsheets driver (shillelagh[gsheetsapi]) is a base dependency in
pyproject.toml, so it is always available after `pip install -e .`.
Remove test.skip() logic that silently swallowed engine-not-found errors,
replacing it with hard failures so these promoted tests are real CI
blockers. Keep the timeout skip for transient Google Sheets API issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)

superset-frontend/playwright/tests/dataset/dataset-list.spec.ts:523

  • The surrounding comments are now inconsistent: this test no longer skips when the GSheets connector/engine is unavailable (it fails hard below), but there’s still an earlier note saying it will skip. Please update/remove that note so the test’s documented behavior matches the implementation.
    superset-frontend/playwright/tests/dataset/dataset-list.spec.ts:526
  • When the import fails, the thrown error omits the HTTP status and drops all details if the response isn’t valid JSON (it becomes {}). For CI-debuggability, include importResponse.status() (and ideally fall back to await importResponse.text() when json() fails) in the error message/attachments.
    superset-frontend/playwright/tests/dataset/create-dataset.spec.ts:88
  • In the failure path, await createDbRes.json() can itself throw if the backend returns a non-JSON error (proxy/500 HTML/etc), which can obscure the real failure cause. Consider including createDbRes.status() and falling back to await createDbRes.text() when JSON parsing fails so CI logs stay actionable.

…verage

P1: create-dataset.spec.ts depends on an external Google Sheet that can
be rate-limited or go offline, making it unsuitable as a required CI
blocker. Move it back to experimental/ where failures don't block merges.

P2: The deleted Cypress chart_list spec was the only test exercising card
view. Add card-view methods to ChartListPage (gotoCardView, getChartCard,
clickCardDeleteAction, clickCardEditAction) and a smoke test that deletes
a chart from card view, preserving coverage for the card UI path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace blanket TimeoutError skip in create-dataset with API-level
  verification: intercept GET /api/v1/database/{id}/tables and only
  skip when the response is empty (Google Sheets transient) or never
  arrives. Non-OK responses and non-empty results missing the expected
  sheet now fail hard, catching Superset regressions instead of hiding
  them behind a skip.

- Replace broken card-view delete test with a card-view edit test that
  exercises the card dropdown → properties modal flow, including UI
  assertions that the renamed card appears and the old name disappears.

- Remove card-view delete test (ConfirmStatusChange inside Ant Design
  Dropdown loses state on close — known framework issue, not fixable
  in the test layer).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 31, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 8431456
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/69cdd3e948514a0008504fc3
😎 Deploy Preview https://deploy-preview-38924--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

sadpandajoe and others added 2 commits March 31, 2026 14:09
The dataset ID from create responses must exist — if it doesn't, the
test should fail rather than silently leak test data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

sadpandajoe and others added 2 commits April 1, 2026 11:42
… imports

Remove dead Cypress helpers (interceptExploreJson, interceptFormDataKey,
clearAllInputs, getChartAliasBySpec, getChartAliasesBySpec, toSlicelike,
ALERT_LIST, REPORT_LIST, LOGIN, REGISTER) and unexport internal-only
functions (interceptExploreGet, getChartGridComponent). Flatten Playwright
test imports to use barrel index files for components/modals,
components/core, and helpers/fixtures. Remove unused clickCardDeleteAction
from ChartListPage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Re-export getChartAliasBySpec, getChartAliasesBySpec, vizPlugins, and
parsePostForm from cypress/utils — these are still imported by the
kept _skip.* test files and their removal broke Cypress type checking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sadpandajoe sadpandajoe marked this pull request as ready for review April 2, 2026 01:29
Restore original create-dataset.spec.ts without the over-engineered
gsheets API interception logic. The test is promoted out of experimental
and is allowed to fail if Google Sheets is unavailable.

Remove dual test/testWithAssets export from fixtures/index.ts — use the
same import pattern as all other test files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

superset-frontend/playwright/tests/dataset/dataset-list.spec.ts:462

  • The comment above importedDatasetName says the test will skip if the gsheets connector is unavailable, but the updated logic below now always throws on failed imports. Please update the comment to match the current behavior (or reintroduce the skip if that was still intended).
    superset-frontend/playwright/tests/dataset/dataset-list.spec.ts:525
  • On import failure you only attempt response.json() and fall back to {}, which can produce an unhelpful error (e.g. Import failed: {}). Consider including the HTTP status and falling back to response.text() when JSON parsing fails so CI failures are actionable.

The previous commit removed the `test` named export from
fixtures/index.ts but didn't update three spec files that still
imported `{ test as testWithAssets }`. Changed to `{ testWithAssets }`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

superset-frontend/playwright/tests/dataset/dataset-list.spec.ts:462

  • The inline comment above this test says the import will be skipped if the gsheets connector is unavailable, but the updated logic now fails hard on any non-OK response (no skip path). Please update/remove this comment so it matches the new behavior (and CI expectations).
    superset-frontend/playwright/tests/dataset/dataset-list.spec.ts:526
  • On import failure, the thrown error only includes a best-effort JSON body (or {} if parsing fails). This can hide useful debugging info (HTTP status, status text, or non-JSON response bodies like HTML 500 pages). Consider including importResponse.status() and falling back to await importResponse.text() when JSON parsing fails.

@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Apr 2, 2026

Code Review Agent Run #0e4e31

Actionable Suggestions - 0
Review Details
  • Files reviewed - 7 · Commit Range: 33bf4df..8431456
    • superset-frontend/cypress-base/cypress/e2e/chart_list/list.test.ts
    • superset-frontend/cypress-base/cypress/e2e/dataset/dataset_list.test.ts
    • superset-frontend/cypress-base/cypress/e2e/explore/utils.ts
    • superset-frontend/cypress-base/cypress/utils/index.ts
    • superset-frontend/cypress-base/cypress/utils/urls.ts
    • superset-frontend/playwright/components/modals/index.ts
    • superset-frontend/playwright/pages/ChartListPage.ts
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Copy link
Copy Markdown
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

LGTM!!!

sadpandajoe and others added 2 commits April 2, 2026 10:51
The comment said the test would skip if the gsheets connector was
unavailable, but the implementation fails hard on import failure since
shillelagh[gsheetsapi] is a base dependency.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Apr 2, 2026

Code Review Agent Run #7fb7c0

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 8431456..e4080b5
    • superset-frontend/playwright/tests/dataset/dataset-list.spec.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.41%. Comparing base (135e0f8) to head (e4080b5).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #38924   +/-   ##
=======================================
  Coverage   64.41%   64.41%           
=======================================
  Files        2536     2536           
  Lines      131155   131155           
  Branches    30450    30450           
=======================================
  Hits        84485    84485           
  Misses      45207    45207           
  Partials     1463     1463           
Flag Coverage Δ
javascript 65.84% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sadpandajoe sadpandajoe merged commit 5662eca into master Apr 2, 2026
72 checks passed
@sadpandajoe sadpandajoe deleted the chore-clean-up-playwright-tests branch April 2, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants