-
Notifications
You must be signed in to change notification settings - Fork 16.6k
feat(playwright): add documentation screenshot tests #37494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add Playwright tests that capture UI screenshots for the docs site and README. Uses reliable example data (World Bank dashboard), relative URLs for APP_PREFIX support, and element visibility waits instead of networkidle to avoid WebSocket timeouts in SQL Lab. Captures: chart gallery, dashboard, chart editor (explore), and SQL Lab. Updates README to reference the new dashboard.jpg filename. Based on #36297 by @jfrag1. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review Agent Run #01afcd
Actionable Suggestions - 1
-
superset-frontend/playwright/tests/experimental/docs/docs-screenshots.spec.ts - 1
- Deprecated API Usage · Line 82-82
Review Details
-
Files reviewed - 2 · Commit Range:
f8148cc..f8148cc- superset-frontend/playwright/tests/experimental/docs/docs-screenshots.spec.ts
- superset-frontend/playwright/utils/urls.ts
-
Files skipped - 1
- README.md - Reason: Filter setting
-
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
superset-frontend/playwright/tests/experimental/docs/docs-screenshots.spec.ts
Outdated
Show resolved
Hide resolved
Fix SQL Lab test to create a new query tab when SQL Lab opens without one, skip database selection when already pre-selected, and use the "N rows" badge as the results indicator instead of ReactVirtualized. Update documentation screenshots with fresh captures from local run. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Dashboard: Switch to Sales Dashboard with loading indicator wait. Explore: Wait for chart loading spinners to clear before screenshot. SQL Lab: Select birth_names table to show schema in left panel, write multi-line SELECT with explicit columns, dismiss tooltips for clean shot. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…art render
- Switch from dashboardWrapper.screenshot() to page.screenshot({ fullPage: true })
so the global navigation bar is included in the dashboard screenshot
- Add explicit wait for chart content (canvas or SVG) to appear inside
chart holders, not just for loading spinners to disappear
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated screenshots from local Playwright run: - Dashboard now shows global nav bar and fully rendered charts - All 4 screenshots (gallery, dashboard, explore, sql_lab) regenerated Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wait for the birth_names dropdown option to be visible before pressing Enter, fixing a race where the keyboard input fired before the dropdown finished filtering. Also bump col-name timeout to 15s for slower servers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…cs tests Replace all waitForTimeout calls with proper Playwright assertions: - Dashboard: await filter bar visibility via data-test attributes instead of 2s sleep - Explore: await canvas/svg rendering inside slice container instead of 2s sleep - SQL Lab: await tooltip dismissal via role assertion instead of 500ms sleep - SQL Lab: use keyboard Enter with DOM-attached check for AntD virtual list - Gallery: remove zoom that caused element stability timeout - SQL Lab: increase test timeout to 90s for multi-step interaction Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tespace The body zoom: 0.8 shrunk content to 80% but the document retained full viewport dimensions, creating empty space on the right and bottom of the fullPage screenshot. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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 @ExuApplePie, with fixes for all CI failures.
Key improvements over the original PR:
/) via shared URL constants, so tests pass with both empty and/app/prefixbase pathswaitForLoadState('networkidle')with element visibility checks, preventing WebSocket-induced timeouts in SQL Labworld_health) instead of searching for "Slack Dashboard" which isn't part of standardload_examplesCHART_ADD,CHART_LIST, andSQLLABto the existingplaywright/utils/urls.tsfor reuseScreenshots captured (saved to
docs/static/img/screenshots/):gallery.jpg— Chart type gallery (viz gallery component)dashboard.jpg— World Bank dashboard (full wrapper)explore.jpg— Chart editor / explore view (full page)sql_lab.jpg— SQL Lab with query results (full page)Tests are gated behind
INCLUDE_EXPERIMENTAL=trueand run in CI's experimental shadow mode (continue-on-error: true).Also updates README to reference
dashboard.jpginstead ofslack_dash.jpgto match the new screenshot.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — these tests generate screenshots, they don't change UI.
TESTING INSTRUCTIONS
docs/static/img/screenshots/superset-playwright.ymlworkflow with both empty and/app/prefixbase pathsADDITIONAL INFORMATION