feat(ios): launch via XCTest with env vars for hierarchy/tap access (#39)

* feat(proto): add env map to LaunchRequest

* feat(driver): add env param to Launch interface and all implementations

* feat(sidecar): add IosDriverBackend using Maestro IOSDriver + env pass-through

* feat(testrun): launch iOS app via XCTest with env vars instead of simctl

* fix(ios): replace LaunchApp with BootedUDID; simctl launch moved to XCTest path

* test(cli): add tests for ios platform flag and ios-device flag parsing

* fix(sdk-ios): check semaphore wait result; resolve port from args and env; register extractors before start
This commit is contained in:
pj authored and GitHub committed 2026-04-23 17:35:31 +07:00
1 parent 007dcddd69
commit 97154cf580
20 files changed
+323 -90

No files matched your search

+29
View File
@@ -146,6 +146,35 @@ func TestRun_Doctor(t *testing.T) {
}
}
func TestParseTestArgs_AcceptsIosPlatform(t *testing.T) {
options, err := parseTestArgs([]string{
"--spec", "s.ts",
"--bundle-id", "com.example.app",
"--platform", "ios",
}, io.Discard)
if err != nil {
t.Fatalf("unexpected error for ios platform: %v", err)
}
if options.platform != "ios" {
t.Errorf("expected platform=ios, got %q", options.platform)
}
}
func TestParseTestArgs_IosDeviceFlag(t *testing.T) {
options, err := parseTestArgs([]string{
"--spec", "s.ts",
"--bundle-id", "com.example.app",
"--platform", "ios",
"--ios-device", "iPhone 15 Pro",
}, io.Discard)
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if options.iosDevice != "iPhone 15 Pro" {
t.Errorf("expected iosDevice=iPhone 15 Pro, got %q", options.iosDevice)
}
}
func TestRun_TestSubcommand_PipelineErrors(t *testing.T) {
// Without a real spec, a real device, or a bootable AVD the pipeline
// must surface a specific error rather than panicking — proves the flag