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.
- package/package.json +1 -1
- package/publish/api/autotest_step_api.js +108 -88
- package/publish/index.js +156 -151
- package/publish/types/element_translate/typeCustomProperty.i18n.js +15 -0
- package/publish/types/element_translate/typeCustomPropertyValue.i18n.js +15 -0
- 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/typeCustomProperty.js +13 -1
- package/publish/types/family_relation/typeCustomPropertyValue.js +5 -1
|
@@ -1,297 +1,335 @@
|
|
|
1
|
-
import { echo, is_object } from "../../utils/utils.js";
|
|
2
|
-
import { familyTestAutomation } from "../core/1_familyTestAutomation.js";
|
|
3
|
-
import { typeAutotestStep_i18n } from "../element_translate/typeAutotestStep.i18n.js";
|
|
4
|
-
import _ from 'underscore';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Шаг исполняемого автотеста. action_name - белый список интерпретатора Playwright.
|
|
9
|
-
*
|
|
10
|
-
* @version v.1.0 (04/09/2026)
|
|
11
|
-
*/
|
|
12
|
-
export class typeAutotestStep extends familyTestAutomation
|
|
13
|
-
{
|
|
14
|
-
autotest_step_id;
|
|
15
|
-
autotest_case_id;
|
|
16
|
-
team_id;
|
|
17
|
-
sort_order;
|
|
18
|
-
action_name;
|
|
19
|
-
target;
|
|
20
|
-
value_text;
|
|
21
|
-
timeout_ms;
|
|
22
|
-
expected_value;
|
|
23
|
-
object_repository_page_id;
|
|
24
|
-
object_repository_element_id;
|
|
25
|
-
value_source_type;
|
|
26
|
-
value_source_field;
|
|
27
|
-
created_at;
|
|
28
|
-
updated_at;
|
|
29
|
-
|
|
30
|
-
primary_key = 'autotest_step_id';
|
|
31
|
-
api_key = 'autotest_step';
|
|
32
|
-
|
|
33
|
-
structure_scheme = {
|
|
34
|
-
autotest_step_id: 'integer | require',
|
|
35
|
-
autotest_case_id: 'integer | require',
|
|
36
|
-
team_id : 'integer | require',
|
|
37
|
-
sort_order : 'integer | optional',
|
|
38
|
-
action_name : 'string | enum | require',
|
|
39
|
-
target : 'typeAutotestStepTarget | optional',
|
|
40
|
-
value_text : 'string | optional',
|
|
41
|
-
timeout_ms : 'integer | optional',
|
|
42
|
-
expected_value : 'string | optional',
|
|
43
|
-
object_repository_page_id : 'integer | optional',
|
|
44
|
-
object_repository_element_id: 'integer | optional',
|
|
45
|
-
value_source_type : 'string | enum | optional',
|
|
46
|
-
value_source_field : 'string | optional',
|
|
47
|
-
created_at : 'timestamp | optional',
|
|
48
|
-
updated_at : 'timestamp | optional',
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
create_scheme = [
|
|
52
|
-
'autotest_case_id',
|
|
53
|
-
'action_name',
|
|
54
|
-
'sort_order',
|
|
55
|
-
'target',
|
|
56
|
-
'value_text',
|
|
57
|
-
'timeout_ms',
|
|
58
|
-
'expected_value',
|
|
59
|
-
'object_repository_page_id',
|
|
60
|
-
'object_repository_element_id',
|
|
61
|
-
'value_source_type',
|
|
62
|
-
'value_source_field',
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
available_enum_values = {
|
|
66
|
-
action_name: [
|
|
67
|
-
'goto',
|
|
68
|
-
'click',
|
|
69
|
-
'dblclick',
|
|
70
|
-
'fill',
|
|
71
|
-
'type',
|
|
72
|
-
'press',
|
|
73
|
-
'check',
|
|
74
|
-
'uncheck',
|
|
75
|
-
'selectOption',
|
|
76
|
-
'hover',
|
|
77
|
-
'focus',
|
|
78
|
-
'waitForSelector',
|
|
79
|
-
'waitForURL',
|
|
80
|
-
'waitForTimeout',
|
|
81
|
-
'goBack',
|
|
82
|
-
'goForward',
|
|
83
|
-
'reload',
|
|
84
|
-
'toBeVisible',
|
|
85
|
-
'toHaveText',
|
|
86
|
-
'toHaveURL',
|
|
87
|
-
'toHaveAttribute',
|
|
88
|
-
],
|
|
89
|
-
value_source_type: [
|
|
90
|
-
'INLINE',
|
|
91
|
-
'TEST_ACCOUNT',
|
|
92
|
-
],
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
enum_value_translate_matrix = typeAutotestStep_i18n.enum_value_translate_matrix;
|
|
96
|
-
attribute_name_translate_matrix = typeAutotestStep_i18n.attribute_name_translate_matrix;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @param {object|false|undefined} data
|
|
101
|
-
*/
|
|
102
|
-
constructor(data = false)
|
|
103
|
-
{
|
|
104
|
-
super();
|
|
105
|
-
|
|
106
|
-
if (data && is_object(data))
|
|
107
|
-
{
|
|
108
|
-
_.mapObject(data, (value, key) =>
|
|
109
|
-
{
|
|
110
|
-
if (this.hasOwnProperty(key))
|
|
111
|
-
{
|
|
112
|
-
this[ key ] = value;
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return this;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @version v.1.0 (05/09/2026)
|
|
123
|
-
* @param element
|
|
124
|
-
* @param callback
|
|
125
|
-
*/
|
|
126
|
-
increase_sort_order(element = false, callback)
|
|
127
|
-
{
|
|
128
|
-
if (!element)
|
|
129
|
-
{
|
|
130
|
-
element = this;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
let payload = {
|
|
134
|
-
autotest_step_id: element.autotest_step_id
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
if (typeof callback?.before === 'function')
|
|
138
|
-
{
|
|
139
|
-
callback?.before({ payload });
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return ApiService[ this.api_key ].increase_sort_order(payload).then((response) =>
|
|
143
|
-
{
|
|
144
|
-
if (typeof callback?.success === 'function')
|
|
145
|
-
{
|
|
146
|
-
callback?.success({ response, payload })
|
|
147
|
-
}
|
|
148
|
-
}).catch((error) =>
|
|
149
|
-
{
|
|
150
|
-
echo({ error });
|
|
151
|
-
if (typeof callback?.error === 'function')
|
|
152
|
-
{
|
|
153
|
-
callback?.error({ error, payload })
|
|
154
|
-
}
|
|
155
|
-
}).finally((response) =>
|
|
156
|
-
{
|
|
157
|
-
if (typeof callback?.final === 'function')
|
|
158
|
-
{
|
|
159
|
-
callback?.final({ response, payload })
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* @version v.1.0 (05/09/2026)
|
|
167
|
-
* @param element
|
|
168
|
-
* @param callback
|
|
169
|
-
*/
|
|
170
|
-
decrease_sort_order(element = false, callback)
|
|
171
|
-
{
|
|
172
|
-
if (!element)
|
|
173
|
-
{
|
|
174
|
-
element = this;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
let payload = {
|
|
178
|
-
autotest_step_id: element.autotest_step_id
|
|
179
|
-
};
|
|
180
|
-
if (typeof callback?.before === 'function')
|
|
181
|
-
{
|
|
182
|
-
callback?.before({ payload });
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return ApiService[ this.api_key ].decrease_sort_order(payload).then((response) =>
|
|
186
|
-
{
|
|
187
|
-
if (typeof callback?.success === 'function')
|
|
188
|
-
{
|
|
189
|
-
callback?.success({ response, payload })
|
|
190
|
-
}
|
|
191
|
-
}).catch((error) =>
|
|
192
|
-
{
|
|
193
|
-
echo({ error });
|
|
194
|
-
if (typeof callback?.error === 'function')
|
|
195
|
-
{
|
|
196
|
-
callback?.error({ error, payload })
|
|
197
|
-
}
|
|
198
|
-
}).finally((response) =>
|
|
199
|
-
{
|
|
200
|
-
if (typeof callback?.final === 'function')
|
|
201
|
-
{
|
|
202
|
-
callback?.final({ response, payload })
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Save
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* @
|
|
213
|
-
* @param {object}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
1
|
+
import { echo, is_object } from "../../utils/utils.js";
|
|
2
|
+
import { familyTestAutomation } from "../core/1_familyTestAutomation.js";
|
|
3
|
+
import { typeAutotestStep_i18n } from "../element_translate/typeAutotestStep.i18n.js";
|
|
4
|
+
import _ from 'underscore';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Шаг исполняемого автотеста. action_name - белый список интерпретатора Playwright.
|
|
9
|
+
*
|
|
10
|
+
* @version v.1.0 (04/09/2026)
|
|
11
|
+
*/
|
|
12
|
+
export class typeAutotestStep extends familyTestAutomation
|
|
13
|
+
{
|
|
14
|
+
autotest_step_id;
|
|
15
|
+
autotest_case_id;
|
|
16
|
+
team_id;
|
|
17
|
+
sort_order;
|
|
18
|
+
action_name;
|
|
19
|
+
target;
|
|
20
|
+
value_text;
|
|
21
|
+
timeout_ms;
|
|
22
|
+
expected_value;
|
|
23
|
+
object_repository_page_id;
|
|
24
|
+
object_repository_element_id;
|
|
25
|
+
value_source_type;
|
|
26
|
+
value_source_field;
|
|
27
|
+
created_at;
|
|
28
|
+
updated_at;
|
|
29
|
+
|
|
30
|
+
primary_key = 'autotest_step_id';
|
|
31
|
+
api_key = 'autotest_step';
|
|
32
|
+
|
|
33
|
+
structure_scheme = {
|
|
34
|
+
autotest_step_id: 'integer | require',
|
|
35
|
+
autotest_case_id: 'integer | require',
|
|
36
|
+
team_id : 'integer | require',
|
|
37
|
+
sort_order : 'integer | optional',
|
|
38
|
+
action_name : 'string | enum | require',
|
|
39
|
+
target : 'typeAutotestStepTarget | optional',
|
|
40
|
+
value_text : 'string | optional',
|
|
41
|
+
timeout_ms : 'integer | optional',
|
|
42
|
+
expected_value : 'string | optional',
|
|
43
|
+
object_repository_page_id : 'integer | optional',
|
|
44
|
+
object_repository_element_id: 'integer | optional',
|
|
45
|
+
value_source_type : 'string | enum | optional',
|
|
46
|
+
value_source_field : 'string | optional',
|
|
47
|
+
created_at : 'timestamp | optional',
|
|
48
|
+
updated_at : 'timestamp | optional',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
create_scheme = [
|
|
52
|
+
'autotest_case_id',
|
|
53
|
+
'action_name',
|
|
54
|
+
'sort_order',
|
|
55
|
+
'target',
|
|
56
|
+
'value_text',
|
|
57
|
+
'timeout_ms',
|
|
58
|
+
'expected_value',
|
|
59
|
+
'object_repository_page_id',
|
|
60
|
+
'object_repository_element_id',
|
|
61
|
+
'value_source_type',
|
|
62
|
+
'value_source_field',
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
available_enum_values = {
|
|
66
|
+
action_name: [
|
|
67
|
+
'goto',
|
|
68
|
+
'click',
|
|
69
|
+
'dblclick',
|
|
70
|
+
'fill',
|
|
71
|
+
'type',
|
|
72
|
+
'press',
|
|
73
|
+
'check',
|
|
74
|
+
'uncheck',
|
|
75
|
+
'selectOption',
|
|
76
|
+
'hover',
|
|
77
|
+
'focus',
|
|
78
|
+
'waitForSelector',
|
|
79
|
+
'waitForURL',
|
|
80
|
+
'waitForTimeout',
|
|
81
|
+
'goBack',
|
|
82
|
+
'goForward',
|
|
83
|
+
'reload',
|
|
84
|
+
'toBeVisible',
|
|
85
|
+
'toHaveText',
|
|
86
|
+
'toHaveURL',
|
|
87
|
+
'toHaveAttribute',
|
|
88
|
+
],
|
|
89
|
+
value_source_type: [
|
|
90
|
+
'INLINE',
|
|
91
|
+
'TEST_ACCOUNT',
|
|
92
|
+
],
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
enum_value_translate_matrix = typeAutotestStep_i18n.enum_value_translate_matrix;
|
|
96
|
+
attribute_name_translate_matrix = typeAutotestStep_i18n.attribute_name_translate_matrix;
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @param {object|false|undefined} data
|
|
101
|
+
*/
|
|
102
|
+
constructor(data = false)
|
|
103
|
+
{
|
|
104
|
+
super();
|
|
105
|
+
|
|
106
|
+
if (data && is_object(data))
|
|
107
|
+
{
|
|
108
|
+
_.mapObject(data, (value, key) =>
|
|
109
|
+
{
|
|
110
|
+
if (this.hasOwnProperty(key))
|
|
111
|
+
{
|
|
112
|
+
this[ key ] = value;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @version v.1.0 (05/09/2026)
|
|
123
|
+
* @param element
|
|
124
|
+
* @param callback
|
|
125
|
+
*/
|
|
126
|
+
increase_sort_order(element = false, callback)
|
|
127
|
+
{
|
|
128
|
+
if (!element)
|
|
129
|
+
{
|
|
130
|
+
element = this;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
let payload = {
|
|
134
|
+
autotest_step_id: element.autotest_step_id
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
if (typeof callback?.before === 'function')
|
|
138
|
+
{
|
|
139
|
+
callback?.before({ payload });
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return ApiService[ this.api_key ].increase_sort_order(payload).then((response) =>
|
|
143
|
+
{
|
|
144
|
+
if (typeof callback?.success === 'function')
|
|
145
|
+
{
|
|
146
|
+
callback?.success({ response, payload })
|
|
147
|
+
}
|
|
148
|
+
}).catch((error) =>
|
|
149
|
+
{
|
|
150
|
+
echo({ error });
|
|
151
|
+
if (typeof callback?.error === 'function')
|
|
152
|
+
{
|
|
153
|
+
callback?.error({ error, payload })
|
|
154
|
+
}
|
|
155
|
+
}).finally((response) =>
|
|
156
|
+
{
|
|
157
|
+
if (typeof callback?.final === 'function')
|
|
158
|
+
{
|
|
159
|
+
callback?.final({ response, payload })
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @version v.1.0 (05/09/2026)
|
|
167
|
+
* @param element
|
|
168
|
+
* @param callback
|
|
169
|
+
*/
|
|
170
|
+
decrease_sort_order(element = false, callback)
|
|
171
|
+
{
|
|
172
|
+
if (!element)
|
|
173
|
+
{
|
|
174
|
+
element = this;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
let payload = {
|
|
178
|
+
autotest_step_id: element.autotest_step_id
|
|
179
|
+
};
|
|
180
|
+
if (typeof callback?.before === 'function')
|
|
181
|
+
{
|
|
182
|
+
callback?.before({ payload });
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
return ApiService[ this.api_key ].decrease_sort_order(payload).then((response) =>
|
|
186
|
+
{
|
|
187
|
+
if (typeof callback?.success === 'function')
|
|
188
|
+
{
|
|
189
|
+
callback?.success({ response, payload })
|
|
190
|
+
}
|
|
191
|
+
}).catch((error) =>
|
|
192
|
+
{
|
|
193
|
+
echo({ error });
|
|
194
|
+
if (typeof callback?.error === 'function')
|
|
195
|
+
{
|
|
196
|
+
callback?.error({ error, payload })
|
|
197
|
+
}
|
|
198
|
+
}).finally((response) =>
|
|
199
|
+
{
|
|
200
|
+
if (typeof callback?.final === 'function')
|
|
201
|
+
{
|
|
202
|
+
callback?.final({ response, payload })
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Save the whole order of steps of one autotest case in a single call.
|
|
210
|
+
* payload: { autotest_case_id, autotest_step_ids: [] } in the target order.
|
|
211
|
+
*
|
|
212
|
+
* @version v.1.0 (14/09/2026)
|
|
213
|
+
* @param {object} payload
|
|
214
|
+
* @param {object} callback
|
|
215
|
+
*/
|
|
216
|
+
reorder(payload, callback)
|
|
217
|
+
{
|
|
218
|
+
if (typeof callback?.before === 'function')
|
|
219
|
+
{
|
|
220
|
+
callback?.before({ payload });
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
return ApiService[ this.api_key ].reorder(payload).then((response) =>
|
|
224
|
+
{
|
|
225
|
+
if (typeof callback?.success === 'function')
|
|
226
|
+
{
|
|
227
|
+
callback?.success({ response, payload })
|
|
228
|
+
}
|
|
229
|
+
}).catch((error) =>
|
|
230
|
+
{
|
|
231
|
+
echo({ error });
|
|
232
|
+
if (typeof callback?.error === 'function')
|
|
233
|
+
{
|
|
234
|
+
callback?.error({ error, payload })
|
|
235
|
+
}
|
|
236
|
+
}).finally((response) =>
|
|
237
|
+
{
|
|
238
|
+
if (typeof callback?.final === 'function')
|
|
239
|
+
{
|
|
240
|
+
callback?.final({ response, payload })
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Save action fields and target for one step.
|
|
248
|
+
*
|
|
249
|
+
* @version v.1.0 (05/09/2026)
|
|
250
|
+
* @param {object} payload
|
|
251
|
+
* @param {object} callback
|
|
252
|
+
*/
|
|
253
|
+
save(payload = false, callback)
|
|
254
|
+
{
|
|
255
|
+
if (!payload)
|
|
256
|
+
{
|
|
257
|
+
payload = {
|
|
258
|
+
autotest_step_id: this.autotest_step_id,
|
|
259
|
+
action_name : this.action_name,
|
|
260
|
+
target : this.target,
|
|
261
|
+
value_text : this.value_text,
|
|
262
|
+
timeout_ms : this.timeout_ms,
|
|
263
|
+
expected_value : this.expected_value,
|
|
264
|
+
object_repository_page_id : this.object_repository_page_id,
|
|
265
|
+
object_repository_element_id: this.object_repository_element_id,
|
|
266
|
+
value_source_type : this.value_source_type,
|
|
267
|
+
value_source_field : this.value_source_field,
|
|
268
|
+
sort_order : this.sort_order,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (typeof callback?.before === 'function')
|
|
273
|
+
{
|
|
274
|
+
callback?.before({ payload });
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
return ApiService[ this.api_key ].save(payload).then((response) =>
|
|
278
|
+
{
|
|
279
|
+
if (typeof callback?.success === 'function')
|
|
280
|
+
{
|
|
281
|
+
callback?.success({ response, payload })
|
|
282
|
+
}
|
|
283
|
+
}).catch((error) =>
|
|
284
|
+
{
|
|
285
|
+
echo({ error });
|
|
286
|
+
if (typeof callback?.error === 'function')
|
|
287
|
+
{
|
|
288
|
+
callback?.error({ error, payload })
|
|
289
|
+
}
|
|
290
|
+
}).finally((response) =>
|
|
291
|
+
{
|
|
292
|
+
if (typeof callback?.final === 'function')
|
|
293
|
+
{
|
|
294
|
+
callback?.final({ response, payload })
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Save a JSON array of steps. Each item must include autotest_step_id.
|
|
302
|
+
*
|
|
303
|
+
* @version v.1.0 (05/09/2026)
|
|
304
|
+
* @param {object} payload
|
|
305
|
+
* @param {object} callback
|
|
306
|
+
*/
|
|
307
|
+
save_json(payload, callback)
|
|
308
|
+
{
|
|
309
|
+
if (typeof callback?.before === 'function')
|
|
310
|
+
{
|
|
311
|
+
callback?.before({ payload });
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return ApiService[ this.api_key ].save_json(payload).then((response) =>
|
|
315
|
+
{
|
|
316
|
+
if (typeof callback?.success === 'function')
|
|
317
|
+
{
|
|
318
|
+
callback?.success({ response, payload })
|
|
319
|
+
}
|
|
320
|
+
}).catch((error) =>
|
|
321
|
+
{
|
|
322
|
+
echo({ error });
|
|
323
|
+
if (typeof callback?.error === 'function')
|
|
324
|
+
{
|
|
325
|
+
callback?.error({ error, payload })
|
|
326
|
+
}
|
|
327
|
+
}).finally((response) =>
|
|
328
|
+
{
|
|
329
|
+
if (typeof callback?.final === 'function')
|
|
330
|
+
{
|
|
331
|
+
callback?.final({ response, payload })
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
}
|
|
@@ -77,7 +77,19 @@ export class typeCustomProperty extends familyTestDocumentation
|
|
|
77
77
|
|
|
78
78
|
static get_element_type_values()
|
|
79
79
|
{
|
|
80
|
-
return [
|
|
80
|
+
return [
|
|
81
|
+
'test_case',
|
|
82
|
+
'bug',
|
|
83
|
+
'autotest_case',
|
|
84
|
+
'autotest_run',
|
|
85
|
+
'object_repository_page',
|
|
86
|
+
'object_repository_element',
|
|
87
|
+
'test_run',
|
|
88
|
+
'test_run_result',
|
|
89
|
+
'test_account',
|
|
90
|
+
'execution_context',
|
|
91
|
+
'text_document',
|
|
92
|
+
];
|
|
81
93
|
}
|
|
82
94
|
|
|
83
95
|
|
|
@@ -49,7 +49,11 @@ export class typeCustomPropertyValue extends familyRelation
|
|
|
49
49
|
autotest_run : { type_token: 'typeAutotestRun', primary_key: 'autotest_run_id', api_key: 'autotest_run' },
|
|
50
50
|
object_repository_page : { type_token: 'typeObjectRepositoryPage', primary_key: 'object_repository_page_id', api_key: 'object_repository_page' },
|
|
51
51
|
object_repository_element : { type_token: 'typeObjectRepositoryElement', primary_key: 'object_repository_element_id', api_key: 'object_repository_element' },
|
|
52
|
-
|
|
52
|
+
test_run : { type_token: 'typeTestRun', primary_key: 'test_run_id', api_key: 'test_run' },
|
|
53
|
+
test_run_result : { type_token: 'typeTestRunResult', primary_key: 'test_run_result_id', api_key: 'test_run_result' },
|
|
54
|
+
test_account : { type_token: 'typeTestAccount', primary_key: 'test_account_id', api_key: 'test_account' },
|
|
55
|
+
execution_context : { type_token: 'typeExecutionContext', primary_key: 'execution_context_id', api_key: 'execution_context' },
|
|
56
|
+
text_document : { type_token: 'typeTextDocument', primary_key: 'text_document_id', api_key: 'text_document' },
|
|
53
57
|
};
|
|
54
58
|
|
|
55
59
|
structure_scheme = {
|