complexqa_frontend_core 2.4.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/types/element_translate/typeObjectRepositoryElement.i18n.js +6 -0
- package/src/types/family_elements/autotest_step_actions/autotestStepLocatorKind.js +2 -0
- package/src/types/family_elements/autotest_step_actions/autotestStepTargetNormalizer.js +2 -0
- package/src/types/family_elements/autotest_step_actions/typeAutotestStepActionVariants.js +162 -0
- package/src/types/family_elements/typeAutotestStep.js +40 -7
- package/types/types/family_elements/typeAutotestStep.d.ts +2 -0
package/package.json
CHANGED
|
@@ -53,6 +53,8 @@ export const typeObjectRepositoryElement_i18n = {
|
|
|
53
53
|
PLACEHOLDER: 'Placeholder',
|
|
54
54
|
TESTID : 'Test id',
|
|
55
55
|
TEXT : 'Text',
|
|
56
|
+
TITLE : 'Title',
|
|
57
|
+
ALT : 'Alt',
|
|
56
58
|
CSS : 'CSS',
|
|
57
59
|
ID : 'ID',
|
|
58
60
|
NAME : 'Name',
|
|
@@ -67,6 +69,8 @@ export const typeObjectRepositoryElement_i18n = {
|
|
|
67
69
|
PLACEHOLDER: 'Placeholder',
|
|
68
70
|
TESTID : 'Test id',
|
|
69
71
|
TEXT : 'Text',
|
|
72
|
+
TITLE : 'Title',
|
|
73
|
+
ALT : 'Alt',
|
|
70
74
|
CSS : 'CSS',
|
|
71
75
|
ID : 'ID',
|
|
72
76
|
NAME : 'Name',
|
|
@@ -81,6 +85,8 @@ export const typeObjectRepositoryElement_i18n = {
|
|
|
81
85
|
PLACEHOLDER: 'Placeholder',
|
|
82
86
|
TESTID : 'Test id',
|
|
83
87
|
TEXT : 'Text',
|
|
88
|
+
TITLE : 'Title',
|
|
89
|
+
ALT : 'Alt',
|
|
84
90
|
CSS : 'CSS',
|
|
85
91
|
ID : 'ID',
|
|
86
92
|
NAME : 'Name',
|
|
@@ -35,6 +35,12 @@ export class typeAutotestStepClick extends typeAutotestStepLocatorAction
|
|
|
35
35
|
static category = 'pointer';
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
export class typeAutotestStepRightClick extends typeAutotestStepLocatorAction
|
|
39
|
+
{
|
|
40
|
+
static action_name = 'rightClick';
|
|
41
|
+
static category = 'pointer';
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
export class typeAutotestStepDblclick extends typeAutotestStepLocatorAction
|
|
39
45
|
{
|
|
40
46
|
static action_name = 'dblclick';
|
|
@@ -53,6 +59,18 @@ export class typeAutotestStepFocus extends typeAutotestStepLocatorAction
|
|
|
53
59
|
static category = 'pointer';
|
|
54
60
|
}
|
|
55
61
|
|
|
62
|
+
export class typeAutotestStepBlur extends typeAutotestStepLocatorAction
|
|
63
|
+
{
|
|
64
|
+
static action_name = 'blur';
|
|
65
|
+
static category = 'pointer';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class typeAutotestStepScrollIntoViewIfNeeded extends typeAutotestStepLocatorAction
|
|
69
|
+
{
|
|
70
|
+
static action_name = 'scrollIntoViewIfNeeded';
|
|
71
|
+
static category = 'pointer';
|
|
72
|
+
}
|
|
73
|
+
|
|
56
74
|
export class typeAutotestStepFill extends typeAutotestStepLocatorValueAction
|
|
57
75
|
{
|
|
58
76
|
static action_name = 'fill';
|
|
@@ -65,10 +83,17 @@ export class typeAutotestStepType extends typeAutotestStepLocatorValueAction
|
|
|
65
83
|
static category = 'input';
|
|
66
84
|
}
|
|
67
85
|
|
|
86
|
+
export class typeAutotestStepPressSequentially extends typeAutotestStepLocatorValueAction
|
|
87
|
+
{
|
|
88
|
+
static action_name = 'pressSequentially';
|
|
89
|
+
static category = 'input';
|
|
90
|
+
}
|
|
91
|
+
|
|
68
92
|
export class typeAutotestStepPress extends typeAutotestStepLocatorValueAction
|
|
69
93
|
{
|
|
70
94
|
static action_name = 'press';
|
|
71
95
|
static category = 'input';
|
|
96
|
+
static target_need = 'optional';
|
|
72
97
|
static value_field_key = 'key';
|
|
73
98
|
}
|
|
74
99
|
|
|
@@ -90,6 +115,18 @@ export class typeAutotestStepSelectOption extends typeAutotestStepLocatorValueAc
|
|
|
90
115
|
static category = 'input';
|
|
91
116
|
}
|
|
92
117
|
|
|
118
|
+
export class typeAutotestStepClear extends typeAutotestStepLocatorAction
|
|
119
|
+
{
|
|
120
|
+
static action_name = 'clear';
|
|
121
|
+
static category = 'input';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export class typeAutotestStepSelectText extends typeAutotestStepLocatorAction
|
|
125
|
+
{
|
|
126
|
+
static action_name = 'selectText';
|
|
127
|
+
static category = 'input';
|
|
128
|
+
}
|
|
129
|
+
|
|
93
130
|
export class typeAutotestStepWaitForSelector extends typeAutotestStepLocatorAction
|
|
94
131
|
{
|
|
95
132
|
static action_name = 'waitForSelector';
|
|
@@ -144,26 +181,151 @@ export class typeAutotestStepToHaveAttribute extends typeAutotestStepLocatorValu
|
|
|
144
181
|
static has_expected_value = true;
|
|
145
182
|
}
|
|
146
183
|
|
|
184
|
+
export class typeAutotestStepToBeHidden extends typeAutotestStepLocatorAction
|
|
185
|
+
{
|
|
186
|
+
static action_name = 'toBeHidden';
|
|
187
|
+
static group = 'expect';
|
|
188
|
+
static category = 'assert';
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export class typeAutotestStepToBeEnabled extends typeAutotestStepLocatorAction
|
|
192
|
+
{
|
|
193
|
+
static action_name = 'toBeEnabled';
|
|
194
|
+
static group = 'expect';
|
|
195
|
+
static category = 'assert';
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export class typeAutotestStepToBeDisabled extends typeAutotestStepLocatorAction
|
|
199
|
+
{
|
|
200
|
+
static action_name = 'toBeDisabled';
|
|
201
|
+
static group = 'expect';
|
|
202
|
+
static category = 'assert';
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export class typeAutotestStepToBeChecked extends typeAutotestStepLocatorAction
|
|
206
|
+
{
|
|
207
|
+
static action_name = 'toBeChecked';
|
|
208
|
+
static group = 'expect';
|
|
209
|
+
static category = 'assert';
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export class typeAutotestStepToBeEditable extends typeAutotestStepLocatorAction
|
|
213
|
+
{
|
|
214
|
+
static action_name = 'toBeEditable';
|
|
215
|
+
static group = 'expect';
|
|
216
|
+
static category = 'assert';
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export class typeAutotestStepToBeFocused extends typeAutotestStepLocatorAction
|
|
220
|
+
{
|
|
221
|
+
static action_name = 'toBeFocused';
|
|
222
|
+
static group = 'expect';
|
|
223
|
+
static category = 'assert';
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export class typeAutotestStepToBeEmpty extends typeAutotestStepLocatorAction
|
|
227
|
+
{
|
|
228
|
+
static action_name = 'toBeEmpty';
|
|
229
|
+
static group = 'expect';
|
|
230
|
+
static category = 'assert';
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export class typeAutotestStepToContainText extends typeAutotestStepLocatorValueAction
|
|
234
|
+
{
|
|
235
|
+
static action_name = 'toContainText';
|
|
236
|
+
static group = 'expect';
|
|
237
|
+
static category = 'assert';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export class typeAutotestStepToHaveValue extends typeAutotestStepLocatorValueAction
|
|
241
|
+
{
|
|
242
|
+
static action_name = 'toHaveValue';
|
|
243
|
+
static group = 'expect';
|
|
244
|
+
static category = 'assert';
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export class typeAutotestStepToHaveCount extends typeAutotestStepLocatorValueAction
|
|
248
|
+
{
|
|
249
|
+
static action_name = 'toHaveCount';
|
|
250
|
+
static group = 'expect';
|
|
251
|
+
static category = 'assert';
|
|
252
|
+
static value_field_key = 'count';
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export class typeAutotestStepToHaveTitle extends typeAutotestStepAction
|
|
256
|
+
{
|
|
257
|
+
static action_name = 'toHaveTitle';
|
|
258
|
+
static group = 'expect';
|
|
259
|
+
static category = 'assert';
|
|
260
|
+
static value_need = 'required';
|
|
261
|
+
static value_field_key = 'title';
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export class typeAutotestStepToHaveClass extends typeAutotestStepLocatorValueAction
|
|
265
|
+
{
|
|
266
|
+
static action_name = 'toHaveClass';
|
|
267
|
+
static group = 'expect';
|
|
268
|
+
static category = 'assert';
|
|
269
|
+
static value_field_key = 'class_name';
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export class typeAutotestStepToHaveId extends typeAutotestStepLocatorValueAction
|
|
273
|
+
{
|
|
274
|
+
static action_name = 'toHaveId';
|
|
275
|
+
static group = 'expect';
|
|
276
|
+
static category = 'assert';
|
|
277
|
+
static value_field_key = 'dom_id';
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export class typeAutotestStepToHaveCSS extends typeAutotestStepLocatorValueAction
|
|
281
|
+
{
|
|
282
|
+
static action_name = 'toHaveCSS';
|
|
283
|
+
static group = 'expect';
|
|
284
|
+
static category = 'assert';
|
|
285
|
+
static value_field_key = 'css_property';
|
|
286
|
+
static has_expected_value = true;
|
|
287
|
+
}
|
|
288
|
+
|
|
147
289
|
export const AUTOTEST_STEP_ACTION_CLASSES = [
|
|
148
290
|
typeAutotestStepGoto,
|
|
149
291
|
typeAutotestStepGoBack,
|
|
150
292
|
typeAutotestStepGoForward,
|
|
151
293
|
typeAutotestStepReload,
|
|
152
294
|
typeAutotestStepClick,
|
|
295
|
+
typeAutotestStepRightClick,
|
|
153
296
|
typeAutotestStepDblclick,
|
|
154
297
|
typeAutotestStepHover,
|
|
155
298
|
typeAutotestStepFocus,
|
|
299
|
+
typeAutotestStepBlur,
|
|
300
|
+
typeAutotestStepScrollIntoViewIfNeeded,
|
|
156
301
|
typeAutotestStepFill,
|
|
157
302
|
typeAutotestStepType,
|
|
303
|
+
typeAutotestStepPressSequentially,
|
|
158
304
|
typeAutotestStepPress,
|
|
159
305
|
typeAutotestStepCheck,
|
|
160
306
|
typeAutotestStepUncheck,
|
|
161
307
|
typeAutotestStepSelectOption,
|
|
308
|
+
typeAutotestStepClear,
|
|
309
|
+
typeAutotestStepSelectText,
|
|
162
310
|
typeAutotestStepWaitForSelector,
|
|
163
311
|
typeAutotestStepWaitForURL,
|
|
164
312
|
typeAutotestStepWaitForTimeout,
|
|
165
313
|
typeAutotestStepToBeVisible,
|
|
314
|
+
typeAutotestStepToBeHidden,
|
|
315
|
+
typeAutotestStepToBeEnabled,
|
|
316
|
+
typeAutotestStepToBeDisabled,
|
|
317
|
+
typeAutotestStepToBeChecked,
|
|
318
|
+
typeAutotestStepToBeEditable,
|
|
319
|
+
typeAutotestStepToBeFocused,
|
|
320
|
+
typeAutotestStepToBeEmpty,
|
|
166
321
|
typeAutotestStepToHaveText,
|
|
322
|
+
typeAutotestStepToContainText,
|
|
323
|
+
typeAutotestStepToHaveValue,
|
|
324
|
+
typeAutotestStepToHaveCount,
|
|
167
325
|
typeAutotestStepToHaveURL,
|
|
326
|
+
typeAutotestStepToHaveTitle,
|
|
168
327
|
typeAutotestStepToHaveAttribute,
|
|
328
|
+
typeAutotestStepToHaveClass,
|
|
329
|
+
typeAutotestStepToHaveId,
|
|
330
|
+
typeAutotestStepToHaveCSS,
|
|
169
331
|
];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { echo, is_object } from "../../utils/utils.js";
|
|
2
2
|
import { familyTestAutomation } from "../core/1_familyTestAutomation.js";
|
|
3
|
+
import { typeAutotestCase } from "./typeAutotestCase.js";
|
|
3
4
|
import { typeAutotestStep_i18n } from "../element_translate/typeAutotestStep.i18n.js";
|
|
4
5
|
import _ from 'underscore';
|
|
5
6
|
|
|
@@ -22,6 +23,12 @@ export class typeAutotestStep extends familyTestAutomation
|
|
|
22
23
|
expected_value;
|
|
23
24
|
object_repository_page_id;
|
|
24
25
|
object_repository_element_id;
|
|
26
|
+
/** Гидрируется в search: название страницы каталога. Не пишется в save. */
|
|
27
|
+
object_repository_page;
|
|
28
|
+
/** Гидрируется в search: название элемента каталога. Не пишется в save. */
|
|
29
|
+
object_repository_element;
|
|
30
|
+
/** Гидрируется в search через options.add autotest_case. Не пишется в save. */
|
|
31
|
+
autotest_case;
|
|
25
32
|
value_source_type;
|
|
26
33
|
value_source_field;
|
|
27
34
|
created_at;
|
|
@@ -66,26 +73,46 @@ export class typeAutotestStep extends familyTestAutomation
|
|
|
66
73
|
available_enum_values = {
|
|
67
74
|
action_name: [
|
|
68
75
|
'goto',
|
|
76
|
+
'goBack',
|
|
77
|
+
'goForward',
|
|
78
|
+
'reload',
|
|
69
79
|
'click',
|
|
80
|
+
'rightClick',
|
|
70
81
|
'dblclick',
|
|
82
|
+
'hover',
|
|
83
|
+
'focus',
|
|
84
|
+
'blur',
|
|
85
|
+
'scrollIntoViewIfNeeded',
|
|
71
86
|
'fill',
|
|
72
87
|
'type',
|
|
88
|
+
'pressSequentially',
|
|
73
89
|
'press',
|
|
74
90
|
'check',
|
|
75
91
|
'uncheck',
|
|
76
92
|
'selectOption',
|
|
77
|
-
'
|
|
78
|
-
'
|
|
93
|
+
'clear',
|
|
94
|
+
'selectText',
|
|
79
95
|
'waitForSelector',
|
|
80
96
|
'waitForURL',
|
|
81
97
|
'waitForTimeout',
|
|
82
|
-
'goBack',
|
|
83
|
-
'goForward',
|
|
84
|
-
'reload',
|
|
85
98
|
'toBeVisible',
|
|
99
|
+
'toBeHidden',
|
|
100
|
+
'toBeEnabled',
|
|
101
|
+
'toBeDisabled',
|
|
102
|
+
'toBeChecked',
|
|
103
|
+
'toBeEditable',
|
|
104
|
+
'toBeFocused',
|
|
105
|
+
'toBeEmpty',
|
|
86
106
|
'toHaveText',
|
|
107
|
+
'toContainText',
|
|
108
|
+
'toHaveValue',
|
|
109
|
+
'toHaveCount',
|
|
87
110
|
'toHaveURL',
|
|
111
|
+
'toHaveTitle',
|
|
88
112
|
'toHaveAttribute',
|
|
113
|
+
'toHaveClass',
|
|
114
|
+
'toHaveId',
|
|
115
|
+
'toHaveCSS',
|
|
89
116
|
],
|
|
90
117
|
value_source_type: [
|
|
91
118
|
'INLINE',
|
|
@@ -108,10 +135,16 @@ export class typeAutotestStep extends familyTestAutomation
|
|
|
108
135
|
{
|
|
109
136
|
_.mapObject(data, (value, key) =>
|
|
110
137
|
{
|
|
111
|
-
if (this.hasOwnProperty(key))
|
|
138
|
+
if (!this.hasOwnProperty(key))
|
|
139
|
+
{
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (key === 'autotest_case' && is_object(value))
|
|
112
143
|
{
|
|
113
|
-
this
|
|
144
|
+
this.autotest_case = new typeAutotestCase(value);
|
|
145
|
+
return;
|
|
114
146
|
}
|
|
147
|
+
this[ key ] = value;
|
|
115
148
|
});
|
|
116
149
|
}
|
|
117
150
|
|
|
@@ -15,6 +15,8 @@ export class typeAutotestStep extends familyTestAutomation {
|
|
|
15
15
|
expected_value: any;
|
|
16
16
|
object_repository_page_id: any;
|
|
17
17
|
object_repository_element_id: any;
|
|
18
|
+
object_repository_page: any;
|
|
19
|
+
object_repository_element: any;
|
|
18
20
|
value_source_type: any;
|
|
19
21
|
value_source_field: any;
|
|
20
22
|
created_at: any;
|