complexqa_frontend_core 1.19.2 → 1.19.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "complexqa_frontend_core",
3
- "version": "1.19.2",
3
+ "version": "1.19.4",
4
4
  "description": "core of web ",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,5 +1,6 @@
1
1
  import { typeBugRelation } from '../../../types/family_relation/typeBugRelation.js';
2
2
  import { typeTestCase } from '../../../types/family_elements/typeTestCase.js';
3
+ import { typeBug } from '../../../types/family_elements/typeBug.js';
3
4
  import { UserService } from '../../../services/UserService.js';
4
5
  import { createColumn, createGoToColumn } from '../helpers/column_factory.js';
5
6
  import { createListingFor, registerSection } from '../helpers/section_registry.js';
@@ -42,7 +43,47 @@ function build_bug_relation_test_cases_columns(locale)
42
43
 
43
44
 
44
45
  /**
45
- * Секции `bug_relation`: `test_cases`.
46
+ * Колонки связанных багов на странице test_case/details.
47
+ * Поля совпадают с bug × listing, данные — через hydrate bug_id.
48
+ *
49
+ * @param {string} locale
50
+ * @returns {import('../../../types/family_service/typeTableColumn.js').typeTableColumn[]}
51
+ */
52
+ export function build_bug_relation_bugs_columns(locale)
53
+ {
54
+ const relation_model = new typeBugRelation();
55
+ const bug_model = new typeBug();
56
+ const columns = [];
57
+
58
+ const bugColumn = (field, overrides = {}) => createColumn(relation_model, locale, `bug_id.${ field }`, {
59
+ header_field : field,
60
+ header_element_type : 'bug',
61
+ is_editable : false,
62
+ ...overrides,
63
+ });
64
+
65
+ columns.push(bugColumn('bug_id', { width: '60', default_sort: 'desc' }));
66
+ columns.push(bugColumn('bug_title', {
67
+ width : '420',
68
+ is_required : true,
69
+ is_title : true,
70
+ }));
71
+ columns.push(bugColumn('bug_status', { width: '150', is_required: true }));
72
+ columns.push(bugColumn('bug_priority', { width: '130', is_required: true }));
73
+ columns.push(bugColumn('bug_severity', { width: '130', is_required: true }));
74
+ columns.push(bugColumn('bug_type', { width: '150', is_required: true }));
75
+ columns.push(bugColumn('bug_resolution', { width: '150', is_required: true, is_hide: true }));
76
+ columns.push(bugColumn('assigned_to', { width: '220', is_required: true }));
77
+ columns.push(bugColumn('created_at', { width: '170', is_required: true }));
78
+ columns.push(bugColumn('completed_at', { width: '170', is_required: true, is_hide: true }));
79
+ columns.push(createGoToColumn(bug_model, locale, { field: 'bug_id' }));
80
+
81
+ return columns;
82
+ }
83
+
84
+
85
+ /**
86
+ * Секции `bug_relation`: `test_cases`, `bugs`.
46
87
  *
47
88
  * @param {Object<string, Object<string, { config: import('../../../types/family_service/typeTableConfiguration.js').typeTableConfiguration }>>} config
48
89
  * @returns {void}
@@ -54,4 +95,8 @@ export function bootstrap_bug_relation(config)
54
95
  registerSection(config, 'bug_relation', 'test_cases', build_bug_relation_test_cases_columns(locale), {
55
96
  for: createListingFor([ 'bug_id', 'relation_type' ], { add: [ 'elements' ] }),
56
97
  });
98
+
99
+ registerSection(config, 'bug_relation', 'bugs', build_bug_relation_bugs_columns(locale), {
100
+ for: createListingFor([ 'relation_type', 'element_id' ], { add: [ 'bugs' ] }),
101
+ });
57
102
  }
@@ -2,6 +2,7 @@ import { typeTestRunResult } from '../../../types/family_elements/typeTestRunRes
2
2
  import { UserService } from '../../../services/UserService.js';
3
3
  import { createColumn, createGoToColumn, createPrimaryKeyColumn, createRowSelectColumn } from '../helpers/column_factory.js';
4
4
  import { createListingFor, registerSection } from '../helpers/section_registry.js';
5
+ import { build_bug_relation_bugs_columns } from './bug_relation.js';
5
6
 
6
7
  function build_test_run_result_listing_columns(locale, { include_select = true } = {})
7
8
  {
@@ -75,7 +76,7 @@ function build_test_run_result_details_columns(locale)
75
76
 
76
77
 
77
78
  /**
78
- * Секции `test_run_result`: `listing`, `todo`, `details`.
79
+ * Секции `test_run_result`: `listing`, `todo`, `details`, `bugs`.
79
80
  *
80
81
  * @param {Object<string, Object<string, { config: import('../../../types/family_service/typeTableConfiguration.js').typeTableConfiguration }>>} config
81
82
  * @returns {void}
@@ -93,4 +94,8 @@ export function bootstrap_test_run_result(config)
93
94
  });
94
95
 
95
96
  registerSection(config, 'test_run_result', 'details', build_test_run_result_details_columns(locale));
97
+
98
+ registerSection(config, 'test_run_result', 'bugs', build_bug_relation_bugs_columns(locale), {
99
+ for: createListingFor([ 'relation_type', 'element_id' ], { add: [ 'bugs' ] }),
100
+ });
96
101
  }
@@ -15,6 +15,7 @@ export class typeTestRunResult extends familyTestDocumentation
15
15
  project_id;
16
16
  test_run_id;
17
17
  test_result_status;
18
+ test_result_description;
18
19
  assigned_to;
19
20
  //reference_defects_ids; // list of IDs in user bug tracker / include sentry ids
20
21
 
@@ -29,12 +30,13 @@ export class typeTestRunResult extends familyTestDocumentation
29
30
  api_key = 'test_run_result';
30
31
 
31
32
  structure_scheme = {
32
- test_result_id : 'integer | require',
33
- test_case_id : 'integer | require',
34
- test_run_id : 'integer | require',
35
- test_result_status: 'string | enum | require',
36
- assigned_to : 'integer | typeUser | optional',
37
- project_id : 'integer | require',
33
+ test_result_id : 'integer | require',
34
+ test_case_id : 'integer | require',
35
+ test_run_id : 'integer | require',
36
+ test_result_status : 'string | enum | require',
37
+ test_result_description: 'string | StringHtml | optional',
38
+ assigned_to : 'integer | typeUser | optional',
39
+ project_id : 'integer | require',
38
40
  //test_run_result_to_execute: 'time | optional',
39
41
  //reference_defects_ids : 'array | reference | optional',
40
42
  created_at : 'timestamp | require',
@@ -52,8 +54,9 @@ export class typeTestRunResult extends familyTestDocumentation
52
54
  test_result_id : 'ID',
53
55
  test_case_id : 'Test case',
54
56
  test_run_id : 'Test run',
55
- test_result_status: 'Status',
56
- assigned_to : 'Assigned to',
57
+ test_result_status : 'Status',
58
+ test_result_description: 'Description',
59
+ assigned_to : 'Assigned to',
57
60
  project_id : 'Project',
58
61
  created_at : 'Created at',
59
62
  updated_at : 'Updated at',
@@ -63,8 +66,9 @@ export class typeTestRunResult extends familyTestDocumentation
63
66
  test_result_id : 'ID',
64
67
  test_case_id : 'Тест кейс',
65
68
  test_run_id : 'Тестовый прогон',
66
- test_result_status: 'Статус',
67
- assigned_to : 'Назначен',
69
+ test_result_status : 'Статус',
70
+ test_result_description: 'Описание',
71
+ assigned_to : 'Назначен',
68
72
  project_id : 'Проект',
69
73
  created_at : 'Создано',
70
74
  updated_at : 'Обновлено',