Skip to content

Commit 10d7761

Browse files
committed
New actions and variations of existing actions
New variations: - `check` now can check an element inside another element - *e.g.,* `When I check <#foo> inside <#bar> - *e.g.,* `When I check "Hello" in <#bar> - `uncheck` now can uncheck an element inside another element - *e.g.,* `When I uncheck <#foo> inside <#bar> - *e.g.,* `When I uncheck "Hello" in <#bar> - `click` now can click an element inside another element - *e.g.,* `When I click <#foo> inside <#bar> - *e.g.,* `When I click "Hello" in <#bar> - `doubleClick` now can click an element inside another element - *e.g.,* `When I double click <#foo> inside <#bar> - *e.g.,* `When I double click "Hello" in <#bar> - all the `wait` options now accept seconds - *e.g.,* `When I wait 3 seconds for the url "/foo" - *e.g.,* `When I wait 5 seconds for <#foo> to be visible - *e.g.,* `When I wait 3 seconds for {Bar} to be enabled etc. - New actions: - accept - *e.g.,* `When I accept the alert` - *e.g.,* `When I accept the confirmation` - *e.g.,* `When I accept the popup` - *e.g.,* `When I accept the prompt` - cancel - *e.g.,* `When I cancel the alert` - *e.g.,* `When I cancel the confirmation` - *e.g.,* `When I cancel the popup` - *e.g.,* `When I cancel the prompt` - switch to a tag by number - *e.g.,* `When I switch to the tab 3` - switch to the next tab - *e.g.,* `When I switch to the next tab` - switch to the previous tab - *e.g.,* `When I switch to the previous tab` - wait to hide - *e.g.,* `When I wait <#foo> to hide` - *e.g.,* `When I wait 3 seconds for <#foo> to hide` - wait for value - *e.g.,* `When I wait for the value "foo" in <#bar>` - *e.g.,* `When I wait 3 seconds for the value "foo" in <#bar>` - wait for a number of visible elements - *e.g.,* `When I wait <#foo> to have 3 visible elements`
1 parent ea029b8 commit 10d7761

File tree

16 files changed

+2048
-429
lines changed

16 files changed

+2048
-429
lines changed

__tests__/plugins/codeceptjs/CommandMapperTest.ts

Lines changed: 488 additions & 21 deletions
Large diffs are not rendered by default.

data/en.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@
5757
},
5858

5959
"ui_action": {
60+
"accept": [ "accept" ],
6061
"amOn": [ "am on", "am in", "am at" ],
6162
"append": [ "append", "add", "insert" ],
6263
"attachFile": [ "attach the file", "add the file", "insert the file", "overwrite the file" ],
64+
"cancel": [ "cancel", "reject", "dismiss" ],
6365
"check": [ "check" ],
6466
"clear": [ "clear" ],
6567
"click": [ "click", "activate", "trigger", "set" ],
@@ -133,9 +135,11 @@
133135
},
134136

