sadpandajoe opened a new pull request, #41434: URL: https://github.com/apache/superset/pull/41434
### SUMMARY Migrates the one genuinely end-to-end case from the deprecated Cypress "Dashboard tabs" suite (`cypress-base/.../dashboard/tabs.test.ts`) to the existing Playwright framework, as part of the ongoing Cypress → Playwright migration. The migrated behaviour — **"should update size when switch tab"** — verifies a real browser layout-reflow: a chart living in an inactive (hidden) tab must re-measure and refit its container when the tab is revealed after the available width has changed. This can only be exercised against a rendered chart in a real dashboard, so it stays an E2E test. What it does: - Builds the dashboard **hermetically** via the API: two top-level tabs, a width-sensitive `treemap_v2` in the first tab and a `table` in the second, off the `birth_names` dataset (no dependency on a seeded tabbed dashboard). - Renders at a wide viewport, switches to the second tab, **shrinks the viewport while the treemap is hidden** (the equivalent of the original's native-filter-bar expansion), then switches back. - Asserts **both**: (1) the chart container actually reflowed to the narrower width — guarding against a trivial green where the resize was never exercised — and (2) the chart refit its container with no horizontal overflow (`scrollWidth === offsetWidth`), polling out the echarts resize latency so a genuine resize-on-reveal regression times out red. The other two original cases are intentionally **not** migrated: "should switch tabs" asserted only the `ant-tabs-tab-active` CSS class, and "should send new queries when tab becomes visible" was already skipped. Both are DOM/state assertions with no backend invariant and belong in component/RTL coverage. Also adds reusable `DashboardPage.topLevelTabs()` / `switchToTopLevelTab()` page-object helpers. ### BEFORE/AFTER N/A — test-only change. ### TESTING INSTRUCTIONS From `superset-frontend/`, against a running stack: ``` PLAYWRIGHT_BASE_URL=http://localhost:<port> PLAYWRIGHT_ADMIN_PASSWORD=<pw> \ npx playwright test --project=chromium dashboard/dashboard-tabs.spec.ts ``` Passes locally (3/3 with `--repeat-each=3`). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] 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 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
