complexqa_frontend_core 2.6.1 → 2.7.1
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/api/autotest_run_api.js +21 -0
- package/src/index.js +1 -0
- package/src/types/element_translate/typeAutotestStep.i18n.js +3 -0
- package/src/types/element_translate/typeBug.i18n.js +1 -1
- package/src/types/family_elements/typeAutotestRun.js +12 -2
- package/src/types/family_elements/typeAutotestStep.js +1 -0
- package/src/types/family_elements/typeRunParameter.js +45 -0
package/package.json
CHANGED
|
@@ -33,4 +33,25 @@ export class AutotestRunApi extends ApiAbstractElementClass
|
|
|
33
33
|
payload : payload
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Имена параметров из шагов будущего запуска. Запись не создаёт.
|
|
40
|
+
*
|
|
41
|
+
* @param payload
|
|
42
|
+
* @returns {Promise<{payload, response: Promise<*>}>}
|
|
43
|
+
*/
|
|
44
|
+
async required_run_parameters(payload)
|
|
45
|
+
{
|
|
46
|
+
let url = `/${ this.api_prefix }/${ this.module_prefix }/required_run_parameters`;
|
|
47
|
+
|
|
48
|
+
payload = this.handle_request_payload(payload);
|
|
49
|
+
let response = this.api_request(url, payload);
|
|
50
|
+
response = this.handle_response(response, false);
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
response: response,
|
|
54
|
+
payload : payload
|
|
55
|
+
};
|
|
56
|
+
}
|
|
36
57
|
}
|
package/src/index.js
CHANGED
|
@@ -41,6 +41,7 @@ export {
|
|
|
41
41
|
build_autotest_step_target_storage,
|
|
42
42
|
} from './types/family_elements/autotest_step_actions/autotestStepTargetNormalizer.js';
|
|
43
43
|
export { typeAutotestRun } from './types/family_elements/typeAutotestRun.js';
|
|
44
|
+
export { typeRunParameter } from './types/family_elements/typeRunParameter.js';
|
|
44
45
|
export { typeAutotestResult } from './types/family_elements/typeAutotestResult.js';
|
|
45
46
|
export { typeObjectRepositoryFolder } from './types/family_elements/typeObjectRepositoryFolder.js';
|
|
46
47
|
export { typeObjectRepositoryPage } from './types/family_elements/typeObjectRepositoryPage.js';
|
|
@@ -62,18 +62,21 @@ export const typeAutotestStep_i18n = {
|
|
|
62
62
|
value_source_type: {
|
|
63
63
|
INLINE: 'Inline',
|
|
64
64
|
TEST_ACCOUNT: 'Test account',
|
|
65
|
+
RUN_PARAMETER: 'Run parameter',
|
|
65
66
|
},
|
|
66
67
|
},
|
|
67
68
|
ru: {
|
|
68
69
|
value_source_type: {
|
|
69
70
|
INLINE: 'Введено',
|
|
70
71
|
TEST_ACCOUNT: 'Тестовый аккаунт',
|
|
72
|
+
RUN_PARAMETER: 'Параметр запуска',
|
|
71
73
|
},
|
|
72
74
|
},
|
|
73
75
|
tt: {
|
|
74
76
|
value_source_type: {
|
|
75
77
|
INLINE: 'Кулдан',
|
|
76
78
|
TEST_ACCOUNT: 'Тест аккаунты',
|
|
79
|
+
RUN_PARAMETER: 'Җибәрү параметры',
|
|
77
80
|
},
|
|
78
81
|
},
|
|
79
82
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { echo, is_object } from "../../utils/utils.js";
|
|
2
2
|
import { familyTestAutomation } from "../core/1_familyTestAutomation.js";
|
|
3
3
|
import { typeAutotestRun_i18n } from "../element_translate/typeAutotestRun.i18n.js";
|
|
4
|
+
import { typeRunParameter } from "./typeRunParameter.js";
|
|
4
5
|
import _ from 'underscore';
|
|
5
6
|
|
|
6
7
|
|
|
@@ -35,6 +36,7 @@ export class typeAutotestRun extends familyTestAutomation
|
|
|
35
36
|
finished_at;
|
|
36
37
|
created_at;
|
|
37
38
|
updated_at;
|
|
39
|
+
run_parameters;
|
|
38
40
|
|
|
39
41
|
primary_key = 'autotest_run_id';
|
|
40
42
|
api_key = 'autotest_run';
|
|
@@ -64,6 +66,7 @@ export class typeAutotestRun extends familyTestAutomation
|
|
|
64
66
|
finished_at : 'timestamp | optional',
|
|
65
67
|
created_at : 'timestamp | optional',
|
|
66
68
|
updated_at : 'timestamp | optional',
|
|
69
|
+
run_parameters : 'array | typeRunParameter | optional',
|
|
67
70
|
};
|
|
68
71
|
|
|
69
72
|
create_scheme = [
|
|
@@ -81,6 +84,7 @@ export class typeAutotestRun extends familyTestAutomation
|
|
|
81
84
|
'screenshot_on_failure',
|
|
82
85
|
'screenshot_on_result',
|
|
83
86
|
'consecutive_error_stop',
|
|
87
|
+
'run_parameters',
|
|
84
88
|
];
|
|
85
89
|
|
|
86
90
|
/** @type {Record<string, string[]>} */
|
|
@@ -112,10 +116,16 @@ export class typeAutotestRun extends familyTestAutomation
|
|
|
112
116
|
{
|
|
113
117
|
_.mapObject(data, (value, key) =>
|
|
114
118
|
{
|
|
115
|
-
if (this.hasOwnProperty(key))
|
|
119
|
+
if (!this.hasOwnProperty(key))
|
|
116
120
|
{
|
|
117
|
-
|
|
121
|
+
return;
|
|
118
122
|
}
|
|
123
|
+
if (key === 'run_parameters' && Array.isArray(value))
|
|
124
|
+
{
|
|
125
|
+
this.run_parameters = value.map((row) => new typeRunParameter(row));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
this[ key ] = value;
|
|
119
129
|
});
|
|
120
130
|
}
|
|
121
131
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { familyTestAutomation } from "../core/1_familyTestAutomation.js";
|
|
2
|
+
import { is_object } from "../../utils/utils.js";
|
|
3
|
+
import _ from 'underscore';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Строка параметра запуска. Без своего API.
|
|
8
|
+
* Первичный ключ run_parameter_id.
|
|
9
|
+
*
|
|
10
|
+
* @version v.1.0 (27/10/2026)
|
|
11
|
+
*/
|
|
12
|
+
export class typeRunParameter extends familyTestAutomation
|
|
13
|
+
{
|
|
14
|
+
run_parameter_id;
|
|
15
|
+
run_parameter_name;
|
|
16
|
+
run_parameter_value;
|
|
17
|
+
|
|
18
|
+
structure_scheme = {
|
|
19
|
+
run_parameter_id : 'integer | optional',
|
|
20
|
+
run_parameter_name : 'string | require',
|
|
21
|
+
run_parameter_value : 'string | require',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param {object|false|undefined} data
|
|
27
|
+
*/
|
|
28
|
+
constructor(data = false)
|
|
29
|
+
{
|
|
30
|
+
super();
|
|
31
|
+
|
|
32
|
+
if (data && is_object(data))
|
|
33
|
+
{
|
|
34
|
+
_.mapObject(data, (value, key) =>
|
|
35
|
+
{
|
|
36
|
+
if (this.hasOwnProperty(key))
|
|
37
|
+
{
|
|
38
|
+
this[ key ] = value;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
}
|