fix(test): repair windows-native-checklist.spec.ts's broken open-video/open-project flow#132
Open
EtienneLescot wants to merge 1 commit into
Open
fix(test): repair windows-native-checklist.spec.ts's broken open-video/open-project flow#132EtienneLescot wants to merge 1 commit into
EtienneLescot wants to merge 1 commit into
Conversation
…o/open-project flow Fixes #130. Two tests referenced hudWindow testids (launch-open-video-button, launch-open-project-button) that don't exist anywhere in LaunchWindow.tsx -- the spec self-skips off-Windows and CI is Linux-only, so this had never actually been caught by a real run. - Add data-testid to EditorEmptyState's Import Video File / Load Project buttons (previously untestable, no selector at all). - Route both tests through the real flow: HUD "Open Studio" -> editor empty state -> the new testids. - Fix the getCurrentVideoPath mock in the load-project test: it stubbed a video as already current, which made VideoEditor skip past EditorEmptyState entirely once the flow went through it (real bug in the mock, exposed by fixing the navigation path). - Two more bugs the same execution gap let through, fixed while verifying locally: a strict-mode-violating "Background" text locator matching two elements, and an assertion on the export button before ever opening the export panel that renders it. Verified locally on macOS by temporarily bypassing the win32-only skip: both previously-broken tests now pass end-to-end (build-vite + playwright test tests/e2e/windows-native-checklist.spec.ts).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe editor empty-state import and load-project buttons now have test identifiers. Windows native checklist tests enter through Open Studio, use those buttons, adjust the mocked video-path response, and verify editor readiness before opening export. ChangesWindows editor entry flows
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #130.
Two tests in
tests/e2e/windows-native-checklist.spec.tsreferencedhudWindowtestids (launch-open-video-button,launch-open-project-button) that don't exist anywhere inLaunchWindow.tsx. Since this spec self-skips off-Windows (test.skip(process.platform !== "win32")) and CI runs on Linux only perAGENTS.md, these two tests have apparently never actually executed — they'd fail immediately on first real run against Windows.What changed
EditorEmptyState.tsx: addeddata-testidto the "Import Video File…" and "Load Project…" buttons — they had no selector at all before.windows-native-checklist.spec.ts: routed both tests through the real flow (HUD → "Open Studio" → editor empty state → the new testids), instead of the nonexistent direct HUD buttons.getCurrentVideoPathmock in the load-project test: it stubbed a video as already current, which madeVideoEditorskip pastEditorEmptyStateentirely once the flow actually went through it — a real bug in the mock that the broken navigation path had been masking."Background"text locator matching two elements, and an assertion on the export button before ever opening the export panel that renders it.Testing
Verified locally on macOS by temporarily bypassing the
win32-only skip (not part of this diff — reverted before committing):npm run build-vitethennpx playwright test tests/e2e/windows-native-checklist.spec.ts. Both previously-broken tests (launch window opens an existing video...andlaunch window opens an existing project...) now pass end-to-end. The third test in the file (native source-selector enumeration) still fails on macOS as expected — that path is genuinely Windows-only (WGC vs ScreenCaptureKit) and untouched by this PR.tsc --noEmit,biome check ., andnpm run test(427/427) all clean.Summary by CodeRabbit