complexqa_frontend_core 1.31.4 → 1.31.6

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.
@@ -1,54 +1,75 @@
1
- import { AUTOTEST_STEP_ACTION_CLASSES } from './typeAutotestStepActionVariants.js';
2
-
3
-
4
- const CLASS_BY_NAME = {};
5
- AUTOTEST_STEP_ACTION_CLASSES.forEach((ActionClass) =>
6
- {
7
- CLASS_BY_NAME[ ActionClass.action_name ] = ActionClass;
8
- });
9
-
10
-
11
- /**
12
- * Explicit ACTION catalog. New action = new class + this map + form + runner branch.
13
- *
14
- * @version v.1.0 (05/09/2026)
15
- */
16
- export function get_autotest_step_action_class(action_name)
17
- {
18
- return CLASS_BY_NAME[ action_name ] || null;
19
- }
20
-
21
-
22
- /**
23
- * @param {string} action_name
24
- * @returns {object|null}
25
- */
26
- export function get_autotest_step_action_entry(action_name)
27
- {
28
- const ActionClass = get_autotest_step_action_class(action_name);
29
- if (!ActionClass)
30
- {
31
- return null;
32
- }
33
-
34
- return new ActionClass().catalog_entry();
35
- }
36
-
37
-
38
- /**
39
- * @returns {object[]}
40
- */
41
- export function list_autotest_step_actions()
42
- {
43
- return AUTOTEST_STEP_ACTION_CLASSES.map((ActionClass) => new ActionClass().catalog_entry());
44
- }
45
-
46
-
47
- /**
48
- * @param {string} action_name
49
- * @returns {boolean}
50
- */
51
- export function is_autotest_step_action_known(action_name)
52
- {
53
- return !!CLASS_BY_NAME[ action_name ];
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.0 (05/09/2026)
6
- */
7
- export class typeAutotestStepAction
8
- {
9
- static type_id = 'ACTION';
10
- static action_name = '';
11
- static group = 'page';
12
- static value_need = 'unused';
13
- static target_need = 'unused';
14
- static has_expected_value = false;
15
- static value_field_key = 'value_text';
16
-
17
-
18
- /**
19
- * @returns {object}
20
- */
21
- catalog_entry()
22
- {
23
- const ctor = this.constructor;
24
-
25
- return {
26
- type_id : ctor.action_name || ctor.type_id,
27
- action_name : ctor.action_name,
28
- group : ctor.group,
29
- value_need : ctor.value_need,
30
- target_need : ctor.target_need,
31
- has_expected_value: ctor.has_expected_value,
32
- value_field_key : ctor.value_field_key,
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
+ }
@@ -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 value_need = 'optional';
10
- static value_field_key = 'url';
11
- }
12
-
13
- export class typeAutotestStepClick extends typeAutotestStepLocatorAction
14
- {
15
- static action_name = 'click';
16
- }
17
-
18
- export class typeAutotestStepDblclick extends typeAutotestStepLocatorAction
19
- {
20
- static action_name = 'dblclick';
21
- }
22
-
23
- export class typeAutotestStepFill extends typeAutotestStepLocatorValueAction
24
- {
25
- static action_name = 'fill';
26
- }
27
-
28
- export class typeAutotestStepType extends typeAutotestStepLocatorValueAction
29
- {
30
- static action_name = 'type';
31
- }
32
-
33
- export class typeAutotestStepPress extends typeAutotestStepLocatorValueAction
34
- {
35
- static action_name = 'press';
36
- static value_field_key = 'key';
37
- }
38
-
39
- export class typeAutotestStepCheck extends typeAutotestStepLocatorAction
40
- {
41
- static action_name = 'check';
42
- }
43
-
44
- export class typeAutotestStepUncheck extends typeAutotestStepLocatorAction
45
- {
46
- static action_name = 'uncheck';
47
- }
48
-
49
- export class typeAutotestStepSelectOption extends typeAutotestStepLocatorValueAction
50
- {
51
- static action_name = 'selectOption';
52
- }
53
-
54
- export class typeAutotestStepHover extends typeAutotestStepLocatorAction
55
- {
56
- static action_name = 'hover';
57
- }
58
-
59
- export class typeAutotestStepFocus extends typeAutotestStepLocatorAction
60
- {
61
- static action_name = 'focus';
62
- }
63
-
64
- export class typeAutotestStepWaitForSelector extends typeAutotestStepLocatorAction
65
- {
66
- static action_name = 'waitForSelector';
67
- }
68
-
69
- export class typeAutotestStepWaitForURL extends typeAutotestStepAction
70
- {
71
- static action_name = 'waitForURL';
72
- static value_need = 'required';
73
- static value_field_key = 'url';
74
- }
75
-
76
- export class typeAutotestStepWaitForTimeout extends typeAutotestStepAction
77
- {
78
- static action_name = 'waitForTimeout';
79
- static value_need = 'required';
80
- static value_field_key = 'duration_ms';
81
- }
82
-
83
- export class typeAutotestStepGoBack extends typeAutotestStepAction
84
- {
85
- static action_name = 'goBack';
86
- }
87
-
88
- export class typeAutotestStepGoForward extends typeAutotestStepAction
89
- {
90
- static action_name = 'goForward';
91
- }
92
-
93
- export class typeAutotestStepReload extends typeAutotestStepAction
94
- {
95
- static action_name = 'reload';
96
- }
97
-
98
- export class typeAutotestStepToBeVisible extends typeAutotestStepLocatorAction
99
- {
100
- static action_name = 'toBeVisible';
101
- static group = 'expect';
102
- }
103
-
104
- export class typeAutotestStepToHaveText extends typeAutotestStepLocatorValueAction
105
- {
106
- static action_name = 'toHaveText';
107
- static group = 'expect';
108
- }
109
-
110
- export class typeAutotestStepToHaveURL extends typeAutotestStepAction
111
- {
112
- static action_name = 'toHaveURL';
113
- static group = 'expect';
114
- static value_need = 'required';
115
- static value_field_key = 'url';
116
- }
117
-
118
- export class typeAutotestStepToHaveAttribute extends typeAutotestStepLocatorValueAction
119
- {
120
- static action_name = 'toHaveAttribute';
121
- static group = 'expect';
122
- static value_field_key = 'attribute_name';
123
- static has_expected_value = true;
124
- }
125
-
126
- export const AUTOTEST_STEP_ACTION_CLASSES = [
127
- typeAutotestStepGoto,
128
- typeAutotestStepClick,
129
- typeAutotestStepDblclick,
130
- typeAutotestStepFill,
131
- typeAutotestStepType,
132
- typeAutotestStepPress,
133
- typeAutotestStepCheck,
134
- typeAutotestStepUncheck,
135
- typeAutotestStepSelectOption,
136
- typeAutotestStepHover,
137
- typeAutotestStepFocus,
138
- typeAutotestStepWaitForSelector,
139
- typeAutotestStepWaitForURL,
140
- typeAutotestStepWaitForTimeout,
141
- typeAutotestStepGoBack,
142
- typeAutotestStepGoForward,
143
- typeAutotestStepReload,
144
- typeAutotestStepToBeVisible,
145
- typeAutotestStepToHaveText,
146
- typeAutotestStepToHaveURL,
147
- typeAutotestStepToHaveAttribute,
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
+ ];