Skip to content

Commit b1c22c7

Browse files
authored
test: 2nd set of room test in maestro (#6606)
1 parent fc73bf3 commit b1c22c7

File tree

4 files changed

+376
-2
lines changed

4 files changed

+376
-2
lines changed

.maestro/tests/room/create-room.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ onFlowComplete:
66
- evalScript: ${output.utils.deleteCreatedUsers()}
77

88
---
9-
- runFlow: ../../helpers/launch-app.yaml
10-
- runFlow: ../../helpers/login.yaml
9+
- runFlow: '../../helpers/launch-app.yaml'
10+
- runFlow: '../../helpers/login.yaml'
1111

1212
- extendedWaitUntil:
1313
visible:
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
appId: chat.rocket.reactnative
2+
name: Ignore User
3+
onFlowStart:
4+
- runFlow: '../../helpers/setup.yaml'
5+
6+
---
7+
- runFlow: '../../helpers/launch-app.yaml'
8+
9+
- evalScript: ${output.user = output.utils.createUser()}
10+
- evalScript: ${output.otherUser = output.utils.createUser()}
11+
- evalScript: ${output.room = output.utils.createRandomRoom(output.user.username, output.user.password)}
12+
13+
- runFlow:
14+
file: '../../helpers/login.yaml'
15+
env:
16+
USERNAME: ${output.user.username}
17+
PASSWORD: ${output.user.password}
18+
19+
# should go to user info view
20+
- runFlow:
21+
file: '../../helpers/search-and-navigate-room.yaml'
22+
env:
23+
ROOM: ${output.otherUser.username}
24+
- runFlow:
25+
file: './utils/navigate-to-info-view.yaml'
26+
27+
# should block user
28+
- extendedWaitUntil:
29+
visible:
30+
text: 'Block'
31+
timeout: 60000
32+
- tapOn: 'Block'
33+
- extendedWaitUntil:
34+
visible:
35+
text: 'Unblock'
36+
timeout: 60000
37+
- runFlow: '../../helpers/go-back.yaml'
38+
- extendedWaitUntil:
39+
visible:
40+
id: 'room-actions-view'
41+
timeout: 60000
42+
- runFlow: '../../helpers/go-back.yaml'
43+
- runFlow:
44+
file: '../../helpers/navigate-to-room.yaml'
45+
env:
46+
ROOM: ${output.otherUser.username}
47+
- extendedWaitUntil:
48+
visible:
49+
text: 'This room is blocked'
50+
timeout: 60000
51+
52+
# should unblock user
53+
- runFlow:
54+
file: './utils/navigate-to-info-view.yaml'
55+
- extendedWaitUntil:
56+
visible:
57+
text: 'Unblock'
58+
timeout: 60000
59+
- tapOn: 'Unblock'
60+
- extendedWaitUntil:
61+
visible:
62+
text: 'Block'
63+
timeout: 60000
64+
- runFlow: '../../helpers/go-back.yaml'
65+
- extendedWaitUntil:
66+
visible:
67+
id: 'room-actions-view'
68+
timeout: 60000
69+
- runFlow: '../../helpers/go-back.yaml'
70+
- runFlow:
71+
file: '../../helpers/navigate-to-room.yaml'
72+
env:
73+
ROOM: ${output.otherUser.username}
74+
- extendedWaitUntil:
75+
visible:
76+
id: 'message-composer'
77+
timeout: 60000
78+
- runFlow: '../../helpers/go-back.yaml'
79+
80+
# should ignore user from message
81+
- runFlow:
82+
file: '../../helpers/search-and-navigate-room.yaml'
83+
env:
84+
ROOM: ${output.room.name}
85+
- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room._id, 'message-01')}
86+
- evalScript: ${output.utils.sendMessage(output.otherUser.username, output.otherUser.password, output.room._id, 'message-02')}
87+
- extendedWaitUntil:
88+
visible:
89+
text: ${output.otherUser.username}
90+
index: 0
91+
timeout: 60000
92+
- tapOn: ${output.otherUser.username}
93+
- extendedWaitUntil:
94+
visible:
95+
text: 'Ignore'
96+
childOf:
97+
id: room-info-view-ignore
98+
timeout: 60000
99+
- tapOn: 'Ignore'
100+
- extendedWaitUntil:
101+
visible:
102+
text: 'Unignore'
103+
childOf:
104+
id: room-info-view-ignore
105+
timeout: 60000
106+
- runFlow: '../../helpers/go-back.yaml'
107+
108+
# should tap to display message
109+
- runFlow:
110+
file: '../../helpers/search-and-navigate-room.yaml'
111+
env:
112+
ROOM: ${output.room.name}
113+
- extendedWaitUntil:
114+
visible:
115+
text: .*Message ignored. Tap to display it.*
116+
index: 0
117+
timeout: 60000
118+
- tapOn: .*Message ignored. Tap to display it.*
119+
- extendedWaitUntil:
120+
visible:
121+
text: ${output.otherUser.username}
122+
index: 0
123+
timeout: 60000
124+
- extendedWaitUntil:
125+
visible:
126+
text: 'message-02'
127+
index: 0
128+
timeout: 60000
129+
- extendedWaitUntil:
130+
visible:
131+
text: ${output.otherUser.username}
132+
index: 0
133+
timeout: 60000
134+
- tapOn: ${output.otherUser.username}
135+
- extendedWaitUntil:
136+
visible:
137+
text: 'Unignore'
138+
childOf:
139+
id: room-info-view-ignore
140+
timeout: 60000
141+
- tapOn: 'Unignore'
142+
- extendedWaitUntil:
143+
visible:
144+
text: 'Ignore'
145+
childOf:
146+
id: room-info-view-ignore
147+
timeout: 60000
148+
- runFlow: '../../helpers/go-back.yaml'
149+
- runFlow:
150+
file: '../../helpers/search-and-navigate-room.yaml'
151+
env:
152+
ROOM: ${output.room.name}
153+
- extendedWaitUntil:
154+
visible:
155+
text: 'message-02'
156+
index: 0
157+
timeout: 60000
158+
159+
# should go to user info view from a DM
160+
- runFlow: '../../helpers/go-back.yaml'
161+
- runFlow:
162+
file: '../../helpers/search-and-navigate-room.yaml'
163+
env:
164+
ROOM: ${output.otherUser.username}
165+
- runFlow: './utils/navigate-to-info-view.yaml'
166+
167+
# should report a user from a DM
168+
- extendedWaitUntil:
169+
visible:
170+
text: 'Report'
171+
childOf:
172+
id: room-info-view-warning
173+
timeout: 60000
174+
- tapOn: 'Report'
175+
- extendedWaitUntil:
176+
visible:
177+
id: 'report-user-view'
178+
timeout: 60000
179+
- extendedWaitUntil:
180+
visible:
181+
id: 'report-user-view-input'
182+
timeout: 60000
183+
- tapOn:
184+
id: 'report-user-view-input'
185+
- inputText: 'e2e test'
186+
- extendedWaitUntil:
187+
visible:
188+
id: 'report-user-view-submit'
189+
timeout: 60000
190+
- hideKeyboard
191+
- tapOn:
192+
id: 'report-user-view-submit'
193+
- extendedWaitUntil:
194+
visible:
195+
id: 'room-view-title-${output.otherUser.username}'
196+
timeout: 60000
197+
198+
# should go to user info view from a channel
199+
- runFlow: '../../helpers/go-back.yaml'
200+
- runFlow:
201+
file: '../../helpers/search-and-navigate-room.yaml'
202+
env:
203+
ROOM: ${output.room.name}
204+
- extendedWaitUntil:
205+
visible:
206+
text: ${output.otherUser.username}
207+
timeout: 60000
208+
- tapOn: ${output.otherUser.username}
209+
- extendedWaitUntil:
210+
visible:
211+
id: 'room-info-view'
212+
timeout: 60000
213+
214+
# should report a user from a channel
215+
- extendedWaitUntil:
216+
visible:
217+
text: 'Report'
218+
childOf:
219+
id: room-info-view-warning
220+
- tapOn: 'Report'
221+
- extendedWaitUntil:
222+
visible:
223+
id: 'report-user-view'
224+
timeout: 60000
225+
- extendedWaitUntil:
226+
visible:
227+
id: 'report-user-view-input'
228+
timeout: 60000
229+
- tapOn:
230+
id: 'report-user-view-input'
231+
- inputText: 'e2e test'
232+
- hideKeyboard
233+
- extendedWaitUntil:
234+
visible:
235+
id: 'report-user-view-submit'
236+
timeout: 60000
237+
- tapOn:
238+
id: 'report-user-view-submit'
239+
- extendedWaitUntil:
240+
visible:
241+
id: 'room-view-title-${output.room.name}'
242+
timeout: 60000
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
appId: chat.rocket.reactnative
2+
name: Share Message
3+
onFlowStart:
4+
- runFlow: '../../helpers/setup.yaml'
5+
6+
---
7+
- runFlow: '../../helpers/launch-app.yaml'
8+
9+
- evalScript: ${output.user = output.utils.createUser()}
10+
- evalScript: ${output.otherUser = output.utils.createUser()}
11+
- evalScript: ${output.room = output.utils.createRandomRoom(output.user.username, output.user.password)}
12+
13+
- runFlow:
14+
file: '../../helpers/login.yaml'
15+
env:
16+
USERNAME: ${output.user.username}
17+
PASSWORD: ${output.user.password}
18+
19+
# Start a DM with other user
20+
- runFlow:
21+
file: '../../helpers/search-and-navigate-room.yaml'
22+
env:
23+
ROOM: ${output.otherUser.username}
24+
- runFlow:
25+
file: '../../helpers/send-message.yaml'
26+
env:
27+
message: 'Hello user'
28+
- runFlow: '../../helpers/go-back.yaml'
29+
30+
# should navigate to room and send a message
31+
- runFlow:
32+
file: '../../helpers/search-and-navigate-room.yaml'
33+
env:
34+
ROOM: ${output.room.name}
35+
- runFlow:
36+
file: '../../helpers/send-message.yaml'
37+
env:
38+
message: 'Hello room'
39+
40+
# should open the action sheet and tap Forward
41+
- extendedWaitUntil:
42+
visible:
43+
text: 'Hello room'
44+
index: 0
45+
timeout: 60000
46+
- longPressOn: 'Hello room'
47+
- extendedWaitUntil:
48+
visible:
49+
id: 'action-sheet'
50+
timeout: 60000
51+
- extendedWaitUntil:
52+
visible:
53+
text: 'Forward'
54+
timeout: 60000
55+
- tapOn: 'Forward'
56+
57+
# should forward the message
58+
- extendedWaitUntil:
59+
visible:
60+
id: 'forward-message-view'
61+
timeout: 60000
62+
- tapOn: 'Select'
63+
- extendedWaitUntil:
64+
visible:
65+
id: 'multi-select-search'
66+
timeout: 60000
67+
- tapOn:
68+
id: 'multi-select-search'
69+
- inputText: ${output.otherUser.username}
70+
- hideKeyboard
71+
- extendedWaitUntil:
72+
visible:
73+
id: multi-select-item-${output.otherUser.username.toLowerCase()}
74+
timeout: 60000
75+
- tapOn:
76+
id: multi-select-item-${output.otherUser.username.toLowerCase()}
77+
- swipe:
78+
id: 'action-sheet-handle'
79+
direction: DOWN
80+
- extendedWaitUntil:
81+
notVisible:
82+
id: 'multi-select-search'
83+
timeout: 60000
84+
- extendedWaitUntil:
85+
visible:
86+
id: 'forward-message-view-send'
87+
timeout: 60000
88+
- tapOn:
89+
id: 'forward-message-view-send'
90+
- extendedWaitUntil:
91+
visible:
92+
id: 'room-view-title-${output.room.name}'
93+
timeout: 60000
94+
95+
# should go to otherUser DM and verify if exist both messages
96+
- runFlow: '../../helpers/go-back.yaml'
97+
- runFlow:
98+
file: '../../helpers/search-and-navigate-room.yaml'
99+
env:
100+
ROOM: ${output.otherUser.username}
101+
- extendedWaitUntil:
102+
visible:
103+
text: 'Hello user'
104+
timeout: 60000
105+
- extendedWaitUntil:
106+
visible:
107+
text: 'Hello room'
108+
timeout: 60000
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
appId: chat.rocket.reactnative
2+
name: Navigate to info view
3+
tags:
4+
- 'util'
5+
6+
---
7+
- extendedWaitUntil:
8+
visible:
9+
id: room-header
10+
timeout: 60000
11+
- tapOn:
12+
id: room-header
13+
- extendedWaitUntil:
14+
visible:
15+
id: room-actions-view
16+
timeout: 60000
17+
- assertVisible:
18+
id: room-actions-info
19+
- tapOn:
20+
id: room-actions-info
21+
- extendedWaitUntil:
22+
visible:
23+
id: room-info-view
24+
timeout: 60000

0 commit comments

Comments
 (0)