rusackas opened a new pull request, #37494:
URL: https://github.com/apache/superset/pull/37494

   ### SUMMARY
   
   Adds Playwright tests that capture UI screenshots for the Superset 
documentation site and README. This is a production-ready rewrite of the 
approach from #36297 by @jfrag1, with fixes for all CI failures.
   
   **Key improvements over the original PR:**
   - **APP_PREFIX support**: Uses relative URLs (no leading `/`) via shared URL 
constants, so tests pass with both empty and `/app/prefix` base paths
   - **No networkidle**: Replaces `waitForLoadState('networkidle')` with 
element visibility checks, preventing WebSocket-induced timeouts in SQL Lab
   - **Reliable example data**: Navigates to the World Bank dashboard via its 
slug (`world_health`) instead of searching for "Slack Dashboard" which isn't 
part of standard `load_examples`
   - **Shared URL constants**: Adds `CHART_ADD`, `CHART_LIST`, and `SQLLAB` to 
the existing `playwright/utils/urls.ts` for reuse
   - **Generic chart editor test**: Opens the first chart from the list view 
instead of searching for a specific chart name
   
   **Screenshots captured (saved to `docs/static/img/screenshots/`):**
   1. `gallery.jpg` — Chart type gallery (viz gallery component)
   2. `dashboard.jpg` — World Bank dashboard (full wrapper)
   3. `explore.jpg` — Chart editor / explore view (full page)
   4. `sql_lab.jpg` — SQL Lab with query results (full page)
   
   Tests are gated behind `INCLUDE_EXPERIMENTAL=true` and run in CI's 
experimental shadow mode (`continue-on-error: true`).
   
   Also updates README to reference `dashboard.jpg` instead of `slack_dash.jpg` 
to match the new screenshot.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A — these tests generate screenshots, they don't change UI.
   
   ### TESTING INSTRUCTIONS
   
   1. With a running Superset instance and example data loaded:
      ```bash
      cd superset-frontend
      INCLUDE_EXPERIMENTAL=true npx playwright test experimental/docs/
      ```
   2. Verify screenshots are written to `docs/static/img/screenshots/`
   3. In CI, tests run automatically via the `superset-playwright.yml` workflow 
with both empty and `/app/prefix` base paths
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue: #36297
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API


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

Reply via email to