You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds two screenrecord tests for the iOS simulator in test/simulator.spec.ts, mirroring the Android emulator tests (#249):
--time-limit 5 -> validates the MP4 with ffprobe.
no time limit -> sends SIGINT (Ctrl-C), validates the MP4.
Both assert a non-empty, ffprobe-decodable MP4 and that its dimensions match a screenshot. Unlike the emulator, the simulator records at native resolution (1170x2532 == screenshot), so the dimension assertion applies here.
Notes
No production code change needed: the simulator records via xcrun simctl io ... recordVideo locally, and mobilecli signals that local process (the actual writer), so Ctrl-C finalizes the MP4 correctly. (The Android fix in fix: finalize android screenrecord mp4 on ctrl-c by signaling on-device process #249 was needed because the writer ran on-device and didn't receive the forwarded signal.)
screenrecord emits progress on stderr (no JSON on stdout), so it can't use this file's JSON-parsing mobilecli() helper. Added dedicated runners that drive the binary directly while preserving the GOCOVERDIR coverage env.
Verification
Both tests pass on Test-iOS-26:
npx playwright test --project=simulator -g "screenrecord"
2 passed
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6c2f918c-af8a-44d1-b065-68c7153bcd64
📥 Commits
Reviewing files that changed from the base of the PR and between 116ecc8 and 077fe5f.
📒 Files selected for processing (1)
test/simulator.spec.ts
Walkthrough
This PR adds iOS simulator screenrecord test coverage to test/simulator.spec.ts. The changes introduce the spawn import for direct process control, define a Dimensions type for tracking video/screenshot dimensions, add a new test suite with two screenrecord scenarios (one with --time-limit and another interrupted by Ctrl-C), and implement helper functions to drive the screenrecord binary, validate MP4 playability using ffprobe, extract PNG dimensions from the IHDR chunk, and verify that recorded video dimensions match screenshot dimensions.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title accurately and concisely describes the main change: adding iOS simulator screenrecord tests to the test suite.
Description check
✅ Passed
The description is directly related to the changeset, providing context about the tests added, their purpose, relevant notes, and verification results.
Linked Issues check
✅ Passed
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
✅ Passed
Check skipped because no linked issues were found for this pull request.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch test/ios-simulator-screenrecord
Comment @coderabbitai help to get the list of available commands and usage tips.
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
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.
Adds two
screenrecordtests for the iOS simulator intest/simulator.spec.ts, mirroring the Android emulator tests (#249):--time-limit 5-> validates the MP4 withffprobe.Both assert a non-empty, ffprobe-decodable MP4 and that its dimensions match a screenshot. Unlike the emulator, the simulator records at native resolution (1170x2532 == screenshot), so the dimension assertion applies here.
Notes
xcrun simctl io ... recordVideolocally, and mobilecli signals that local process (the actual writer), so Ctrl-C finalizes the MP4 correctly. (The Android fix in fix: finalize android screenrecord mp4 on ctrl-c by signaling on-device process #249 was needed because the writer ran on-device and didn't receive the forwarded signal.)screenrecordemits progress on stderr (no JSON on stdout), so it can't use this file's JSON-parsingmobilecli()helper. Added dedicated runners that drive the binary directly while preserving theGOCOVERDIRcoverage env.Verification
Both tests pass on
Test-iOS-26: