complexqa_frontend_core 1.20.1 → 1.20.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
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Спецификация data-колонок execution_context × listing (без goto).
|
|
3
|
+
* Единый источник для listing и вложенных таблиц (bug_relation.execution_contexts).
|
|
4
|
+
*
|
|
5
|
+
* @returns {Array<{ field: string, overrides: import('./column_factory.js').ColumnOverrides }>}
|
|
6
|
+
*/
|
|
7
|
+
export function get_execution_context_listing_field_specs()
|
|
8
|
+
{
|
|
9
|
+
return [
|
|
10
|
+
{ field: 'execution_context_id', overrides: { width: '60', default_sort: 'desc' } },
|
|
11
|
+
{ field: 'context_title', overrides: { width: '420', is_required: false, is_title: true } },
|
|
12
|
+
{ field: 'browser_context_id', overrides: { width: '200' } },
|
|
13
|
+
{ field: 'os_context_id', overrides: { width: '200' } },
|
|
14
|
+
{ field: 'screen_resolution_context_id', overrides: { width: '200' } },
|
|
15
|
+
{ field: 'device_context_id', overrides: { width: '200' } },
|
|
16
|
+
{ field: 'locale_context_id', overrides: { width: '200' } },
|
|
17
|
+
{ field: 'deployment_target_context_id', overrides: { width: '200' } },
|
|
18
|
+
{ field: 'protocol', overrides: { width: '120' } },
|
|
19
|
+
{ field: 'host', overrides: { width: '200' } },
|
|
20
|
+
{ field: 'build_version', overrides: { width: '160' } },
|
|
21
|
+
{ field: 'created_at', overrides: { width: '170' } },
|
|
22
|
+
];
|
|
23
|
+
}
|
|
@@ -5,17 +5,9 @@ import { typeExecutionContext } from '../../../types/family_context/typeExecutio
|
|
|
5
5
|
import { typeBug } from '../../../types/family_elements/typeBug.js';
|
|
6
6
|
import { UserService } from '../../../services/UserService.js';
|
|
7
7
|
import { createColumn, createGoToColumn } from '../helpers/column_factory.js';
|
|
8
|
+
import { get_execution_context_listing_field_specs } from '../helpers/execution_context_listing_fields.js';
|
|
8
9
|
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
9
10
|
|
|
10
|
-
const EXECUTION_CONTEXT_FK_FIELDS = [
|
|
11
|
-
'browser_context_id',
|
|
12
|
-
'os_context_id',
|
|
13
|
-
'screen_resolution_context_id',
|
|
14
|
-
'device_context_id',
|
|
15
|
-
'locale_context_id',
|
|
16
|
-
'deployment_target_context_id',
|
|
17
|
-
];
|
|
18
|
-
|
|
19
11
|
/**
|
|
20
12
|
* Колонки связанных тест-кейсов на странице bug/details.
|
|
21
13
|
* Поля совпадают с test_case × listing, данные — через hydrate element_id.
|
|
@@ -144,7 +136,6 @@ function build_bug_relation_execution_contexts_columns(locale)
|
|
|
144
136
|
{
|
|
145
137
|
const relation_model = new typeBugRelation();
|
|
146
138
|
const context_model = new typeExecutionContext();
|
|
147
|
-
const columns = [];
|
|
148
139
|
|
|
149
140
|
const ecColumn = (field, overrides = {}) => createColumn(relation_model, locale, `element_id.${ field }`, {
|
|
150
141
|
header_field : field,
|
|
@@ -153,20 +144,10 @@ function build_bug_relation_execution_contexts_columns(locale)
|
|
|
153
144
|
...overrides,
|
|
154
145
|
});
|
|
155
146
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
is_title : true,
|
|
161
|
-
}));
|
|
162
|
-
columns.push(...EXECUTION_CONTEXT_FK_FIELDS.map((field) => ecColumn(field, { width: '200' })));
|
|
163
|
-
columns.push(ecColumn('protocol', { width: '120' }));
|
|
164
|
-
columns.push(ecColumn('host', { width: '200' }));
|
|
165
|
-
columns.push(ecColumn('build_version', { width: '160' }));
|
|
166
|
-
columns.push(ecColumn('created_at', { width: '170', is_required: true }));
|
|
167
|
-
columns.push(createGoToColumn(context_model, locale, { field: 'element_id' }));
|
|
168
|
-
|
|
169
|
-
return columns;
|
|
147
|
+
return [
|
|
148
|
+
...get_execution_context_listing_field_specs().map(({ field, overrides }) => ecColumn(field, overrides)),
|
|
149
|
+
createGoToColumn(context_model, locale, { field: 'element_id' }),
|
|
150
|
+
];
|
|
170
151
|
}
|
|
171
152
|
|
|
172
153
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { typeExecutionContext } from '../../../types/family_context/typeExecutionContext.js';
|
|
2
2
|
import { UserService } from '../../../services/UserService.js';
|
|
3
3
|
import { createColumn, createGoToColumn, createPrimaryKeyColumn, createRowSelectColumn } from '../helpers/column_factory.js';
|
|
4
|
+
import { get_execution_context_listing_field_specs } from '../helpers/execution_context_listing_fields.js';
|
|
4
5
|
import { createListingFor, registerSection } from '../helpers/section_registry.js';
|
|
5
6
|
|
|
6
7
|
const FK_FIELDS = [
|
|
@@ -12,18 +13,30 @@ const FK_FIELDS = [
|
|
|
12
13
|
'deployment_target_context_id',
|
|
13
14
|
];
|
|
14
15
|
|
|
16
|
+
const EXECUTION_CONTEXT_EDITABLE_FIELDS = new Set([
|
|
17
|
+
'context_title',
|
|
18
|
+
...FK_FIELDS,
|
|
19
|
+
'protocol',
|
|
20
|
+
'host',
|
|
21
|
+
'build_version',
|
|
22
|
+
]);
|
|
23
|
+
|
|
15
24
|
function build_execution_context_listing_columns(locale)
|
|
16
25
|
{
|
|
17
26
|
const model = new typeExecutionContext();
|
|
18
27
|
|
|
19
28
|
return [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
...get_execution_context_listing_field_specs().map(({ field, overrides }) => {
|
|
30
|
+
if (field === 'execution_context_id')
|
|
31
|
+
{
|
|
32
|
+
return createPrimaryKeyColumn(model, locale, { is_editable: false, ...overrides });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return createColumn(model, locale, field, {
|
|
36
|
+
is_editable: EXECUTION_CONTEXT_EDITABLE_FIELDS.has(field),
|
|
37
|
+
...overrides,
|
|
38
|
+
});
|
|
39
|
+
}),
|
|
27
40
|
createGoToColumn(model, locale),
|
|
28
41
|
];
|
|
29
42
|
}
|