complexqa_frontend_core 1.31.3 → 1.31.5
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/publish/api/autotest_step_api.js +108 -88
- package/publish/api/project_api.js +13 -0
- package/publish/app_configuration/table/sections/autotest_case.js +1 -1
- package/publish/index.js +156 -151
- package/publish/types/family_elements/autotest_step_actions/autotestStepActionCatalog.js +75 -54
- package/publish/types/family_elements/autotest_step_actions/autotestStepActionCategory.js +23 -0
- package/publish/types/family_elements/autotest_step_actions/typeAutotestStepAction.js +37 -35
- package/publish/types/family_elements/autotest_step_actions/typeAutotestStepActionVariants.js +169 -148
- package/publish/types/family_elements/typeAutotestStep.js +335 -297
- package/publish/types/family_elements/typeProject.js +14 -0
|
@@ -1,54 +1,75 @@
|
|
|
1
|
-
import { AUTOTEST_STEP_ACTION_CLASSES } from './typeAutotestStepActionVariants.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import { AUTOTEST_STEP_ACTION_CLASSES } from './typeAutotestStepActionVariants.js';
|
|
2
|
+
import { AUTOTEST_STEP_ACTION_CATEGORIES } from './autotestStepActionCategory.js';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const CLASS_BY_NAME = {};
|
|
6
|
+
AUTOTEST_STEP_ACTION_CLASSES.forEach((ActionClass) =>
|
|
7
|
+
{
|
|
8
|
+
CLASS_BY_NAME[ ActionClass.action_name ] = ActionClass;
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Explicit ACTION catalog. New action = new class + this map + form + runner branch.
|
|
14
|
+
*
|
|
15
|
+
* @version v.1.0 (05/09/2026)
|
|
16
|
+
*/
|
|
17
|
+
export function get_autotest_step_action_class(action_name)
|
|
18
|
+
{
|
|
19
|
+
return CLASS_BY_NAME[ action_name ] || null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {string} action_name
|
|
25
|
+
* @returns {object|null}
|
|
26
|
+
*/
|
|
27
|
+
export function get_autotest_step_action_entry(action_name)
|
|
28
|
+
{
|
|
29
|
+
const ActionClass = get_autotest_step_action_class(action_name);
|
|
30
|
+
if (!ActionClass)
|
|
31
|
+
{
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return new ActionClass().catalog_entry();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @returns {object[]}
|
|
41
|
+
*/
|
|
42
|
+
export function list_autotest_step_actions()
|
|
43
|
+
{
|
|
44
|
+
return AUTOTEST_STEP_ACTION_CLASSES.map((ActionClass) => new ActionClass().catalog_entry());
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Catalog split by category, in the order of AUTOTEST_STEP_ACTION_CATEGORIES.
|
|
50
|
+
* Empty categories are not returned.
|
|
51
|
+
*
|
|
52
|
+
* @version v.1.0 (14/09/2026)
|
|
53
|
+
* @returns {Array<{category: string, actions: object[]}>}
|
|
54
|
+
*/
|
|
55
|
+
export function list_autotest_step_actions_by_category()
|
|
56
|
+
{
|
|
57
|
+
const entries = list_autotest_step_actions();
|
|
58
|
+
|
|
59
|
+
return AUTOTEST_STEP_ACTION_CATEGORIES
|
|
60
|
+
.map((category) => ({
|
|
61
|
+
category: category,
|
|
62
|
+
actions : entries.filter((entry) => entry.category === category),
|
|
63
|
+
}))
|
|
64
|
+
.filter((group) => group.actions.length > 0);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @param {string} action_name
|
|
70
|
+
* @returns {boolean}
|
|
71
|
+
*/
|
|
72
|
+
export function is_autotest_step_action_known(action_name)
|
|
73
|
+
{
|
|
74
|
+
return !!CLASS_BY_NAME[ action_name ];
|
|
75
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explicit ACTION categories. Used to group the action catalog in pickers and selects.
|
|
3
|
+
* Order of this list is the order groups are shown.
|
|
4
|
+
*
|
|
5
|
+
* @version v.1.0 (14/09/2026)
|
|
6
|
+
*/
|
|
7
|
+
export const AUTOTEST_STEP_ACTION_CATEGORIES = [
|
|
8
|
+
'navigation',
|
|
9
|
+
'pointer',
|
|
10
|
+
'input',
|
|
11
|
+
'wait',
|
|
12
|
+
'assert',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @param {string} category
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
export function is_autotest_step_action_category(category)
|
|
21
|
+
{
|
|
22
|
+
return AUTOTEST_STEP_ACTION_CATEGORIES.indexOf(String(category || '')) !== -1;
|
|
23
|
+
}
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base ACTION type. Shell (sort, clone, delete, timeout) lives on typeAutotestStep.
|
|
3
|
-
* Subclasses own only action fields and target rules.
|
|
4
|
-
*
|
|
5
|
-
* @version v.1.
|
|
6
|
-
*/
|
|
7
|
-
export class typeAutotestStepAction
|
|
8
|
-
{
|
|
9
|
-
static type_id = 'ACTION';
|
|
10
|
-
static action_name = '';
|
|
11
|
-
static group = 'page';
|
|
12
|
-
static
|
|
13
|
-
static
|
|
14
|
-
static
|
|
15
|
-
static
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Base ACTION type. Shell (sort, clone, delete, timeout) lives on typeAutotestStep.
|
|
3
|
+
* Subclasses own only action fields and target rules.
|
|
4
|
+
*
|
|
5
|
+
* @version v.1.1 (14/09/2026)
|
|
6
|
+
*/
|
|
7
|
+
export class typeAutotestStepAction
|
|
8
|
+
{
|
|
9
|
+
static type_id = 'ACTION';
|
|
10
|
+
static action_name = '';
|
|
11
|
+
static group = 'page';
|
|
12
|
+
static category = 'navigation';
|
|
13
|
+
static value_need = 'unused';
|
|
14
|
+
static target_need = 'unused';
|
|
15
|
+
static has_expected_value = false;
|
|
16
|
+
static value_field_key = 'value_text';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @returns {object}
|
|
21
|
+
*/
|
|
22
|
+
catalog_entry()
|
|
23
|
+
{
|
|
24
|
+
const ctor = this.constructor;
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
type_id : ctor.action_name || ctor.type_id,
|
|
28
|
+
action_name : ctor.action_name,
|
|
29
|
+
group : ctor.group,
|
|
30
|
+
category : ctor.category,
|
|
31
|
+
value_need : ctor.value_need,
|
|
32
|
+
target_need : ctor.target_need,
|
|
33
|
+
has_expected_value: ctor.has_expected_value,
|
|
34
|
+
value_field_key : ctor.value_field_key,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
package/publish/types/family_elements/autotest_step_actions/typeAutotestStepActionVariants.js
CHANGED
|
@@ -1,148 +1,169 @@
|
|
|
1
|
-
import { typeAutotestStepAction } from './typeAutotestStepAction.js';
|
|
2
|
-
import { typeAutotestStepLocatorAction } from './typeAutotestStepLocatorAction.js';
|
|
3
|
-
import { typeAutotestStepLocatorValueAction } from './typeAutotestStepLocatorValueAction.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export class typeAutotestStepGoto extends typeAutotestStepAction
|
|
7
|
-
{
|
|
8
|
-
static action_name = 'goto';
|
|
9
|
-
static
|
|
10
|
-
static
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
static
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
static
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export class
|
|
45
|
-
{
|
|
46
|
-
static action_name = '
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
static
|
|
72
|
-
static
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
static
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
static
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export class
|
|
94
|
-
{
|
|
95
|
-
static action_name = '
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
static
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
static
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
1
|
+
import { typeAutotestStepAction } from './typeAutotestStepAction.js';
|
|
2
|
+
import { typeAutotestStepLocatorAction } from './typeAutotestStepLocatorAction.js';
|
|
3
|
+
import { typeAutotestStepLocatorValueAction } from './typeAutotestStepLocatorValueAction.js';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class typeAutotestStepGoto extends typeAutotestStepAction
|
|
7
|
+
{
|
|
8
|
+
static action_name = 'goto';
|
|
9
|
+
static category = 'navigation';
|
|
10
|
+
static value_need = 'optional';
|
|
11
|
+
static value_field_key = 'url';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export class typeAutotestStepGoBack extends typeAutotestStepAction
|
|
15
|
+
{
|
|
16
|
+
static action_name = 'goBack';
|
|
17
|
+
static category = 'navigation';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class typeAutotestStepGoForward extends typeAutotestStepAction
|
|
21
|
+
{
|
|
22
|
+
static action_name = 'goForward';
|
|
23
|
+
static category = 'navigation';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class typeAutotestStepReload extends typeAutotestStepAction
|
|
27
|
+
{
|
|
28
|
+
static action_name = 'reload';
|
|
29
|
+
static category = 'navigation';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export class typeAutotestStepClick extends typeAutotestStepLocatorAction
|
|
33
|
+
{
|
|
34
|
+
static action_name = 'click';
|
|
35
|
+
static category = 'pointer';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class typeAutotestStepDblclick extends typeAutotestStepLocatorAction
|
|
39
|
+
{
|
|
40
|
+
static action_name = 'dblclick';
|
|
41
|
+
static category = 'pointer';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export class typeAutotestStepHover extends typeAutotestStepLocatorAction
|
|
45
|
+
{
|
|
46
|
+
static action_name = 'hover';
|
|
47
|
+
static category = 'pointer';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export class typeAutotestStepFocus extends typeAutotestStepLocatorAction
|
|
51
|
+
{
|
|
52
|
+
static action_name = 'focus';
|
|
53
|
+
static category = 'pointer';
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export class typeAutotestStepFill extends typeAutotestStepLocatorValueAction
|
|
57
|
+
{
|
|
58
|
+
static action_name = 'fill';
|
|
59
|
+
static category = 'input';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export class typeAutotestStepType extends typeAutotestStepLocatorValueAction
|
|
63
|
+
{
|
|
64
|
+
static action_name = 'type';
|
|
65
|
+
static category = 'input';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export class typeAutotestStepPress extends typeAutotestStepLocatorValueAction
|
|
69
|
+
{
|
|
70
|
+
static action_name = 'press';
|
|
71
|
+
static category = 'input';
|
|
72
|
+
static value_field_key = 'key';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export class typeAutotestStepCheck extends typeAutotestStepLocatorAction
|
|
76
|
+
{
|
|
77
|
+
static action_name = 'check';
|
|
78
|
+
static category = 'input';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export class typeAutotestStepUncheck extends typeAutotestStepLocatorAction
|
|
82
|
+
{
|
|
83
|
+
static action_name = 'uncheck';
|
|
84
|
+
static category = 'input';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export class typeAutotestStepSelectOption extends typeAutotestStepLocatorValueAction
|
|
88
|
+
{
|
|
89
|
+
static action_name = 'selectOption';
|
|
90
|
+
static category = 'input';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export class typeAutotestStepWaitForSelector extends typeAutotestStepLocatorAction
|
|
94
|
+
{
|
|
95
|
+
static action_name = 'waitForSelector';
|
|
96
|
+
static category = 'wait';
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export class typeAutotestStepWaitForURL extends typeAutotestStepAction
|
|
100
|
+
{
|
|
101
|
+
static action_name = 'waitForURL';
|
|
102
|
+
static category = 'wait';
|
|
103
|
+
static value_need = 'required';
|
|
104
|
+
static value_field_key = 'url';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export class typeAutotestStepWaitForTimeout extends typeAutotestStepAction
|
|
108
|
+
{
|
|
109
|
+
static action_name = 'waitForTimeout';
|
|
110
|
+
static category = 'wait';
|
|
111
|
+
static value_need = 'required';
|
|
112
|
+
static value_field_key = 'duration_ms';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export class typeAutotestStepToBeVisible extends typeAutotestStepLocatorAction
|
|
116
|
+
{
|
|
117
|
+
static action_name = 'toBeVisible';
|
|
118
|
+
static group = 'expect';
|
|
119
|
+
static category = 'assert';
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export class typeAutotestStepToHaveText extends typeAutotestStepLocatorValueAction
|
|
123
|
+
{
|
|
124
|
+
static action_name = 'toHaveText';
|
|
125
|
+
static group = 'expect';
|
|
126
|
+
static category = 'assert';
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export class typeAutotestStepToHaveURL extends typeAutotestStepAction
|
|
130
|
+
{
|
|
131
|
+
static action_name = 'toHaveURL';
|
|
132
|
+
static group = 'expect';
|
|
133
|
+
static category = 'assert';
|
|
134
|
+
static value_need = 'required';
|
|
135
|
+
static value_field_key = 'url';
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export class typeAutotestStepToHaveAttribute extends typeAutotestStepLocatorValueAction
|
|
139
|
+
{
|
|
140
|
+
static action_name = 'toHaveAttribute';
|
|
141
|
+
static group = 'expect';
|
|
142
|
+
static category = 'assert';
|
|
143
|
+
static value_field_key = 'attribute_name';
|
|
144
|
+
static has_expected_value = true;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export const AUTOTEST_STEP_ACTION_CLASSES = [
|
|
148
|
+
typeAutotestStepGoto,
|
|
149
|
+
typeAutotestStepGoBack,
|
|
150
|
+
typeAutotestStepGoForward,
|
|
151
|
+
typeAutotestStepReload,
|
|
152
|
+
typeAutotestStepClick,
|
|
153
|
+
typeAutotestStepDblclick,
|
|
154
|
+
typeAutotestStepHover,
|
|
155
|
+
typeAutotestStepFocus,
|
|
156
|
+
typeAutotestStepFill,
|
|
157
|
+
typeAutotestStepType,
|
|
158
|
+
typeAutotestStepPress,
|
|
159
|
+
typeAutotestStepCheck,
|
|
160
|
+
typeAutotestStepUncheck,
|
|
161
|
+
typeAutotestStepSelectOption,
|
|
162
|
+
typeAutotestStepWaitForSelector,
|
|
163
|
+
typeAutotestStepWaitForURL,
|
|
164
|
+
typeAutotestStepWaitForTimeout,
|
|
165
|
+
typeAutotestStepToBeVisible,
|
|
166
|
+
typeAutotestStepToHaveText,
|
|
167
|
+
typeAutotestStepToHaveURL,
|
|
168
|
+
typeAutotestStepToHaveAttribute,
|
|
169
|
+
];
|