Skip to content

Conversation

@Robdel12
Copy link
Contributor

Summary

  • Detect VIZZLY_SERVER_URL env var in all SDK E2E tests to skip starting their own TDD server when running under vizzly tdd run
  • Fix Vitest tests to use correct browser mode API (getByRole, getByText, getByTestId) instead of Playwright-style page.locator()
  • Fix Static-Site tests to use URL-style paths (/, /features) instead of filenames (index.html)
  • Fix Storybook pattern matching to use story.id format (*button* matches components-button--primary)
  • Fix Ember assertions to check result.status instead of result.success
  • Add proper config structure for page discovery (pageDiscovery.useSitemap instead of flat useSitemap)

Test Results

All SDK E2E tests now pass when run via vizzly tdd run:

SDK Tests Status
Storybook 13/13
Static-Site 13/13
Ember 9/9
Vitest 24/24
Ruby 10/10

Test plan

  • Run vizzly tdd run for each SDK's E2E tests
  • Verify all tests pass
  • Run lint checks for all SDKs

@vizzly-testing
Copy link

🐻 Vizzly — 7 changes need review

Status Count
Passed 12
Changed 7
Auto-approved 12
Visual differences (7)

fullscreen-viewer · Firefox · 1920×1080 · 1.5% diff

fullscreen-viewer

search-no-results · Firefox · 1920×1080 · 0.1% diff

search-no-results

search-no-results · Firefox · 375×978 · 3.3% diff

search-no-results

bulk-accept-dialog · Firefox · 1920×1080 · 5.8% diff

bulk-accept-dialog

viewer-overlay-mode · Firefox · 1920×1080 · 1.6% diff

viewer-overlay-mode

viewer-zoomed-100 · Firefox · 1920×1080 · 0.3% diff

viewer-zoomed-100

...and 1 more in Vizzly.

Review changes →


fix-sdk-e2e-tests · 8369a5a3

@vizzly-testing
Copy link

🐻 Vizzly — 1 change needs review

Status Count
Changed 1
Auto-approved 4
Visual differences (5)

vizzly-help · 1202×1430 · 4.9% diff

vizzly-help

vizzly-invalid-command · 1202×578 · 12.0% diff

vizzly-invalid-command

vizzly-doctor · 1202×578 · 12.0% diff

vizzly-doctor

vizzly-run-help · 1202×722 · 9.6% diff

vizzly-run-help

vizzly-tdd-help · 1202×578 · 12.0% diff

vizzly-tdd-help

Review changes →


fix-sdk-e2e-tests · 8369a5a3

@claude
Copy link

claude bot commented Jan 17, 2026

Code Review - PR #183

This 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

  1. Excellent Server Detection Pattern - The VIZZLY_SERVER_URL detection is clean and consistent
  2. Correct API Fixes - Fixed Vitest to use Testing Library, Static-Site to use URL paths, Ember assertions, Storybook patterns
  3. Comprehensive Test Coverage - All SDKs now test element/full screenshots, properties, thresholds, multiple pages
  4. Proper Config Structure - Fixed pageDiscovery nesting

Issues Found

CRITICAL

Command Injection in Ruby (clients/ruby/test/e2e_test.rb)
Uses string interpolation in shell command. While port is a number, this pattern is risky. Use spawn array syntax instead.

WARNINGS

  1. Hardcoded Timeouts - May fail on slow CI. Use env-based timeouts (CI ? 5000 : 2000)
  2. Missing Error Handling - Server spawn needs consistent error handling before promise resolves
  3. Double CI Execution - Tests run twice (TDD + Cloud). Consider making conditional to save CI time

SUGGESTIONS

  1. Test Site Coupling - All SDKs depend on ../../../test-site. Document this, add CI check
  2. Code Duplication - Extract shared E2E setup logic to test-utils
  3. Documentation - Add SDK README sections for E2E requirements and troubleshooting

Performance

  • CI time doubles with TDD+Cloud runs - monitor for bottlenecks
  • Browser instances could be reused within SDKs
  • Consider parallel test execution within each SDK

Verdict

Approve with minor fixes

Priority before merge:

  1. Fix Ruby command injection (low risk but best practice)
  2. Ensure consistent error handling in server spawns

Nice to have: shared E2E helpers, documentation, conditional CI execution

Great work improving test infrastructure!

@vizzly-testing
Copy link

🐻 Vizzly — 5 changes need review

Status Count
Passed 14
Changed 5
Auto-approved 14
Visual differences (5)

