Features
Previously you could override these options only via command line arguments. Now you can modify them via JS/JSON configs:
interface DetoxAndroidEmulatorDriverConfig extends DetoxSharedAndroidDriverConfig {
type: 'android.emulator';
device: string | { avdName: string };
+ bootArgs?: string;
+ gpuMode?: 'auto' | 'host' | 'swiftshader_indirect' | 'angle_indirect' | 'guest';
+ headless?: boolean;
+ readonly?: boolean;
}
interface DetoxSharedAndroidDriverConfig {
+ forceAdbInstall?: boolean;
utilBinaryPaths?: string[];
}
interface DetoxIosSimulatorDriverConfig {
type: 'ios.simulator';
device: string | Partial<IosSimulatorQuery>;
+ bootArgs?: string;
}
Now you can persist app launch args between device.selectApp(name)
calls, e.g.:
device.appLaunchArgs.modify({ ourMockServerPort: 9999 }, { permanent: true });
await device.selectApp('app2');
device.appLaunchArgs.get(); // { ourMockServerPort: 9999 }
Deprecations
- CLI: avoid using
--device-launch-args
if you already do – use--device-boot-args
instead. Otherwise, you'll be seeing deprecation warnings