Add maestro test flows to verify show contact names

This commit is contained in:
Wolf Montwe 2023-02-08 11:27:57 +01:00
parent 04e3908293
commit fa5f8bb655
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
10 changed files with 296 additions and 0 deletions

1
ui-flows/custom/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*

View file

@ -0,0 +1,29 @@
appId: com.fsck.k9.debug
---
- launchApp:
clearState: true
# Welcome
- tapOn:
id: "com.fsck.k9.debug:id/next"
## Setup new account
- tapOn:
id: "com.fsck.k9.debug:id/account_email"
- inputText: "demo@k9mail.example"
- tapOn:
id: "com.fsck.k9.debug:id/next"
## Account name configuration
- tapOn:
id: "com.fsck.k9.debug:id/account_description"
- inputText: "demo@k9mail"
- tapOn:
id: "com.fsck.k9.debug:id/account_name"
- inputText: "Demo Account"
- tapOn:
id: "com.fsck.k9.debug:id/done"
## Grant access to contacts
- tapOn:
id: "com.android.permissioncontroller:id/permission_allow_button"

View file

@ -0,0 +1,28 @@
# use env to provide properties:
# env:
# INDEX: 0
# NAME: Alice
# FIRST_NAME: Alice
appId: com.fsck.k9.debug
---
## Add to contact
- tapOn:
id: "com.fsck.k9.debug:id/name"
text: ${NAME}
## Add contact
- tapOn:
id: "com.fsck.k9.debug:id/menu_add_contact"
index: ${INDEX}
- tapOn: ${FIRST_NAME}
- inputText: " from Contacts"
### Save
- tapOn:
id: "com.android.contacts:id/editor_menu_save_button"
### Exit
- tapOn:
id: "com.android.systemui:id/back"

View file

@ -0,0 +1,21 @@
appId: com.fsck.k9.debug
---
## Open settings
- runFlow: open_display_settings.yml
### Scroll to "Show contact names"
- scrollUntilVisible:
element:
id: "android:id/title"
text: "Show contact names"
direction: DOWN
timeout: 10000
### Enable "Show contact names"
- tapOn:
id: "android:id/title"
text: "Show contact names"
### Close settings
- runFlow: close_display_settings.yml

View file

@ -0,0 +1,9 @@
appId: com.fsck.k9.debug
---
- tapOn: "Navigate up"
- tapOn: "Navigate up"
- tapOn: "Navigate up"
- swipe:
direction: LEFT
duration: 200

View file

@ -0,0 +1,22 @@
appId: com.fsck.k9.debug
---
## Open drawer
- tapOn: "Navigate up"
### Open settings
- tapOn:
id: "com.fsck.k9.debug:id/material_drawer_name"
index: 9
### Open general settings
- tapOn:
id: "com.fsck.k9.debug:id/text"
index: 0
text: "General settings"
### Open display settings
- tapOn:
id: "android:id/title"
index: 0
text: "Display"

View file

@ -0,0 +1,14 @@
appId: com.fsck.k9.debug
---
- tapOn:
id: "com.fsck.k9.debug:id/participants_container"
- swipe:
from:
id: "com.fsck.k9.debug:id/message_details_list"
direction: UP
- swipe:
from:
id: "com.fsck.k9.debug:id/message_details_list"
direction: DOWN
duration: 200

View file

@ -0,0 +1,20 @@
# use env to provide properties:
# env:
# NAME: Alice
appId: com.fsck.k9.debug
---
## Open contact
- tapOn:
id: "com.fsck.k9.debug:id/name"
text: ${NAME}
## Delete contact
- tapOn: "More options"
- tapOn:
id: "android:id/title"
index: 1
- tapOn:
id: "android:id/button1"

View file

@ -0,0 +1,60 @@
appId: com.fsck.k9.debug
---
- launchApp
## Start composing
- tapOn:
id: "com.fsck.k9.debug:id/floating_action_button"
## Compose email
## To
- tapOn:
id: "com.fsck.k9.debug:id/to"
- inputText: "bob@example.com"
## Subject
- tapOn:
id: "com.fsck.k9.debug:id/subject"
- inputText: "Compose test"
## Message
- tapOn:
id: "com.fsck.k9.debug:id/message_content"
- inputText: "Lorem ipsum dolor sit amet."
## Send
- tapOn:
id: "com.fsck.k9.debug:id/send"
## Open message
- tapOn:
id: "com.fsck.k9.debug:id/subject"
index: 0
text: "Compose test"
## Assert
- assertVisible:
id: "com.fsck.k9.debug:id/subject"
text: "Compose test"
- assertVisible:
id: "com.fsck.k9.debug:id/from"
text: "Demo Account"
- assertVisible:
id: "com.fsck.k9.debug:id/recipient_names"
text: "to bob@example.com"
- assertVisible: "Lorem ipsum dolor sit amet."
## Delete message
- tapOn:
id: "com.fsck.k9.debug:id/delete"
- assertNotVisible:
id: "com.fsck.k9.debug:id/subject"
text: "Compose test"
## Return to inbox
- tapOn: "Navigate up"
- assertNotVisible:
id: "com.fsck.k9.debug:id/subject"
index: 0
text: "Compose test"

View file

@ -0,0 +1,92 @@
appId: com.fsck.k9.debug
---
- runFlow: login_demo_account.yml
## Open message
- tapOn:
id: "com.fsck.k9.debug:id/subject"
index: 0
text: "Message details demo"
## Check message
- assertVisible:
id: "com.fsck.k9.debug:id/from"
text: "Alice"
- assertVisible:
id: "com.fsck.k9.debug:id/recipient_names"
text: "to User 1.*"
### Open message details
- runFlow: shared/open_message_details.yml
## Check message details
- assertVisible:
id: "com.fsck.k9.debug:id/name"
text: "Alice"
- assertVisible:
id: "com.fsck.k9.debug:id/name"
text: "User 1"
## Add contacts
- runFlow:
file: shared/add_contact.yml
env:
INDEX: 0
NAME: Alice
FIRST_NAME: Alice
- runFlow:
file: shared/add_contact.yml
env:
INDEX: 4
NAME: User 1
FIRST_NAME: User
## Close message
- tapOn:
id: "com.android.systemui:id/back"
- tapOn:
id: "com.android.systemui:id/back"
## Change settings
- runFlow: shared/change_display_settings_show_contact_names.yml
## Open message
- tapOn:
id: "com.fsck.k9.debug:id/subject"
index: 0
text: "Message details demo"
## Check message
- assertVisible:
id: "com.fsck.k9.debug:id/from"
text: "Alice from Contacts"
- assertVisible:
id: "com.fsck.k9.debug:id/recipient_names"
text: "to User from Contacts.*"
### Open message details
- runFlow: shared/open_message_details.yml
## Check message details
- assertVisible:
id: "com.fsck.k9.debug:id/name"
text: "Alice from Contacts"
- assertVisible:
id: "com.fsck.k9.debug:id/name"
text: "User from Contacts 1"
## Remove contacts
- runFlow:
file: shared/remove_contact.yml
env:
NAME: Alice from Contacts
- runFlow:
file: shared/remove_contact.yml
env:
NAME: User from Contacts 1
## Close message
- tapOn:
id: "com.android.systemui:id/back"
- tapOn: "Navigate up"