fullscreen-viewer · Firefox · 1920×1080 · 1.5% diff

fullscreen-viewer

viewer-overlay-mode · Firefox · 1920×1080 · 1.6% diff

viewer-overlay-mode

fullscreen-viewer · Firefox · 375×667 · 0.9% diff

fullscreen-viewer

search-no-results · Firefox · 375×978 · 3.5% diff

search-no-results

viewer-zoomed-100 · Firefox · 375×667 · 198.1% diff

viewer-zoomed-100

Review changes →


fix-sdk-e2e-tests · 31d6df25

@vizzly-testing
Copy link

🐻 Vizzly — 1 change needs review

Status Count
Changed 1
Auto-approved 4
Visual differences (5)

vizzly-help · 1202×1430 · 4.9% diff

vizzly-help

vizzly-doctor · 1202×578 · 12.0% diff

vizzly-doctor

vizzly-tdd-help · 1202×578 · 12.0% diff

vizzly-tdd-help

vizzly-invalid-command · 1202×578 · 12.0% diff

vizzly-invalid-command

vizzly-run-help · 1202×722 · 9.6% diff

vizzly-run-help

Review changes →


fix-sdk-e2e-tests · 31d6df25

@vizzly-testing
Copy link

vizzly-testing bot commented Jan 17, 2026

🐻 Vizzly — Approved ✓

19 comparisons approved.

Status Count
Passed 11
Changed 8
Auto-approved 11
Visual differences (8)

bulk-accept-dialog · Firefox · 1920×1080 · 5.1% diff

bulk-accept-dialog

viewer-overlay-mode · Firefox · 1920×1080 · 1.6% diff

viewer-overlay-mode

search-no-results · Firefox · 1920×1080 · 0.1% diff

search-no-results

fullscreen-viewer · Firefox · 1920×1080 · 1.5% diff

fullscreen-viewer

viewer-zoomed-100 · Firefox · 1920×1080 · 0.3% diff

viewer-zoomed-100

search-no-results · Firefox · 375×978 · 3.5% diff

search-no-results

...and 2 more in Vizzly.

View build →


fix-sdk-e2e-tests · 890d7460

@vizzly-testing
Copy link

vizzly-testing bot commented Jan 17, 2026

🐻 Vizzly — Approved ✓

5 comparisons approved.

Status Count
Changed 1
Auto-approved 4
Visual differences (5)

vizzly-help · 1202×1430 · 4.9% diff

vizzly-help

vizzly-tdd-help · 1202×578 · 12.0% diff

vizzly-tdd-help

vizzly-run-help · 1202×722 · 9.6% diff

vizzly-run-help

vizzly-doctor · 1202×578 · 12.0% diff

vizzly-doctor

vizzly-invalid-command · 1202×578 · 12.0% diff

vizzly-invalid-command

View build →


fix-sdk-e2e-tests · 890d7460

- 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
@vizzly-testing
Copy link

vizzly-testing bot commented Jan 17, 2026

🐻 Vizzly — Approved ✓

18 comparisons approved.

Status Count
Passed 10
Changed 8
Auto-approved 10
Visual differences (8)

fullscreen-viewer · Firefox · 1920×1080 · 1.6% diff

fullscreen-viewer

search-no-results · Firefox · 1920×1080 · 0.1% diff

search-no-results

bulk-accept-dialog · Firefox · 375×892 · 95.5% diff

bulk-accept-dialog

bulk-accept-dialog · Firefox · 1920×1080 · 5.8% diff

bulk-accept-dialog

viewer-zoomed-100 · Firefox · 1920×1080 · 0.3% diff

viewer-zoomed-100

search-no-results · Firefox · 375×978 · 3.2% diff

search-no-results

...and 2 more in Vizzly.

View build →


fix-sdk-e2e-tests · 242af430

@vizzly-testing
Copy link

vizzly-testing bot commented Jan 17, 2026

🐻 Vizzly — Approved ✓

5 comparisons approved.

Status Count
Changed 1
Auto-approved 4
Visual differences (5)

vizzly-doctor · 1202×578 · 12.0% diff

vizzly-doctor

vizzly-help · 1202×1430 · 4.9% diff

vizzly-help

vizzly-tdd-help · 1202×578 · 12.0% diff

vizzly-tdd-help

vizzly-run-help · 1202×722 · 9.6% diff

vizzly-run-help

vizzly-invalid-command · 1202×578 · 12.0% diff

vizzly-invalid-command

View build →


fix-sdk-e2e-tests · 242af430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants