Skip to content

Commit ed6499c

Browse files
authored
test: 4th batch of room test (#6673)
1 parent 258654c commit ed6499c

File tree

6 files changed

+846
-0
lines changed

6 files changed

+846
-0
lines changed
Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
appId: chat.rocket.reactnative
2+
name: Jump to message
3+
onFlowStart:
4+
- runFlow: '../../helpers/setup.yaml'
5+
onFlowComplete:
6+
- evalScript: ${output.utils.deleteCreatedUsers()}
7+
8+
---
9+
- runFlow: '../../helpers/launch-app.yaml'
10+
- runFlow:
11+
file: '../../helpers/login.yaml'
12+
env:
13+
USERNAME: ${output.account.adminUser}
14+
PASSWORD: ${output.account.adminPassword}
15+
16+
# should jump to an old message and load its surroundings
17+
- runFlow:
18+
file: '../../helpers/navigate-to-room.yaml'
19+
env:
20+
ROOM: 'jumping'
21+
- extendedWaitUntil:
22+
visible:
23+
text: '.*300.*'
24+
timeout: 60000
25+
- extendedWaitUntil:
26+
visible:
27+
text: '.*Quote first message.*'
28+
timeout: 60000
29+
- longPressOn:
30+
text: '.*Quote first message.*'
31+
- extendedWaitUntil:
32+
visible:
33+
text: 'Jump to message'
34+
timeout: 60000
35+
- tapOn:
36+
text: 'Jump to message'
37+
- extendedWaitUntil:
38+
visible:
39+
id: 'message-content-1'
40+
timeout: 60000
41+
- extendedWaitUntil:
42+
visible:
43+
id: 'message-content-2'
44+
timeout: 60000
45+
46+
# should tap FAB and scroll to bottom
47+
- extendedWaitUntil:
48+
visible:
49+
id: 'nav-jump-to-bottom'
50+
timeout: 60000
51+
- tapOn:
52+
id: 'nav-jump-to-bottom'
53+
- extendedWaitUntil:
54+
visible:
55+
text: .*Go to jumping-thread's thread.*
56+
timeout: 60000
57+
- runFlow:
58+
file: './utils/clear-cache.yaml'
59+
60+
# should load messages on scroll
61+
- runFlow:
62+
file: '../../helpers/navigate-to-room.yaml'
63+
env:
64+
ROOM: 'jumping'
65+
- extendedWaitUntil:
66+
visible:
67+
id: 'room-view-messages'
68+
timeout: 60000
69+
- extendedWaitUntil:
70+
visible:
71+
text: '.*300.*'
72+
timeout: 60000
73+
- scrollUntilVisible:
74+
element:
75+
text: '.*249.*'
76+
timeout: 120000
77+
direction: UP
78+
- runFlow:
79+
file: './utils/clear-cache.yaml'
80+
81+
# should search for old message and load its surroundings
82+
- runFlow:
83+
file: '../../helpers/navigate-to-room.yaml'
84+
env:
85+
ROOM: 'jumping'
86+
- extendedWaitUntil:
87+
visible:
88+
id: 'room-view-search'
89+
timeout: 60000
90+
- tapOn:
91+
id: 'room-view-search'
92+
- extendedWaitUntil:
93+
visible:
94+
id: 'search-messages-view'
95+
timeout: 60000
96+
- extendedWaitUntil:
97+
visible:
98+
id: 'search-message-view-input'
99+
timeout: 60000
100+
- tapOn:
101+
id: 'search-message-view-input'
102+
- inputText: '30'
103+
- extendedWaitUntil:
104+
visible:
105+
id: 'message-content-30'
106+
timeout: 60000
107+
- tapOn:
108+
text: '30'
109+
index: 1
110+
- extendedWaitUntil:
111+
visible:
112+
id: 'message-content-29'
113+
timeout: 60000
114+
- extendedWaitUntil:
115+
visible:
116+
id: 'message-content-30'
117+
timeout: 60000
118+
- extendedWaitUntil:
119+
visible:
120+
id: 'message-content-31'
121+
timeout: 60000
122+
123+
# should load newer and older messages
124+
- scrollUntilVisible:
125+
element:
126+
text: 'Load older'
127+
direction: UP
128+
timeout: 60000
129+
- extendedWaitUntil:
130+
visible:
131+
id: 'message-content-5'
132+
timeout: 60000
133+
- tapOn:
134+
text: 'Load older'
135+
- extendedWaitUntil:
136+
visible:
137+
id: 'message-content-4'
138+
timeout: 60000
139+
- scrollUntilVisible:
140+
element:
141+
id: 'message-content-1'
142+
direction: UP
143+
timeout: 60000
144+
- scrollUntilVisible:
145+
element:
146+
id: 'message-content-50'
147+
direction: DOWN
148+
timeout: 60000
149+
- scrollUntilVisible:
150+
element:
151+
text: '.*Load newer.*'
152+
direction: DOWN
153+
timeout: 60000
154+
- tapOn:
155+
text: '.*Load newer.*'
156+
- extendedWaitUntil:
157+
visible:
158+
id: 'message-content-104'
159+
timeout: 60000
160+
- extendedWaitUntil:
161+
visible:
162+
text: '.*Load newer.*'
163+
timeout: 60000
164+
- tapOn:
165+
text: '.*Load newer.*'
166+
- extendedWaitUntil:
167+
visible:
168+
id: 'message-content-154'
169+
timeout: 60000
170+
- extendedWaitUntil:
171+
visible:
172+
text: '.*Load newer.*'
173+
timeout: 60000
174+
- tapOn:
175+
text: '.*Load newer.*'
176+
- extendedWaitUntil:
177+
visible:
178+
id: 'message-content-202'
179+
timeout: 60000
180+
- tapOn:
181+
id: header-back
182+
183+
# should navigate to a thread from another room
184+
- runFlow:
185+
file: '../../helpers/navigate-to-room.yaml'
186+
env:
187+
ROOM: 'jumping'
188+
- extendedWaitUntil:
189+
visible:
190+
text: .*Go to jumping-thread's thread.*
191+
timeout: 60000
192+
- longPressOn:
193+
text: .*Go to jumping-thread's thread.*
194+
- extendedWaitUntil:
195+
visible:
196+
text: 'Jump to message'
197+
timeout: 60000
198+
- tapOn:
199+
text: 'Jump to message'
200+
- runFlow:
201+
file: './utils/expect-thread-messages.yaml'
202+
env:
203+
message: Go to jumping-thread's thread
204+
- tapOn:
205+
id: header-back
206+
207+
# should tap on thread message from main room
208+
- extendedWaitUntil:
209+
visible:
210+
id: 'room-view-title-jumping-thread'
211+
timeout: 60000
212+
- extendedWaitUntil:
213+
visible:
214+
text: '.*thread message sent to main room.*'
215+
timeout: 60000
216+
- tapOn:
217+
text: '.*thread message sent to main room.*'
218+
- runFlow:
219+
file: './utils/expect-thread-messages.yaml'
220+
env:
221+
message: 'thread message sent to main room'
222+
- tapOn:
223+
id: header-back
224+
225+
# should tap on quote
226+
- extendedWaitUntil:
227+
visible:
228+
id: 'room-view-title-jumping-thread'
229+
timeout: 60000
230+
- extendedWaitUntil:
231+
visible:
232+
text: '.*quoted.*'
233+
timeout: 60000
234+
- longPressOn:
235+
text: '.*quoted.*'
236+
- extendedWaitUntil:
237+
visible:
238+
text: 'Jump to message'
239+
timeout: 60000
240+
- tapOn:
241+
text: 'Jump to message'
242+
- runFlow:
243+
file: './utils/expect-thread-messages.yaml'
244+
env:
245+
message: 'quoted'
246+
- tapOn:
247+
id: 'header-back'
248+
249+
# should jump from search message
250+
- extendedWaitUntil:
251+
visible:
252+
id: 'room-view-title-jumping-thread'
253+
timeout: 60000
254+
- tapOn:
255+
id: 'room-view-search'
256+
- extendedWaitUntil:
257+
visible:
258+
id: 'search-messages-view'
259+
timeout: 60000
260+
- extendedWaitUntil:
261+
visible:
262+
id: 'search-message-view-input'
263+
timeout: 60000
264+
- inputText: 'to be searched'
265+
- extendedWaitUntil:
266+
visible:
267+
id: 'message-content-to be searched'
268+
timeout: 60000
269+
- tapOn:
270+
id: 'message-content-to be searched'
271+
- runFlow:
272+
file: './utils/expect-thread-messages.yaml'
273+
env:
274+
message: 'to be searched'
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
appId: chat.rocket.reactnative
2+
name: Mark as unread
3+
onFlowStart:
4+
- runFlow: '../../helpers/setup.yaml'
5+
onFlowComplete:
6+
- evalScript: ${output.utils.deleteCreatedUsers()}
7+
8+
---
9+
- runFlow: '../../helpers/launch-app.yaml'
10+
11+
- evalScript: ${output.user = output.utils.createUser()}
12+
- evalScript: ${output.otherUser = output.utils.createUser()}
13+
- evalScript: ${output.message = output.utils.sendMessage(output.otherUser.username, output.otherUser.password, '@' + output.user.username, 'message-mark-as-unread')}
14+
15+
- runFlow:
16+
file: '../../helpers/login.yaml'
17+
env:
18+
USERNAME: ${output.user.username}
19+
PASSWORD: ${output.user.password}
20+
- runFlow:
21+
file: '../../helpers/navigate-to-room.yaml'
22+
env:
23+
ROOM: ${output.otherUser.username}
24+
25+
# should mark message as unread
26+
- extendedWaitUntil:
27+
visible:
28+
id: 'message-content-message-mark-as-unread'
29+
timeout: 60000
30+
- longPressOn:
31+
id: 'message-content-message-mark-as-unread'
32+
- extendedWaitUntil:
33+
visible:
34+
id: 'action-sheet'
35+
timeout: 60000
36+
- swipe:
37+
from:
38+
id: 'action-sheet-handle'
39+
direction: UP
40+
- extendedWaitUntil:
41+
visible:
42+
text: 'Mark unread'
43+
timeout: 60000
44+
- tapOn:
45+
text: 'Mark unread'
46+
- extendedWaitUntil:
47+
visible:
48+
id: 'rooms-list-view'
49+
timeout: 60000
50+
- extendedWaitUntil:
51+
visible:
52+
id: 'rooms-list-view-item-${output.otherUser.username}'
53+
timeout: 60000
54+
- extendedWaitUntil:
55+
visible:
56+
text: '.*1.*'
57+
childOf:
58+
id: 'rooms-list-view-item-${output.otherUser.username}'
59+
timeout: 60000

0 commit comments

Comments
 (0)