-
Notifications
You must be signed in to change notification settings - Fork 1
🧪 Fix SDK E2E tests to work with vizzly tdd run #183
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
Conversation
🐻 Vizzly — 7 changes need review
Visual differences (7)fullscreen-viewer · Firefox · 1920×1080 · 1.5% diff search-no-results · Firefox · 1920×1080 · 0.1% diff search-no-results · Firefox · 375×978 · 3.3% diff bulk-accept-dialog · Firefox · 1920×1080 · 5.8% diff viewer-overlay-mode · Firefox · 1920×1080 · 1.6% diff viewer-zoomed-100 · Firefox · 1920×1080 · 0.3% diff ...and 1 more in Vizzly.
|
🐻 Vizzly — 1 change needs review
Visual differences (5)vizzly-help · 1202×1430 · 4.9% diff vizzly-invalid-command · 1202×578 · 12.0% diff vizzly-doctor · 1202×578 · 12.0% diff vizzly-run-help · 1202×722 · 9.6% diff vizzly-tdd-help · 1202×578 · 12.0% diff
|
Code Review - PR #183This PR makes significant improvements to SDK E2E tests, ensuring they work correctly when run via vizzly tdd run. The changes fix API misuse, improve test structure, and add proper server detection. Strengths
Issues FoundCRITICALCommand Injection in Ruby (clients/ruby/test/e2e_test.rb) WARNINGS
SUGGESTIONS
Performance
VerdictApprove with minor fixes Priority before merge:
Nice to have: shared E2E helpers, documentation, conditional CI execution Great work improving test infrastructure! |
8369a5a to
31d6df2
Compare
🐻 Vizzly — 5 changes need review
Visual differences (5)fullscreen-viewer · Firefox · 1920×1080 · 1.5% diff viewer-overlay-mode · Firefox · 1920×1080 · 1.6% diff fullscreen-viewer · Firefox · 375×667 · 0.9% diff search-no-results · Firefox · 375×978 · 3.5% diff viewer-zoomed-100 · Firefox · 375×667 · 198.1% diff
|
🐻 Vizzly — 1 change needs review
Visual differences (5)vizzly-help · 1202×1430 · 4.9% diff vizzly-doctor · 1202×578 · 12.0% diff vizzly-tdd-help · 1202×578 · 12.0% diff vizzly-invalid-command · 1202×578 · 12.0% diff vizzly-run-help · 1202×722 · 9.6% diff
|
31d6df2 to
890d746
Compare
🐻 Vizzly — Approved ✓19 comparisons approved.
Visual differences (8)bulk-accept-dialog · Firefox · 1920×1080 · 5.1% diff viewer-overlay-mode · Firefox · 1920×1080 · 1.6% diff search-no-results · Firefox · 1920×1080 · 0.1% diff fullscreen-viewer · Firefox · 1920×1080 · 1.5% diff viewer-zoomed-100 · Firefox · 1920×1080 · 0.3% diff search-no-results · Firefox · 375×978 · 3.5% diff ...and 2 more in Vizzly.
|
🐻 Vizzly — Approved ✓5 comparisons approved.
Visual differences (5)vizzly-help · 1202×1430 · 4.9% diff vizzly-tdd-help · 1202×578 · 12.0% diff vizzly-run-help · 1202×722 · 9.6% diff vizzly-doctor · 1202×578 · 12.0% diff vizzly-invalid-command · 1202×578 · 12.0% diff
|
- Detect VIZZLY_SERVER_URL env var to skip starting own TDD server - Fix Vitest tests to use correct browser mode API (getByRole, getByText) - Fix Static-Site tests to use URL-style paths (/, /features) not filenames - Fix Storybook pattern matching to use story.id format (*button*) - Fix Ember assertions to check result.status instead of result.success - Add proper config structure for page discovery (pageDiscovery.useSitemap) All SDK E2E tests now pass when run via `vizzly tdd run`: - Storybook: 13/13 - Static-Site: 13/13 - Ember: 9/9 - Vitest: 24/24 - Ruby: 10/10
890d746 to
242af43
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
- Add custom `loadPage` command to fetch and inject HTML content - Start static server for test-site with dynamic port allocation - Use real FluffyCloud test-site instead of inline HTML - Screenshots now match other SDKs (Storybook, Static-Site, Ember, Ruby) The `loadPage` command works around Vitest browser mode's limitation of not supporting `page.goto()` by fetching HTML and using `frame.setContent()` to inject it into the test iframe.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Split monolithic ci.yml (900+ lines) into focused workflows: - ci.yml: Core CLI lint, tests, build (78 lines) - reporter.yml: Reporter visual tests (Vizzly cloud) - tui.yml: TUI visual tests (Vizzly cloud) - sdk-e2e.yml: All SDK E2E tests (TDD + Cloud mode) - sdk-unit.yml: SDK unit tests (conditional on file changes) - Add cloud mode for Ruby, Storybook, and Static-Site SDKs - Each workflow has its own status check job for branch protection - SDK E2E always runs to catch CLI breaking changes - SDK unit tests only run when that SDK's files change New secrets needed: - VIZZLY_RUBY_CLIENT_TOKEN - VIZZLY_STORYBOOK_CLIENT_TOKEN - VIZZLY_STATIC_SITE_CLIENT_TOKEN
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Test the actual SDK functionality (toMatchScreenshot matcher) - Load test-site CSS for consistent styling with other SDKs - Remove custom commands (loadPage was for full-page navigation, not SDK testing) - Test page screenshots, element screenshots, properties, and thresholds
defd76a to
e30998d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
75ebbf4 to
c8b8462
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- Add cloud_mode? helper to detect when running with VIZZLY_TOKEN - Add assert_screenshot_success helper for mode-aware assertions - TDD mode: asserts status is 'new' or 'match' - Cloud mode: asserts success is true (no local comparison)
c8b8462 to
4bde262
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Switch from blacksmith to ubuntu-latest for all CI workflows since this is an open source project with free GitHub Actions minutes. Keeps blacksmith only for release workflows (internal).
🐻 Vizzly — Approved ✓5 comparisons approved.
CLI TUI · |
🐻 Vizzly — Approved ✓19 comparisons approved.
CLI Reporter · |
































Summary
This PR fixes SDK E2E tests to work properly with both
vizzly tdd run(local TDD mode) andvizzly run(cloud mode), and reorganizes CI workflows for better maintainability.Changes
CI Workflow Reorganization
ci.ymlinto focused workflow files:sdk-e2e.yml- E2E tests for all SDKs (runs on every PR)sdk-unit.yml- Unit tests with matrix testing (runs when SDK files change)reporter.yml- Reporter UI teststui.yml- TUI testsRuby SDK Fixes
cloud_mode?helper to detect when running withVIZZLY_TOKENassert_screenshot_successhelper for mode-aware assertions'new'or'match'successistrue(no local comparison happens)integration_test.rbande2e_test.rbVitest SDK Fixes
toMatchScreenshotmatcher)All SDKs
VIZZLY_SERVER_URLenv var to skip starting own TDD server when running undervizzly tdd runorvizzly runstatusfield) and cloud mode (returnssuccess: true)Test plan
vizzly tdd run)vizzly run)bundle exec rubocop)