complexqa_frontend_core 1.17.13 → 1.18.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/publish/app_configuration/table/helpers/table_element_models.js +4 -2
- package/publish/app_configuration/table/sections/execution_context.js +75 -0
- package/publish/app_configuration/table/table_configuration.js +2 -0
- package/publish/types/family_context/typeExecutionContext.js +19 -15
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { typeTestRun } from '../../../types/family_elements/typeTestRun.js';
|
|
|
4
4
|
import { typeBug } from '../../../types/family_elements/typeBug.js';
|
|
5
5
|
import { typeTestRunResult } from '../../../types/family_elements/typeTestRunResult.js';
|
|
6
6
|
import { typeTestAccount } from '../../../types/family_elements/typeTestAccount.js';
|
|
7
|
+
import { typeExecutionContext } from '../../../types/family_context/typeExecutionContext.js';
|
|
7
8
|
import { typeTeamMember } from '../../../types/family_elements/typeTeamMember.js';
|
|
8
9
|
import { typeTestCaseStep } from '../../../types/family_elements/typeTestCaseStep.js';
|
|
9
10
|
import { typeUser } from '../../../types/family_elements/typeUser.js';
|
|
@@ -26,8 +27,9 @@ export const TABLE_ELEMENT_MODELS = {
|
|
|
26
27
|
test_run : typeTestRun,
|
|
27
28
|
bug : typeBug,
|
|
28
29
|
test_run_result: typeTestRunResult,
|
|
29
|
-
test_account
|
|
30
|
-
|
|
30
|
+
test_account : typeTestAccount,
|
|
31
|
+
execution_context : typeExecutionContext,
|
|
32
|
+
team_member : typeTeamMember,
|
|
31
33
|
test_case_step : typeTestCaseStep,
|
|
32
34
|
user : typeUser,
|
|
33
35
|
team : typeTeam,
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { typeExecutionContext } from '../../../types/family_context/typeExecutionContext.js';
|
|
2
|
+
import { UserService } from '../../../services/UserService.js';
|
|
3
|
+
import { createColumn, createGoToColumn, createPrimaryKeyColumn } from '../helpers/column_factory.js';
|
|
4
|
+
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
5
|
+
|
|
6
|
+
const FK_FIELDS = [
|
|
7
|
+
'browser_context_id',
|
|
8
|
+
'os_context_id',
|
|
9
|
+
'screen_resolution_context_id',
|
|
10
|
+
'device_context_id',
|
|
11
|
+
'locale_context_id',
|
|
12
|
+
'deployment_target_context_id',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
function build_execution_context_listing_columns(locale)
|
|
16
|
+
{
|
|
17
|
+
const model = new typeExecutionContext();
|
|
18
|
+
|
|
19
|
+
return [
|
|
20
|
+
createPrimaryKeyColumn(model, locale, { is_editable: false }),
|
|
21
|
+
createColumn(model, locale, 'context_title', { width: '420', is_editable: true, is_required: false }),
|
|
22
|
+
...FK_FIELDS.map((field) => createColumn(model, locale, field, { width: '200', is_editable: false })),
|
|
23
|
+
createColumn(model, locale, 'protocol', { width: '120', is_editable: true }),
|
|
24
|
+
createColumn(model, locale, 'host', { width: '200', is_editable: true }),
|
|
25
|
+
createColumn(model, locale, 'build_version', { width: '160', is_editable: true }),
|
|
26
|
+
createColumn(model, locale, 'created_at', { width: '170' }),
|
|
27
|
+
createGoToColumn(model, locale),
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
function build_execution_context_details_columns(locale)
|
|
33
|
+
{
|
|
34
|
+
const model = new typeExecutionContext();
|
|
35
|
+
const fields = [
|
|
36
|
+
'execution_context_id',
|
|
37
|
+
'project_id',
|
|
38
|
+
'team_id',
|
|
39
|
+
'context_title',
|
|
40
|
+
...FK_FIELDS,
|
|
41
|
+
'protocol',
|
|
42
|
+
'host',
|
|
43
|
+
'base_url',
|
|
44
|
+
'build_version',
|
|
45
|
+
'created_at',
|
|
46
|
+
'updated_at',
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const editableFields = new Set([ 'context_title', 'protocol', 'host', 'base_url', 'build_version' ]);
|
|
50
|
+
|
|
51
|
+
return fields.map((field, index) => createColumn(model, locale, field, {
|
|
52
|
+
sort_order : String(index + 1),
|
|
53
|
+
is_editable: editableFields.has(field),
|
|
54
|
+
is_sortable: false,
|
|
55
|
+
is_filter : false,
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Секции `execution_context`: `listing`, `details`.
|
|
62
|
+
*
|
|
63
|
+
* @param {Object<string, Object<string, { config: import('../../../types/family_service/typeTableConfiguration.js').typeTableConfiguration }>>} config
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
66
|
+
export function bootstrap_execution_context(config)
|
|
67
|
+
{
|
|
68
|
+
const locale = UserService.get_current_language();
|
|
69
|
+
|
|
70
|
+
registerSection(config, 'execution_context', 'listing', build_execution_context_listing_columns(locale), {
|
|
71
|
+
for: createListingFor([ 'project_id' ]),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
registerSection(config, 'execution_context', 'details', build_execution_context_details_columns(locale));
|
|
75
|
+
}
|
|
@@ -5,6 +5,7 @@ import { bootstrap_test_case_step } from './sections/test_case_step.js';
|
|
|
5
5
|
import { bootstrap_test_run } from './sections/test_run.js';
|
|
6
6
|
import { bootstrap_test_run_result } from './sections/test_run_result.js';
|
|
7
7
|
import { bootstrap_test_account } from './sections/test_account.js';
|
|
8
|
+
import { bootstrap_execution_context } from './sections/execution_context.js';
|
|
8
9
|
import { bootstrap_team_member } from './sections/team_member.js';
|
|
9
10
|
import { bootstrap_user } from './sections/user.js';
|
|
10
11
|
import { bootstrap_team } from './sections/team.js';
|
|
@@ -110,6 +111,7 @@ export class TableConfiguration extends abstractAppConfiguration
|
|
|
110
111
|
bootstrap_test_run(this.config);
|
|
111
112
|
bootstrap_test_run_result(this.config);
|
|
112
113
|
bootstrap_test_account(this.config);
|
|
114
|
+
bootstrap_execution_context(this.config);
|
|
113
115
|
bootstrap_team_member(this.config);
|
|
114
116
|
bootstrap_user(this.config);
|
|
115
117
|
bootstrap_team(this.config);
|
|
@@ -5,8 +5,7 @@ import { is_object } from "../../utils/utils.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Снимок окружения на момент события (баг, результат прогона, автотест).
|
|
7
7
|
*
|
|
8
|
-
* Ссылается на справочники familyContext по FK
|
|
9
|
-
* копия для истории (если справочник переименуют). host/base_url — проектный URL.
|
|
8
|
+
* Ссылается на справочники familyContext по FK. host/base_url — проектный URL.
|
|
10
9
|
*
|
|
11
10
|
* @version v.0.1 (03/06/2026)
|
|
12
11
|
*/
|
|
@@ -16,6 +15,9 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
16
15
|
project_id;
|
|
17
16
|
team_id;
|
|
18
17
|
|
|
18
|
+
context_title;
|
|
19
|
+
context_description;
|
|
20
|
+
|
|
19
21
|
browser_context_id;
|
|
20
22
|
os_context_id;
|
|
21
23
|
screen_resolution_context_id;
|
|
@@ -28,10 +30,6 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
28
30
|
base_url;
|
|
29
31
|
build_version;
|
|
30
32
|
|
|
31
|
-
context_snapshot;
|
|
32
|
-
custom_field_values;
|
|
33
|
-
test_account_id;
|
|
34
|
-
|
|
35
33
|
created_at;
|
|
36
34
|
updated_at;
|
|
37
35
|
|
|
@@ -42,6 +40,8 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
42
40
|
execution_context_id : 'integer | require',
|
|
43
41
|
project_id : 'integer | require',
|
|
44
42
|
team_id : 'integer | require',
|
|
43
|
+
context_title : 'string | optional',
|
|
44
|
+
context_description : 'string | StringHtml | optional',
|
|
45
45
|
browser_context_id : 'integer | optional',
|
|
46
46
|
os_context_id : 'integer | optional',
|
|
47
47
|
screen_resolution_context_id: 'integer | optional',
|
|
@@ -52,9 +52,6 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
52
52
|
host : 'string | max:255 | optional',
|
|
53
53
|
base_url : 'string | max:2048 | optional',
|
|
54
54
|
build_version : 'string | max:128 | optional',
|
|
55
|
-
context_snapshot : 'object | optional',
|
|
56
|
-
custom_field_values : 'object | optional',
|
|
57
|
-
test_account_id : 'integer | optional',
|
|
58
55
|
created_at : 'timestamp | require',
|
|
59
56
|
updated_at : 'timestamp | optional',
|
|
60
57
|
};
|
|
@@ -84,6 +81,8 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
84
81
|
attribute_name_translate_matrix = {
|
|
85
82
|
en: {
|
|
86
83
|
execution_context_id : 'ID',
|
|
84
|
+
context_title : 'Title',
|
|
85
|
+
context_description : 'Description',
|
|
87
86
|
project_id : 'Project',
|
|
88
87
|
team_id : 'Team',
|
|
89
88
|
browser_context_id : 'Browser',
|
|
@@ -96,14 +95,13 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
96
95
|
host : 'Host',
|
|
97
96
|
base_url : 'Base URL',
|
|
98
97
|
build_version : 'Build version',
|
|
99
|
-
context_snapshot : 'Context snapshot',
|
|
100
|
-
custom_field_values : 'Custom fields',
|
|
101
|
-
test_account_id : 'Test account',
|
|
102
98
|
created_at : 'Created at',
|
|
103
99
|
updated_at : 'Updated at',
|
|
104
100
|
},
|
|
105
101
|
ru: {
|
|
106
102
|
execution_context_id : 'ID',
|
|
103
|
+
context_title : 'Название',
|
|
104
|
+
context_description : 'Описание',
|
|
107
105
|
project_id : 'Проект',
|
|
108
106
|
team_id : 'Команда',
|
|
109
107
|
browser_context_id : 'Браузер',
|
|
@@ -116,9 +114,6 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
116
114
|
host : 'Хост',
|
|
117
115
|
base_url : 'Базовый URL',
|
|
118
116
|
build_version : 'Версия сборки',
|
|
119
|
-
context_snapshot : 'Снимок контекста',
|
|
120
|
-
custom_field_values : 'Доп. поля',
|
|
121
|
-
test_account_id : 'Тестовый аккаунт',
|
|
122
117
|
created_at : 'Создано',
|
|
123
118
|
updated_at : 'Обновлено',
|
|
124
119
|
},
|
|
@@ -145,4 +140,13 @@ export class typeExecutionContext extends familyGeneralElement
|
|
|
145
140
|
|
|
146
141
|
return this;
|
|
147
142
|
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @returns {string}
|
|
147
|
+
*/
|
|
148
|
+
get_element_name()
|
|
149
|
+
{
|
|
150
|
+
return this.context_title || String(this.execution_context_id ?? '');
|
|
151
|
+
}
|
|
148
152
|
}
|