complexqa_frontend_core 1.19.4 → 1.19.6

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.6",
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
  });
@@ -32,6 +32,47 @@ function build_test_run_result_listing_columns(locale, { include_select = true }
32
32
  }
33
33
 
34
34
 
35
+ /**
36
+ * Колонки выбора результатов прогона (диалог связывания на bug/details).
37
+ * Без чекбокса, goto и completed_at; title шире listing на 50px.
38
+ *
39
+ * @param {string} locale
40
+ * @returns {import('../../../types/family_service/typeTableColumn.js').typeTableColumn[]}
41
+ */
42
+ function build_test_run_result_picker_columns(locale)
43
+ {
44
+ const model = new typeTestRunResult();
45
+
46
+ return [
47
+ createColumn(model, locale, 'test_case_id.test_case_title', {
48
+ header_field : 'test_case_title',
49
+ header_element_type : 'test_case',
50
+ width : '530',
51
+ is_editable : false,
52
+ is_required : true,
53
+ is_sortable : false,
54
+ is_filter : false,
55
+ }),
56
+ createColumn(model, locale, 'assigned_to', {
57
+ width : '220',
58
+ is_editable : false,
59
+ is_required : true,
60
+ is_sortable : false,
61
+ is_filter : false,
62
+ }),
63
+ createColumn(model, locale, 'created_at', { width: '170', is_required: true, is_sortable: false, is_filter: false }),
64
+ createColumn(model, locale, 'updated_at', { width: '170', is_required: true, is_sortable: false, is_filter: false }),
65
+ createColumn(model, locale, 'test_result_status', {
66
+ width : '150',
67
+ is_editable : false,
68
+ is_required : true,
69
+ is_sortable : false,
70
+ is_filter : false,
71
+ }),
72
+ ];
73
+ }
74
+
75
+
35
76
  function build_test_run_result_todo_columns(locale)
36
77
  {
37
78
  const model = new typeTestRunResult();
@@ -76,7 +117,7 @@ function build_test_run_result_details_columns(locale)
76
117
 
77
118
 
78
119
  /**
79
- * Секции `test_run_result`: `listing`, `todo`, `details`, `bugs`.
120
+ * Секции `test_run_result`: `listing`, `todo`, `details`, `bugs`, `picker`.
80
121
  *
81
122
  * @param {Object<string, Object<string, { config: import('../../../types/family_service/typeTableConfiguration.js').typeTableConfiguration }>>} config
82
123
  * @returns {void}
@@ -89,6 +130,10 @@ export function bootstrap_test_run_result(config)
89
130
  for: createListingFor([ 'project_id', 'test_case_id', 'test_run_id' ]),
90
131
  });
91
132
 
133
+ registerSection(config, 'test_run_result', 'picker', build_test_run_result_picker_columns(locale), {
134
+ for: createListingFor([ 'project_id' ]),
135
+ });
136
+
92
137
  registerSection(config, 'test_run_result', 'todo', build_test_run_result_todo_columns(locale), {
93
138
  contained_element_type: 'project',
94
139
  });