complexqa_frontend_core 1.19.4 → 1.19.5

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.4",
3
+ "version": "1.19.5",
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 { typeTestRunResult } from '../../../types/family_elements/typeTestRunResult.js';
3
4
  import { typeBug } from '../../../types/family_elements/typeBug.js';
4
5
  import { UserService } from '../../../services/UserService.js';
5
6
  import { createColumn, createGoToColumn } from '../helpers/column_factory.js';
@@ -83,7 +84,47 @@ export function build_bug_relation_bugs_columns(locale)
83
84
 
84
85
 
85
86
  /**
86
- * Секции `bug_relation`: `test_cases`, `bugs`.
87
+ * Колонки связанных результатов прогона на странице bug/details.
88
+ * Поля совпадают с test_run_result × listing, данные — через hydrate element_id.
89
+ *
90
+ * @param {string} locale
91
+ * @returns {import('../../../types/family_service/typeTableColumn.js').typeTableColumn[]}
92
+ */
93
+ function build_bug_relation_test_run_results_columns(locale)
94
+ {
95
+ const relation_model = new typeBugRelation();
96
+ const result_model = new typeTestRunResult();
97
+ const columns = [];
98
+
99
+ const trColumn = (field, overrides = {}) => createColumn(relation_model, locale, `element_id.${ field }`, {
100
+ header_field : overrides.header_field || field,
101
+ header_element_type : overrides.header_element_type || 'test_run_result',
102
+ is_editable : false,
103
+ ...overrides,
104
+ });
105
+
106
+ columns.push(trColumn('test_run_result_id', { width: '60', default_sort: 'desc' }));
107
+ columns.push(createColumn(relation_model, locale, 'element_id.test_case_id.test_case_title', {
108
+ header_field : 'test_case_title',
109
+ header_element_type : 'test_case',
110
+ width : '480',
111
+ is_required : true,
112
+ is_title : true,
113
+ is_editable : false,
114
+ }));
115
+ columns.push(trColumn('assigned_to', { width: '220', is_required: true }));
116
+ columns.push(trColumn('created_at', { width: '170', is_required: true }));
117
+ columns.push(trColumn('updated_at', { width: '170', is_required: true }));
118
+ columns.push(trColumn('completed_at', { width: '170', is_required: true }));
119
+ columns.push(trColumn('test_result_status', { width: '150', is_required: true }));
120
+ columns.push(createGoToColumn(result_model, locale, { field: 'element_id' }));
121
+
122
+ return columns;
123
+ }
124
+
125
+
126
+ /**
127
+ * Секции `bug_relation`: `test_cases`, `bugs`, `test_run_results`.
87
128
  *
88
129
  * @param {Object<string, Object<string, { config: import('../../../types/family_service/typeTableConfiguration.js').typeTableConfiguration }>>} config
89
130
  * @returns {void}
@@ -96,6 +137,10 @@ export function bootstrap_bug_relation(config)
96
137
  for: createListingFor([ 'bug_id', 'relation_type' ], { add: [ 'elements' ] }),
97
138
  });
98
139
 
140
+ registerSection(config, 'bug_relation', 'test_run_results', build_bug_relation_test_run_results_columns(locale), {
141
+ for: createListingFor([ 'bug_id', 'relation_type' ], { add: [ 'elements' ] }),
142
+ });
143
+
99
144
  registerSection(config, 'bug_relation', 'bugs', build_bug_relation_bugs_columns(locale), {
100
145
  for: createListingFor([ 'relation_type', 'element_id' ], { add: [ 'bugs' ] }),
101
146
  });