Skip to content

Commit 4d068c9

Browse files
authored
test: Add teams coverage to Maestro (#6561)
1 parent e6ccae7 commit 4d068c9

20 files changed

+655
-33
lines changed

.github/workflows/maestro-android.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
sleep 10
5252
adb shell am force-stop chat.rocket.reactnative
5353
export MAESTRO_USE_GRAALJS=true
54+
export MAESTRO_DRIVER_STARTUP_TIMEOUT=60000
5455
maestro test .maestro --format junit --output maestro-report.xml
5556
5657
- name: Upload Test Report

.github/workflows/maestro-ios.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
- name: Run Tests
5858
run: |
5959
export MAESTRO_USE_GRAALJS=true
60+
export MAESTRO_DRIVER_STARTUP_TIMEOUT=60000
6061
maestro test .maestro --format junit --output maestro-report.xml
6162
6263
- name: Upload Test Report

.maestro/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ flows:
44
- onboarding/login/*
55
- onboarding/register/*
66
- onboarding/workspace/*
7+
- teams/*
78
excludeTags:
89
- 'util'

.maestro/helpers/go-back.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,11 @@ tags:
1010
commands:
1111
- tapOn:
1212
id: 'custom-header-back'
13+
14+
- runFlow:
15+
when:
16+
visible:
17+
id: 'header-back'
18+
commands:
19+
- tapOn:
20+
id: 'header-back'

.maestro/helpers/login.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@ onFlowStart:
1212
when:
1313
true: ${!USERNAME}
1414
commands:
15-
- evalScript: ${console.log('No username, creating user')}
16-
- evalScript: ${output.utils.createUser()}
15+
- evalScript: ${output.createdUser = output.utils.createUser()}
1716

1817
---
1918
- runFlow: navigate-to-login.yaml
2019
- tapOn:
2120
id: login-view-email
22-
- inputText: ${USERNAME || output.user.email}
21+
- inputText: ${USERNAME || output.createdUser.email}
2322
- hideKeyboard
2423
- tapOn:
2524
id: login-view-password
26-
- inputText: ${PASSWORD || output.user.password}
25+
- inputText: ${PASSWORD || output.createdUser.password}
2726
- hideKeyboard
2827
- tapOn:
2928
id: login-view-submit

.maestro/helpers/logout.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ tags:
4646
when:
4747
platform: Android
4848
commands:
49+
- extendedWaitUntil:
50+
visible:
51+
text: 'LOGOUT'
52+
timeout: 60000
4953
- tapOn: 'LOGOUT'
5054

5155
- runFlow:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
appId: chat.rocket.reactnative
2+
name: Navigate to room
3+
jsEngine: graaljs
4+
tags:
5+
- 'util'
6+
7+
---
8+
- scrollUntilVisible:
9+
element:
10+
id: 'rooms-list-view-item-${ROOM}'
11+
- tapOn:
12+
id: 'rooms-list-view-item-${ROOM}'
13+
- extendedWaitUntil:
14+
visible:
15+
id: 'room-view-title-${ROOM}'
16+
timeout: 60000

.maestro/onboarding/change-password.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Required Password Change
33
jsEngine: graaljs
44
onFlowStart:
55
- runFlow: '../helpers/setup.yaml'
6-
- evalScript: ${output.utils.createUserWithPasswordChange()}
6+
- evalScript: ${output.createdUser = output.utils.createUserWithPasswordChange()}
77
onFlowEnd:
88
- evalScript: ${output.utils.deleteCreatedUsers()}
99

@@ -12,8 +12,8 @@ onFlowEnd:
1212
- runFlow:
1313
file: ../helpers/login.yaml
1414
env:
15-
USERNAME: ${output.user.username}
16-
PASSWORD: ${output.user.password}
15+
USERNAME: ${output.createdUser.username}
16+
PASSWORD: ${output.createdUser.password}
1717
- extendedWaitUntil:
1818
visible: You need to change your password
1919
timeout: 60000
@@ -43,7 +43,7 @@ onFlowEnd:
4343
- runFlow:
4444
file: ../helpers/login.yaml
4545
env:
46-
USERNAME: ${output.user.username}
46+
USERNAME: ${output.createdUser.username}
4747
PASSWORD: 123456
4848
- assertVisible:
4949
id: 'rooms-list-view-item-general'

.maestro/onboarding/forgot-password.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Forgot Password
33
jsEngine: graaljs
44
onFlowStart:
55
- runFlow: '../helpers/setup.yaml'
6-
- evalScript: ${output.utils.createUser()}
6+
- evalScript: ${output.createdUser = output.utils.createUser()}
77

88
---
99
- runFlow: ../helpers/launch-app.yaml
@@ -15,7 +15,7 @@ onFlowStart:
1515
id: 'forgot-password-view'
1616
timeout: 60000
1717
- inputText:
18-
text: ${output.user.email}
18+
text: ${output.createdUser.email}
1919
- tapOn:
2020
id: 'forgot-password-view-submit'
2121
- extendedWaitUntil:

.maestro/onboarding/login/login.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Login
33
jsEngine: graaljs
44
onFlowStart:
55
- runFlow: ../../helpers/setup.yaml
6-
- evalScript: ${output.utils.createUser()}
6+
- evalScript: ${output.createdUser = output.utils.createUser()}
77
onFlowComplete:
88
- evalScript: ${output.utils.deleteCreatedUsers()}
99

@@ -12,11 +12,11 @@ onFlowComplete:
1212
- runFlow: ../../helpers/navigate-to-login.yaml
1313
- tapOn:
1414
id: 'login-view-email'
15-
- inputText: ${output.user.email}
15+
- inputText: ${output.createdUser.email}
1616
- hideKeyboard
1717
- tapOn:
1818
id: 'login-view-password'
19-
- inputText: ${output.user.password}
19+
- inputText: ${output.createdUser.password}
2020
- hideKeyboard
2121
- tapOn:
2222
id: login-view-submit

0 commit comments

Comments
 (0)