1+ appId : chat.rocket.reactnative
2+ name : Room Info
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.room = output.utils.createRandomRoom(output.user.username, output.user.password)}
13+
14+ - runFlow :
15+ file : ' ../../helpers/login.yaml'
16+ env :
17+ USERNAME : ${output.user.username}
18+ PASSWORD : ${output.user.password}
19+ - runFlow :
20+ file : ' ./utils/navigate-to-room-info.yaml'
21+ env :
22+ ROOM : ${output.room.name}
23+
24+ # should have room info view
25+ - extendedWaitUntil :
26+ visible :
27+ id : ' room-info-view'
28+ timeout : 60000
29+
30+ # should have name
31+ - extendedWaitUntil :
32+ visible :
33+ id : ' room-info-view-name'
34+ timeout : 60000
35+
36+ # should have description
37+ - extendedWaitUntil :
38+ visible :
39+ text : ' Description'
40+ timeout : 60000
41+
42+ # should have topic
43+ - extendedWaitUntil :
44+ visible :
45+ text : ' Topic'
46+ timeout : 60000
47+
48+ # should have announcement
49+ - extendedWaitUntil :
50+ visible :
51+ text : ' Announcement'
52+ timeout : 60000
53+
54+ # should have edit button
55+ - extendedWaitUntil :
56+ visible :
57+ id : ' room-info-view-edit-button'
58+ timeout : 60000
59+
60+ - extendedWaitUntil :
61+ visible :
62+ id : ' room-info-view-edit-button'
63+ timeout : 60000
64+ - tapOn :
65+ id : ' room-info-view-edit-button'
66+ - extendedWaitUntil :
67+ visible :
68+ id : ' room-info-edit-view'
69+ timeout : 60000
70+
71+ # should have room info edit view
72+ - extendedWaitUntil :
73+ visible :
74+ id : ' room-info-edit-view'
75+ timeout : 60000
76+
77+ # should have name input
78+ - extendedWaitUntil :
79+ visible :
80+ id : ' room-info-edit-view-name'
81+ timeout : 60000
82+
83+ # should have description input
84+ - extendedWaitUntil :
85+ visible :
86+ id : ' room-info-edit-view-description'
87+ timeout : 60000
88+
89+ # should have topic input
90+ - extendedWaitUntil :
91+ visible :
92+ id : ' room-info-edit-view-topic'
93+ timeout : 60000
94+
95+ # should have announcement input
96+ - extendedWaitUntil :
97+ visible :
98+ id : ' room-info-edit-view-announcement'
99+ timeout : 60000
100+
101+ # should have password input
102+ - scrollUntilVisible :
103+ element :
104+ id : ' room-info-edit-view-password'
105+ timeout : 60000
106+
107+ # should have type switch
108+ - scrollUntilVisible :
109+ element :
110+ id : ' room-info-edit-view-t'
111+ timeout : 60000
112+
113+ # should have ready only switch
114+ - scrollUntilVisible :
115+ element :
116+ id : ' room-info-edit-view-ro'
117+ timeout : 60000
118+
119+ # should have submit button
120+ - scrollUntilVisible :
121+ element :
122+ id : ' room-info-edit-view-submit'
123+ timeout : 60000
124+
125+ # should have reset button
126+ - scrollUntilVisible :
127+ element :
128+ id : ' room-info-edit-view-reset'
129+ timeout : 60000
130+
131+ # should have archive button
132+ - scrollUntilVisible :
133+ element :
134+ id : ' room-info-edit-view-archive'
135+ timeout : 60000
136+
137+ # should have delete button
138+ - scrollUntilVisible :
139+ element :
140+ id : ' room-info-edit-view-delete'
141+ timeout : 60000
142+
143+ # should reset form
144+ - scrollUntilVisible :
145+ element :
146+ id : ' room-info-edit-view-name'
147+ direction : UP
148+ timeout : 60000
149+ - tapOn :
150+ id : room-info-edit-view-name
151+ - eraseText
152+ - inputText : abc
153+ - scrollUntilVisible :
154+ element :
155+ id : ' room-info-edit-view-topic'
156+ timeout : 60000
157+ - tapOn :
158+ id : ' room-info-edit-view-topic'
159+ - inputText : abc
160+ - scrollUntilVisible :
161+ element :
162+ id : ' room-info-edit-view-announcement'
163+ timeout : 60000
164+ - tapOn :
165+ id : ' room-info-edit-view-announcement'
166+ - inputText : abc
167+ - scrollUntilVisible :
168+ element :
169+ id : ' room-info-edit-view-description'
170+ timeout : 60000
171+ - tapOn :
172+ id : ' room-info-edit-view-description'
173+ - inputText : abc
174+ - scrollUntilVisible :
175+ element :
176+ id : ' room-info-edit-view-password'
177+ timeout : 60000
178+ - tapOn :
179+ id : ' room-info-edit-view-password'
180+ - inputText : abc
181+ - pressKey : Enter
182+ - scrollUntilVisible :
183+ element :
184+ id : ' room-info-edit-view-t'
185+ timeout : 60000
186+ - tapOn :
187+ id : ' room-info-edit-view-t'
188+ - scrollUntilVisible :
189+ element :
190+ id : ' room-info-edit-view-ro'
191+ timeout : 60000
192+ - tapOn :
193+ id : ' room-info-edit-view-ro'
194+ - scrollUntilVisible :
195+ element :
196+ id : ' room-info-edit-view-react-when-ro'
197+ timeout : 60000
198+ - tapOn :
199+ id : ' room-info-edit-view-react-when-ro'
200+ - scrollUntilVisible :
201+ element :
202+ id : ' room-info-edit-view-reset'
203+ timeout : 60000
204+ - tapOn :
205+ id : ' room-info-edit-view-reset'
206+
207+ - scrollUntilVisible :
208+ element :
209+ id : ' room-info-edit-view-name'
210+ direction : UP
211+ timeout : 60000
212+ - assertVisible :
213+ text : ' .*${output.room.name}.*'
214+ childOf :
215+ id : ' room-info-edit-view-name'
216+ - scrollUntilVisible :
217+ element :
218+ id : ' room-info-edit-view-topic'
219+ timeout : 60000
220+ - assertVisible :
221+ text : ' '
222+ childOf :
223+ id : ' room-info-edit-view-topic'
224+ - scrollUntilVisible :
225+ element :
226+ id : ' room-info-edit-view-announcement'
227+ timeout : 60000
228+ - assertVisible :
229+ text : ' '
230+ childOf :
231+ id : ' room-info-edit-view-announcement'
232+ - scrollUntilVisible :
233+ element :
234+ id : ' room-info-edit-view-description'
235+ timeout : 60000
236+ - assertVisible :
237+ text : ' '
238+ childOf :
239+ id : ' room-info-edit-view-description'
240+ - scrollUntilVisible :
241+ element :
242+ id : ' room-info-edit-view-password'
243+ timeout : 60000
244+ - assertVisible :
245+ text : ' '
246+ childOf :
247+ id : ' room-info-edit-view-password'
248+ - scrollUntilVisible :
249+ element :
250+ id : ' room-info-edit-view-t'
251+ timeout : 60000
252+ - assertVisible :
253+ checked : false
254+ childOf :
255+ id : ' room-info-edit-view-t'
256+ - scrollUntilVisible :
257+ element :
258+ id : ' room-info-edit-view-ro'
259+ timeout : 60000
260+ - assertVisible :
261+ checked : false
262+ childOf :
263+ id : ' room-info-edit-view-ro'
264+ - scrollUntilVisible :
265+ element :
266+ id : ' room-info-edit-switch-system-messages'
267+ timeout : 60000
268+ - assertNotVisible :
269+ id : ' room-info-edit-view-react-when-ro'
270+
271+ # should change room name
272+ - evalScript : ${output.newroomname = output.room.name + 'new'}
273+ - scrollUntilVisible :
274+ element :
275+ id : ' room-info-edit-view-name'
276+ direction : UP
277+ timeout : 60000
278+ - tapOn :
279+ id : ' room-info-edit-view-name'
280+ - runFlow :
281+ file : ' ../../helpers/erase-text.yaml'
282+ env :
283+ id : ' room-info-edit-view-name'
284+ - inputText : ${output.newroomname}
285+ - pressKey : Enter
286+ - scrollUntilVisible :
287+ element :
288+ id : ' room-info-edit-view-submit'
289+ timeout : 60000
290+ - tapOn :
291+ id : ' room-info-edit-view-submit'
292+ - extendedWaitUntil :
293+ visible :
294+ text : ' .*Settings succesfully changed.*'
295+ timeout : 60000
296+ - tapOn :
297+ id : custom-header-back
298+ - extendedWaitUntil :
299+ visible :
300+ id : ' room-info-view'
301+ timeout : 60000
302+ - assertVisible :
303+ text : ' .*${output.newroomname}.*'
304+ - tapOn :
305+ id : room-info-view-edit-button
306+ - extendedWaitUntil :
307+ visible :
308+ id : ' room-info-edit-view'
309+ timeout : 60000
310+
311+ # should change room description, topic, announcement
312+ - scrollUntilVisible :
313+ element :
314+ id : ' room-info-edit-view-topic'
315+ timeout : 60000
316+ - tapOn :
317+ id : ' room-info-edit-view-topic'
318+ - inputText : ' new topic'
319+ - scrollUntilVisible :
320+ element :
321+ id : ' room-info-edit-view-announcement'
322+ timeout : 60000
323+ - tapOn :
324+ id : ' room-info-edit-view-announcement'
325+ - inputText : ' new announcement'
326+ - scrollUntilVisible :
327+ element :
328+ id : ' room-info-edit-view-description'
329+ timeout : 60000
330+ - tapOn :
331+ id : ' room-info-edit-view-description'
332+ - inputText : ' new description'
333+ - pressKey : Enter
334+ - scrollUntilVisible :
335+ element :
336+ id : ' room-info-edit-view-submit'
337+ timeout : 60000
338+ - tapOn :
339+ id : ' room-info-edit-view-submit'
340+ - extendedWaitUntil :
341+ visible :
342+ text : ' .*Settings succesfully changed.*'
343+ timeout : 60000
344+ - tapOn :
345+ id : custom-header-back
346+ - extendedWaitUntil :
347+ visible :
348+ id : ' room-info-view'
349+ timeout : 60000
350+ - assertVisible :
351+ text : ' .*new description.*'
352+ - assertVisible :
353+ text : ' .*new topic.*'
354+ - assertVisible :
355+ text : ' .*new announcement.*'
356+ - tapOn :
357+ id : room-info-view-edit-button
358+ - extendedWaitUntil :
359+ visible :
360+ id : ' room-info-edit-view'
361+ timeout : 60000
362+
363+ # should change room type
364+ - scrollUntilVisible :
365+ element :
366+ id : ' room-info-edit-view-t'
367+ timeout : 60000
368+ - tapOn :
369+ id : ' room-info-edit-view-t'
370+ - scrollUntilVisible :
371+ element :
372+ id : ' room-info-edit-view-submit'
373+ timeout : 60000
374+ - tapOn :
375+ id : ' room-info-edit-view-submit'
376+ - extendedWaitUntil :
377+ visible :
378+ text : ' .*Settings succesfully changed.*'
379+ timeout : 60000
380+
381+ # should archive room
382+ - scrollUntilVisible :
383+ element :
384+ id : ' room-info-edit-view-archive'
385+ timeout : 60000
386+ - tapOn :
387+ id : ' room-info-edit-view-archive'
388+ - extendedWaitUntil :
389+ visible :
390+ text : ' .*Do you really want to archive this room.*'
391+ timeout : 60000
392+ - extendedWaitUntil :
393+ visible :
394+ text : ' .*Yes, archive it.*'
395+ timeout : 60000
396+ - tapOn :
397+ text : ' Yes, archive it.'
0 commit comments