sadpandajoe opened a new pull request, #44844:
URL: https://github.com/apache/superset/pull/44844
### SUMMARY
The per-visualization Cypress specs stopped running in #36538, once example
data moved to YAML and broke their hardcoded dataset and slice ids. They were
later deleted as dead code in #40384. This is one of three small PRs that
restore the meaningful parts of that coverage at the right tier, rather than
re-porting each spec one-to-one.
Most of the deleted specs only asserted that a `<canvas>` or `<svg>`
existed. Chart correctness already lives in each plugin's
`transformProps`/`buildQuery` unit tests. This PR keeps the part only a real
browser against a real backend can check.
- **`dashboard/featured-charts-render.spec.ts`**: a render smoke over the
**Featured Charts** example dashboard. That dashboard is loaded by
`load_examples` in the Playwright CI job and has 25 charts, covering every
modern viz type the old specs touched. For each chart the spec:
- asserts that the dashboard still covers the expected viz types (a subset
check, so adding charts does not break it);
- scrolls the chart into view, since dashboard virtualization unmounts
offscreen rows;
- waits for the chart's terminal output: a canvas, table row, big-number
header, or word-cloud text;
- for canvases, requires at least 100 opaque, saturated pixels across all
layers, so a blank or axes-only canvas fails;
- asserts there is no error alert and that the chart-data response was 200
or 202.
- **`explore/explore-download-image.spec.ts`**: replaces the old
download-chart spec. In Explore it selects **Data Export Options → Export All
Data → Export screenshot (jpeg)** and asserts that a `.jpg` download with JPEG
magic bytes is produced.
- Helpers:
- `getDashboardCharts` (`helpers/api/dashboard.ts`).
- `ExplorePage.downloadFromExportAllData`, which is built on the core
`Menu` component.
Known limit: the pixel floor proves the chart painted colored marks, not
that the series values are correct. An empty series with a legend still passes.
Series correctness stays with the plugin unit tests.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (tests only)
### TESTING INSTRUCTIONS
```bash
cd superset-frontend
npx playwright test
playwright/tests/dashboard/featured-charts-render.spec.ts
playwright/tests/explore/explore-download-image.spec.ts
```
Locally, both specs passed 6/6 with `--repeat-each=3`. Forcing a 500 on one
chart's chart-data request makes the smoke fail. If the smoke ever flakes in
CI, check the tree chart first: it has the smallest margin over the pixel floor
(about 326 against 100).
### 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]