Commit c203bfa
authored
🧪 Fix SDK E2E tests to work with vizzly tdd run (#183)
## Summary
This PR fixes SDK E2E tests to work properly with both `vizzly tdd run`
(local TDD mode) and `vizzly run` (cloud mode), and reorganizes CI
workflows for better maintainability.
## Changes
### CI Workflow Reorganization
- Split monolithic `ci.yml` into 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 tests
- `tui.yml` - TUI tests
- E2E tests now run in both TDD and cloud modes for each SDK
### Ruby SDK Fixes
- 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 happens)
- Fixed in both `integration_test.rb` and `e2e_test.rb`
### Vitest SDK Fixes
- Refactored to use shared test-site for consistency with other SDKs
- Test the actual SDK functionality (`toMatchScreenshot` matcher)
- Load test-site CSS for consistent styling
- Removed custom commands that were for full-page navigation, not SDK
testing
### All SDKs
- Detect `VIZZLY_SERVER_URL` env var to skip starting own TDD server
when running under `vizzly tdd run` or `vizzly run`
- Fix assertions to handle both TDD mode (returns `status` field) and
cloud mode (returns `success: true`)
## Test plan
- [x] All SDK E2E tests pass in TDD mode (`vizzly tdd run`)
- [x] All SDK E2E tests pass in cloud mode (`vizzly run`)
- [x] Ruby lint passes (`bundle exec rubocop`)
- [x] CI workflow YAML is valid1 parent 8dd5b65 commit c203bfa
File tree
19 files changed
+3166
-1980
lines changed- .github/workflows
- clients
- ember
- tests/integration
- ruby
- test
- static-site
- tests
- storybook
- example-storybook
- tests
- vitest
- tests/e2e
19 files changed
+3166
-1980
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments