-
Notifications
You must be signed in to change notification settings - Fork 105
Adds Google login Maestro flow #2788
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
base: main
Are you sure you want to change the base?
Changes from all commits
a646c6c
96ee89e
9eab50f
ad50997
a346fe4
3816f1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # We could save a few steps in this flow by immediately opening the Add Account screen in the Settings app: | ||
| # adb shell am start -a android.settings.ADD_ACCOUNT_SETTINGS -n com.android.settings/.accounts.AddAccountSettings; | ||
|
|
||
| # This flow requires passing the user name and password as parameters like so: | ||
| # maestro test -e [email protected] -e PASSWORD=123 google-login.yml | ||
|
|
||
| appId: "com.android.settings" | ||
| --- | ||
| - launchApp | ||
| - scrollUntilVisible: | ||
| element: "Passwords & accounts" | ||
| - tapOn: "Passwords & accounts" | ||
| - runFlow: | ||
| when: | ||
| notVisible: ${USERNAME} | ||
| commands: | ||
| - tapOn: "Add account" | ||
| - tapOn: "Google" | ||
| - tapOn: | ||
| id: identifierId | ||
| - inputText: ${USERNAME} | ||
| - tapOn: NEXT | ||
| - assertVisible: "Show password" | ||
| - inputText: ${PASSWORD} | ||
| - tapOn: NEXT | ||
| - tapOn: "I agree" | ||
| - waitForAnimationToEnd | ||
| # Skip and cancel whatever Google asks us | ||
| - repeat: | ||
| while: | ||
| visible: "Cancel" | ||
| commands: | ||
| - tapOn: "Cancel" | ||
| - repeat: | ||
| while: | ||
| visible: "Skip" | ||
| commands: | ||
| - tapOn: "Skip" | ||
|
Comment on lines
+29
to
+38
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if there is a "Cancel" after a "Skip"? I think this would not work. I guess we know that this won't happen? |
||
| - runFlow: | ||
| label: "Ensure Auto Backup is disabled" | ||
| when: | ||
| visible: "Back up device data" | ||
| commands: | ||
| - tapOn: | ||
| checked: true | ||
| - tapOn: "Accept" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # We could save a few steps in this flow by immediately opening the Add Account screen in the Settings app: | ||
| # adb shell am start -a android.settings.ADD_ACCOUNT_SETTINGS -n com.android.settings/.accounts.AddAccountSettings; | ||
|
|
||
| # This flow requires passing the user name and password as parameters like so: | ||
| # maestro test -e [email protected] -e PASSWORD=123 google-login.yml | ||
|
|
||
| appId: "com.android.settings" | ||
| --- | ||
| - launchApp | ||
| - scrollUntilVisible: | ||
| element: "Passwords, passkeys & accounts" | ||
| - tapOn: "Passwords, passkeys & accounts" | ||
| - runFlow: | ||
| when: | ||
| notVisible: ${USERNAME} | ||
| commands: | ||
| - runFlow: | ||
| label: "Ensure auto-fill is disabled" | ||
| when: | ||
| notVisible: "None selected" | ||
| commands: | ||
| - tapOn: "Change" | ||
| - tapOn: "None" | ||
| - tapOn: "Turn off" | ||
| - back | ||
| - tapOn: "Add account" | ||
| - tapOn: "Google" | ||
| - tapOn: | ||
| id: identifierId | ||
| - inputText: ${USERNAME} | ||
| - tapOn: NEXT | ||
| - assertVisible: "Show password" | ||
| - inputText: ${PASSWORD} | ||
| - tapOn: NEXT | ||
| - tapOn: "I agree" | ||
| - waitForAnimationToEnd | ||
| # Skip and cancel whatever Google asks us | ||
| - repeat: | ||
| while: | ||
| visible: "Cancel" | ||
| commands: | ||
| - tapOn: "Cancel" | ||
| - repeat: | ||
| while: | ||
| visible: "Skip" | ||
| commands: | ||
| - tapOn: "Skip" | ||
| - runFlow: | ||
| label: "Ensure Auto Backup is disabled" | ||
| when: | ||
| visible: "Back up device data" | ||
| commands: | ||
| - tapOn: | ||
| checked: true | ||
| - tapOn: "Accept" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||
| # This flow requires passing the Android API version, user name and password as parameters like so: | ||||||
| # maestro test -e API_VERSION 36 -e [email protected] -e PASSWORD=123 google-login.yml | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| appId: "com.android.settings" | ||||||
| --- | ||||||
| - runFlow: | ||||||
| label: "Log in on API >= 36" | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is great 🙌 |
||||||
| when: | ||||||
| true: ${API_VERSION >= 36} | ||||||
| file: api/36.yml | ||||||
| - runFlow: | ||||||
| label: "Log in on API >= 32" | ||||||
| when: | ||||||
| true: ${API_VERSION >= 32 && API_VERSION < 36} | ||||||
| file: api/32.yml | ||||||
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.
Smart one 😅