Skip to content
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 localeScript capability to set script in locale #460

Merged
merged 4 commits into from
Nov 5, 2018

Conversation

KazuCocoa
Copy link
Member

depends on appium/appium-adb#372
After merging the PR, we should update the module.

In this PR, I've introduced localeScript capability to set Hans in zh-Hans-CN. The middle one is named script in the Locale term. It only available in Android so far.

@KazuCocoa KazuCocoa changed the title add localeScript capability add localeScript capability to set script in locale Nov 3, 2018
if (!await adb.ensureCurrentLocale(language, country)) {
throw new Error(`Failed to set language: ${language} and country: ${country}`);
if (!await adb.ensureCurrentLocale(language, country, script)) {
let message;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use a ternary operator here

@mykola-mokhnach
Copy link
Contributor

@KazuCocoa Might it be that something has happened to Unlock script after the SDK tools version has been bumped for Appium Settings: https://travis-ci.org/appium/appium-android-driver/jobs/450112540 ?

@KazuCocoa
Copy link
Member Author

mmm, in my locale, below command worked... let me see.

$ adb shell am start -n io.appium.settings/.Unlock -c android.intent.category.LAUNCHER -a android.intent.action.MAIN -f 0x10200000

@mykola-mokhnach
Copy link
Contributor

Maybe it does not work with API 20 emulator (the one used for this job)?

@KazuCocoa
Copy link
Member Author

KazuCocoa commented Nov 3, 2018

API 19 and 21, arm emulator also worked 🤔
Below tests also passed in my local...

$ npm run mocha -- "-t" "360000" "build/test/functional/commands/keyboard" "-g" "@skip-ci" "-i"
...
  43 passing (7m)

@KazuCocoa KazuCocoa merged commit ea55aec into appium:master Nov 5, 2018
@KazuCocoa KazuCocoa deleted the add-locale-script branch November 5, 2018 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants