-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for disabling touch indicators with launch args #899
Add support for disabling touch indicators with launch args #899
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this PR!
A few small changes. Thanks
@@ -335,7 +335,7 @@ - (void)applicationWillEnterForeground:(UIApplication *)application | |||
|
|||
- (BOOL)touchVisualizerWindowShouldAlwaysShowFingertip:(COSTouchVisualizerWindow *)window | |||
{ | |||
return YES; | |||
return ![[NSUserDefaults standardUserDefaults] objectForKey:@"detoxDisableTouchIndicators"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not read from the user defaults for every touch.
Please take my changes from https://github.com/wix/detox/pull/751/files
detox/src/devices/Device.test.js
Outdated
@@ -182,6 +182,15 @@ describe('Device', () => { | |||
}); | |||
}); | |||
|
|||
it(`relaunchApp() with disableTouchIndicators should send a boolean switch as a param in launchParams`, async () => { | |||
device = await validDevice(); | |||
await device.relaunchApp({disableTouchIndicators: true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
relaunchApp
is deprecated API. Can you please change it to launchApp
?
Fantastic, thank you! |
Thank you! |
Closes #640
Replaces: #751
@LeoNatan