Add MP4 Electron export E2E#537
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR adds shared Playwright/Electron e2e helpers, a new MP4 export test, refactors the GIF export test to use those helpers, memoizes a recorder helper in ChangesMP4 Export E2E Testing Infrastructure
Test Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Review rate limit: 3/8 reviews remaining, refill in 37 minutes and 29 seconds.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/e2e/helpers.ts`:
- Around line 62-66: Add a defensive guard in readCapturedExportBuffer: before
calling Buffer.from, retrieve the captured value from
globalThis["__testExportData"] (as currently done) and verify it is a non-empty
string (or Buffer-encodable value); if missing or invalid, throw a clear Error
mentioning that __testExportData was not set or is invalid so tests fail with a
helpful message. Update the function readCapturedExportBuffer to validate the
retrieved base64 value and only call Buffer.from(base64, "base64") when the
check passes.
In `@tests/e2e/mp4-export.spec.ts`:
- Around line 41-44: The test fires two IPC calls inside hudWindow.evaluate that
can race; change the evaluate callback so it awaits
window.electronAPI.setCurrentVideoPath(videoPath) before calling/awaiting
window.electronAPI.switchToEditor(), ensuring setCurrentVideoPath completes
first (i.e., use await on setCurrentVideoPath and then await switchToEditor
inside the hudWindow.evaluate callback) to eliminate the export-flow race.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c4a3bcbc-624d-4165-beb1-141318472a6c
📒 Files selected for processing (7)
playwright.config.tssrc/components/video-editor/SettingsPanel.tsxsrc/hooks/useScreenRecorder.tssrc/utils/getTestId.tstests/e2e/gif-export.spec.tstests/e2e/helpers.tstests/e2e/mp4-export.spec.ts
Summary
Testing
Summary by CodeRabbit
Tests
New Features
Chores