135137
"ui_action_option": {
138+
"alert": [ "alert" ],
136139
"app": [ "application", "app" ],
137140
"checked": [ "checked" ],
138141
"command": [ "command" ],
142+
"confirm": [ "confirmation", "confirm" ],
139143
"cookie": [ "cookie" ],
140144
"currentActivity": [ "current activity" ],
141145
"currentPage": [ "current page", "page" ],
@@ -144,9 +148,11 @@
144148
"device": [ "device", "phone", "tablet" ],
145149
"disabled": [ "disabled" ],
146150
"down": [ "down" ],
151+
"elements": [ "elements", "items" ],
147152
"enabled": [ "enabled" ],
148153
"field": [ "field" ],
149154
"file": [ "file" ],
155+
"hide": [ "hide" ],
150156
"hidden": [ "hidden" ],
151157
"inside": [ "inside", "in" ],
152158
"installed": [ "installed" ],
@@ -159,14 +165,19 @@
159165
"mobileName": [ "mobile name" ],
160166
"native": [ "native" ],
161167
"newTab": [ "new tab" ],
168+
"next": [ "next" ],
162169
"notifications": [ "notifications", "notification", "notification panel" ],
163170
"otherTabs": [ "other tabs" ],
164171
"orientation": [ "orientation" ],
172+
"popup": [ "popup" ],
165173
"portrait": [ "portrait" ],
174+
"previous": [ "previous" ],
175+
"prompt": [ "prompt" ],
166176
"right": [ "right" ],
167177
"script": [ "script" ],
168178
"second": [ "second", "seconds" ],
169179
"slowly": [ "slowly", "leisurely" ],
180+
"tab": [ "tab" ],
170181
"title": [ "title" ],
171182
"unchecked": [ "unchecked" ],
172183
"unlocked": [ "unlocked" ],
@@ -187,7 +198,7 @@
187198
"ui": {
188199

189200
"ui_property": {
190-
"id": [ "id", "identification" ],
201+
"id": [ "id", "identification", "identificator" ],
191202
"type": [ "type" ],
192203
"editable": [ "editable" ],
193204
"datatype": [ "data type" ],

data/pt.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@
103103
},
104104

105105
"ui_action": {
106+
"accept": [ "aceito" ],
106107
"amOn": [ "estou" ],
107108
"append": [ "adiciono", "acrescento", "insiro" ],
108109
"attachFile": [ "anexo o arquivo", "adiciono o arquivo", "sobrescrevo o arquivo" ],
110+
"cancel": [ "cancelo", "rejeito" ],
109111
"check": [ "marco" ],
110112
"clear": [ "limpo", "apago" ],
111113
"click": [ "clico", "ativo", "aciono" ],
@@ -179,8 +181,10 @@
179181
},
180182

181183
"ui_action_option": {
184+
"alert": [ "alerta" ],
182185
"app": [ "aplicação", "aplicativo", "app" ],
183186
"checked": [ "marcado", "marcada", "ticado", "ticada", "checked" ],
187+
"confirm": [ "confirmação", "confirm" ],
184188
"command": [ "comando" ],
185189
"cookie": [ "cookie" ],
186190
"currentActivity": [ "atividade atual" ],
@@ -190,9 +194,11 @@
190194
"device": [ "dispositivo", "celular", "telefone", "fone", "tablet" ],
191195
"disabled": [ "desabilitado", "desabilitada", "disabled" ],
192196
"down": [ "para baixo", "abaixo", "down" ],
197+
"elements": [ "elementos", "itens" ],
193198
"enabled": [ "habilitado", "habilitada", "is enabled" ],
194199
"field": [ "campo" ],
195200
"file": [ "arquivo" ],
201+
"hide": [ "ocultar", "esconder" ],
196202
"hidden": [ "oculto", "escondido", "oculta", "escondida" ],
197203
"inside": [ "dentro de", "em", "no", "na", "inside" ],
198204
"installed": [ "instalado", "instalada" ],
@@ -205,20 +211,25 @@
205211
"mobileName": [ "nome mobile", "mobile name" ],
206212
"native": [ "nativo" ],
207213
"newTab": [ "nova aba", "new tab" ],
214+
"next": [ "próxima", "próximo" ],
208215
"notifications": [ "notificações", "notificação" ],
209216
"otherTabs": [ "outras abas", "other tabs" ],
210217
"orientation": [ "orientação" ],
218+
"popup": [ "popup" ],
211219
"portrait": [ "retrato", "portrait" ],
220+
"previous": [ "anterior" ],
221+
"prompt": [ "prompt" ],
212222
"right": [ "para a direita", "a direita", "right" ],
213223
"script": [ "script" ],
214224
"second": [ "segundo" ],
215225
"slowly": [ "lentamente", "vagarosamente", "devagar" ],
226+
"tab": [ "aba" ],
216227
"title": [ "título", "title" ],
217228
"unchecked": [ "desmarcado", "unchecked" ],
218229
"unlocked": [ "desbloqueado", "destravado" ],
219230
"up": [ "para cima", "acima", "up" ],
220231
"url": [ "url", "pagina", "endereco", "dominio", "ip", "local", "sitio" ],
221-
"visible": [ "visivel" ],
232+
"visible": [ "visivel", "visíveis" ],
222233
"web": [ "web" ],
223234
"window": [ "janela", "window" ],
224235
"with": [ "com", "with", "contem", "contains" ]
@@ -233,7 +244,7 @@
233244
"ui": {
234245

235246
"ui_property": {
236-
"id": [ "id", "identificacao" ],
247+
"id": [ "id", "identificacao", "identificador" ],
237248
"type": [ "tipo" ],
238249
"editable": [ "editavel" ],
239250
"datatype": [ "tipo de dado" ],

0 commit comments

Comments
 (0)