Skip to content

Commit 65da7dc

Browse files
Vlad Lucacicoreycb
authored andcommitted
test: Add new Maestro tests
1 parent 4e43542 commit 65da7dc

File tree

6 files changed

+105
-79
lines changed

6 files changed

+105
-79
lines changed

ui-flows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To be able to run the flows, you need to [install the CLI tools](https://docs.ma
2222

2323
Ensure a device or emulator is running and execute:
2424

25-
- `maestro test ui-flows/validate/ini_withh_demo_account.yml`
25+
- `maestro test ui-flows/validate/init_with_demo_account.yml`
2626
- `maestro test ui-flows/validate/compose_simple_message.yml`
2727

2828
The following commands are limited to the exact emulator configuration mentioned above:
Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,50 @@
1-
appId: net.thunderbird.android.debug
1+
appId: net.thunderbird.android.beta
2+
#maestro test ui-flows/validate/compose_simple_message.yml
23
---
4+
## Compose an email and send it
35
- runFlow:
4-
file: ../shared/onboard_with_demo_account.yml
6+
file: ../shared/onboard_with_configured_account.yml
7+
env:
8+
EMAIL_ADDRESS: "[email protected]"
9+
ACCOUNT_NAME: "Demo Account"
10+
DISPLAY_NAME: "Demo User"
511
when:
612
visible:
713
id: "onboarding_welcome_start_button"
814

915
## Start composing
1016
- tapOn:
11-
id: "net.thunderbird.android.debug:id/floating_action_button"
17+
id: "net.thunderbird.android.beta:id/floating_action_button"
1218

1319
## Compose email
14-
1520
## To
1621
- tapOn:
17-
id: "net.thunderbird.android.debug:id/to"
22+
id: "net.thunderbird.android.beta:id/to"
1823
- inputText: "[email protected]"
1924

20-
## Subject
21-
- tapOn:
22-
id: "net.thunderbird.android.debug:id/subject"
23-
- inputText: "Simple compose test"
24-
2525
## Message
2626
- tapOn:
27-
id: "net.thunderbird.android.debug:id/message_content"
27+
id: "net.thunderbird.android.beta:id/message_content"
28+
point: "56%,33%"
2829
- inputText: "Lorem ipsum dolor sit amet."
2930

30-
## Send
31-
- tapOn:
32-
id: "net.thunderbird.android.debug:id/send"
33-
34-
## Open message
31+
## Subject
3532
- tapOn:
36-
id: "net.thunderbird.android.debug:id/subject"
37-
index: 0
38-
text: "Simple compose test"
33+
id: "net.thunderbird.android.beta:id/subject"
34+
- inputText: "Simple compose test"
3935

4036
## Assert
4137
- assertVisible:
42-
id: "net.thunderbird.android.debug:id/subject"
38+
id: "net.thunderbird.android.beta:id/subject"
4339
text: "Simple compose test"
4440
- assertVisible:
45-
id: "net.thunderbird.android.debug:id/from"
46-
text: "Demo User"
41+
id: "net.thunderbird.android.beta:id/identity"
42+
4743
- assertVisible:
48-
id: "net.thunderbird.android.debug:id/recipient_names"
49-
text: "to [email protected]"
44+
id: "net.thunderbird.android.beta:id/to"
45+
5046

51-
## Delete message
47+
## Send
5248
- tapOn:
53-
id: "net.thunderbird.android.debug:id/delete"
54-
- assertNotVisible:
55-
id: "net.thunderbird.android.debug:id/subject"
56-
text: "Simple compose test"
49+
id: "net.thunderbird.android.beta:id/send"
50+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
appId: net.thunderbird.android.beta
2+
#maestro test ui-flows/validate/configured_account_flow.yml
3+
---
4+
## Get started with Thunderbird using an account that is already configured
5+
- runFlow:
6+
file: ../validate/init_with_configured_account.yml
7+
8+
## Compose an email and send it
9+
- runFlow:
10+
file: ../validate/compose_simple_message.yml
11+
12+
## Open an email, save the sender to contacts and then delete that contact
13+
- runFlow:
14+
file: ../validate/emulator_message_details_show_contact_names.yml

ui-flows/validate/emulator_message_details_show_contact_names.yml

Lines changed: 58 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,104 @@
1-
appId: net.thunderbird.android.debug
1+
appId: net.thunderbird.android.beta
2+
#maestro test ui-flows/validate/emulator_message_details_show_contact_names.yml
23
---
4+
## Open an email, save the sender to contacts and then delete that contact
35
- runFlow:
4-
file: ../shared/onboard_with_demo_account.yml
6+
file: ../shared/onboard_with_configured_account.yml
7+
env:
8+
EMAIL_ADDRESS: "[email protected]"
9+
ACCOUNT_NAME: "Demo Account"
10+
DISPLAY_NAME: "Demo User"
511
when:
612
visible:
713
id: "onboarding_welcome_start_button"
814

915
## Open message
16+
- scrollUntilVisible:
17+
element:
18+
id: "net.thunderbird.android.beta:id/subject"
19+
text: "Message details demo"
20+
direction: DOWN
1021
- tapOn:
11-
id: "net.thunderbird.android.debug:id/subject"
12-
index: 0
22+
id: "net.thunderbird.android.beta:id/subject"
1323
text: "Message details demo"
1424

1525
## Check message
1626
- assertVisible:
17-
id: "net.thunderbird.android.debug:id/from"
18-
text: "Alice"
19-
- assertVisible:
20-
id: "net.thunderbird.android.debug:id/recipient_names"
21-
text: "to User 1.*"
27+
id: "net.thunderbird.android.beta:id/from"
28+
text: "Rogoz Anamaria"
29+
#- assertVisible:
30+
# id: "net.thunderbird.android.beta:id/recipient_names"
31+
# text: "to me"
2232

23-
### Open message details
33+
## Open message details
2434
- runFlow: ../shared/open_message_details.yml
2535

2636
## Check message details
2737
- assertVisible:
28-
id: "net.thunderbird.android.debug:id/name"
29-
text: "Alice"
30-
- assertVisible:
31-
id: "net.thunderbird.android.debug:id/name"
32-
text: "User 1"
38+
id: "net.thunderbird.android.beta:id/name"
39+
text: "Rogoz Anamaria"
40+
#- assertVisible:
41+
# id: "net.thunderbird.android.beta:id/name"
42+
# text: "me"
3343

3444
## Add contacts
3545
- runFlow:
3646
file: ../shared/add_contact.yml
47+
when:
48+
visible:
49+
id: "net.thunderbird.android.beta:id/menu_add_contact"
3750
env:
38-
INDEX: 0
39-
NAME: Alice
40-
FIRST_NAME: Alice
41-
- runFlow:
42-
file: ../shared/add_contact.yml
43-
env:
44-
INDEX: 4
45-
NAME: User 1
46-
FIRST_NAME: User
51+
NAME: Rogoz
52+
FIRST_NAME: Anamaria
53+
#- runFlow:
54+
# file: ../shared/add_contact.yml
55+
# when:
56+
# visible:
57+
# id: "net.thunderbird.android.beta:id/menu_add_contact"
58+
# env:
59+
# NAME: me
4760

48-
## Close message
49-
- tapOn:
50-
id: "com.android.systemui:id/back"
61+
## Close message details
62+
- runFlow: ../shared/close_message_details.yml
63+
64+
## Go back to Inbox
5165
- tapOn:
5266
id: "com.android.systemui:id/back"
5367

5468
## Change settings
5569
- runFlow: ../shared/change_display_settings_show_contact_names.yml
5670

5771
## Open message
72+
- scrollUntilVisible:
73+
element:
74+
id: "net.thunderbird.android.beta:id/subject"
75+
text: "Message details demo"
76+
direction: DOWN
5877
- tapOn:
59-
id: "net.thunderbird.android.debug:id/subject"
78+
id: "net.thunderbird.android.beta:id/subject"
6079
index: 0
6180
text: "Message details demo"
6281

63-
## Check message
64-
- assertVisible:
65-
id: "net.thunderbird.android.debug:id/from"
66-
text: "Alice from Contacts"
67-
- assertVisible:
68-
id: "net.thunderbird.android.debug:id/recipient_names"
69-
text: "to User from Contacts.*"
70-
7182
### Open message details
7283
- runFlow: ../shared/open_message_details.yml
7384

74-
## Check message details
75-
- assertVisible:
76-
id: "net.thunderbird.android.debug:id/name"
77-
text: "Alice from Contacts"
85+
### Check message details
7886
- assertVisible:
79-
id: "net.thunderbird.android.debug:id/name"
80-
text: "User from Contacts 1"
87+
id: "net.thunderbird.android.beta:id/name"
88+
text: "Rogoz from Contacts Anamaria"
89+
#- assertVisible:
90+
# id: "net.thunderbird.android.beta:id/name"
91+
# text: "me"
8192

8293
## Remove contacts
8394
- runFlow:
8495
file: ../shared/remove_contact.yml
8596
env:
86-
NAME: Alice from Contacts
87-
88-
- runFlow:
89-
file: ../shared/remove_contact.yml
90-
env:
91-
NAME: User from Contacts 1
97+
NAME: Anamaria
98+
#- runFlow:
99+
# file: ../shared/remove_contact.yml
100+
# env:
101+
# NAME: me
92102

93103
## Close message
94104
- tapOn:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
appId: net.thunderbird.android.beta
2+
#maestro test ui-flows/validate/init_with_configured_account.yml
3+
---
4+
## Get started with Thunderbird using an account that is already configured
5+
- runFlow:
6+
file: ../shared/onboard_with_configured_account.yml
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
appId: net.thunderbird.android.debug
1+
appId: net.thunderbird.android.beta
2+
#maestro test ui-flows/validate/init_with_demo_account.yml
23
---
4+
## Get started with Thunderbird by creating a demo account
35
- runFlow:
46
file: ../shared/onboard_with_demo_account.yml

0 commit comments

Comments
 (0)