-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
feat: switch reduce motion via settings API #1065
feat: switch reduce motion via settings API #1065
Conversation
lib/driver.js
Outdated
* @param {?boolean} motion Wether enable reduceMotion | ||
*/ | ||
async setReduceMotion (motion) { | ||
if (this.isSimulator()) { |
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.
if (this.isRealDevice() || !_.isBoolean(isEnabled)) {
return;
}
...
lib/driver.js
Outdated
/** | ||
* Set reduceMotion as 'motion' or set false if no 'reduceMotion' in capabilities. | ||
* It works only on simulator. | ||
* @param {?boolean} motion Wether enable reduceMotion |
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.
how about isEnabled?
lib/driver.js
Outdated
@@ -1146,6 +1143,19 @@ class XCUITestDriver extends BaseDriver { | |||
} | |||
} | |||
|
|||
/** | |||
* Set reduceMotion as 'motion' or set false if no 'reduceMotion' in capabilities. | |||
* It works only on simulator. |
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.
I'd rather say - the call is ignored for real devices
lib/driver.js
Outdated
return; | ||
} | ||
|
||
log.info(`set reduceMotion to ${isEnabled}`); |
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.
Setting ...
…r pref (appium#1065) * Call settins api to reduceMotion instead of changing simulator config * extract setReduceMotion * bump wda version * fix review, set false by default * ignore reduceMotion when no reduceMotion is in caps * tweak log wording
related to appium/WebDriverAgent#202
Before:
After: