complexqa_frontend_core 1.15.1 → 1.16.1

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.
Files changed (50) hide show
  1. package/package.json +1 -1
  2. package/publish/api/api_abstract_class.js +326 -0
  3. package/publish/api/api_abstract_element_class.js +5 -298
  4. package/publish/api/api_abstract_reference_class.js +56 -0
  5. package/publish/api/context/context_browser_api.js +17 -0
  6. package/publish/api/context/context_deployment_target_api.js +17 -0
  7. package/publish/api/context/context_devices_api.js +17 -0
  8. package/publish/api/context/context_execution_general_api.js +17 -0
  9. package/publish/api/context/context_locale_api.js +17 -0
  10. package/publish/api/context/context_os_api.js +17 -0
  11. package/publish/api/context/context_screen_resolution_api.js +17 -0
  12. package/publish/api/index.js +43 -15
  13. package/publish/index.js +9 -0
  14. package/publish/types/core/0_familyGeneralElement.js +632 -0
  15. package/publish/types/core/1_familyContext.js +144 -0
  16. package/publish/types/core/1_familyTestAutomation.js +20 -0
  17. package/publish/types/core/1_familyTestDocumentation.js +21 -0
  18. package/publish/types/family_context/0_familyContext.js +144 -0
  19. package/publish/types/family_context/typeBrowserContext.js +59 -0
  20. package/publish/types/family_context/typeDeploymentTargetContext.js +98 -0
  21. package/publish/types/family_context/typeDeviceContext.js +86 -0
  22. package/publish/types/family_context/typeExecutionContext.js +148 -0
  23. package/publish/types/family_context/typeLocaleContext.js +75 -0
  24. package/publish/types/family_context/typeOsContext.js +86 -0
  25. package/publish/types/family_context/typeScreenResolutionContext.js +99 -0
  26. package/publish/types/family_elements/typeAutomationTestEnvironment.js +1 -1
  27. package/publish/types/family_elements/typeAutomationTestPlan.js +1 -1
  28. package/publish/types/family_elements/typeAutomationTestStep.js +1 -1
  29. package/publish/types/family_elements/typeAutomationTestStepTarget.js +1 -1
  30. package/publish/types/family_elements/typeBug.js +4 -4
  31. package/publish/types/family_elements/typeFunctional.js +2 -2
  32. package/publish/types/family_elements/typeFunctionalGroup.js +2 -2
  33. package/publish/types/family_elements/typeMilestone.js +1 -1
  34. package/publish/types/family_elements/typePrice.js +1 -1
  35. package/publish/types/family_elements/typeProject.js +1 -1
  36. package/publish/types/family_elements/typeProjectDocument.js +1 -1
  37. package/publish/types/family_elements/typeProjectTestData.js +1 -1
  38. package/publish/types/family_elements/typeProjectUserRole.js +1 -1
  39. package/publish/types/family_elements/typeTask.js +1 -1
  40. package/publish/types/family_elements/typeTeam.js +1 -1
  41. package/publish/types/family_elements/typeTeamMember.js +1 -1
  42. package/publish/types/family_elements/typeTeamUserRole.js +1 -1
  43. package/publish/types/family_elements/typeTestAccount.js +1 -1
  44. package/publish/types/family_elements/typeTestCase.js +1 -1
  45. package/publish/types/family_elements/typeTestCaseStep.js +1 -1
  46. package/publish/types/family_elements/typeTestPlan.js +2 -2
  47. package/publish/types/family_elements/typeTestRun.js +1 -1
  48. package/publish/types/family_elements/typeTestRunResult.js +1 -1
  49. package/publish/types/family_elements/typeTestSuite.js +1 -1
  50. package/publish/types/family_elements/typeUser.js +1 -1
@@ -0,0 +1,144 @@
1
+ import { familyGeneralElement } from "./0_familyGeneralElement.js";
2
+
3
+
4
+ /**
5
+ * Семейство справочников осей окружения (context catalogs).
6
+ *
7
+ * Строки справочника: system (seed сервиса) и project (свои записи команды).
8
+ * Стабильный код автоматизации: context_key. Отображение: context_name.
9
+ *
10
+ * @see typeExecutionContext — снимок FK на момент бага / прогона / автотеста
11
+ *
12
+ * @version v.0.1 (03/06/2026)
13
+ */
14
+ export class familyContext extends familyGeneralElement
15
+ {
16
+ context_key;
17
+ context_name;
18
+ context_scope;
19
+ project_id;
20
+ parent_context_id;
21
+ sort_order;
22
+ is_active;
23
+ meta;
24
+ created_at;
25
+ updated_at;
26
+
27
+ /**
28
+ * Ось справочника (browser, os, …) — переопределяется в наследниках.
29
+ *
30
+ * @type {string|false}
31
+ */
32
+ context_axis = false;
33
+
34
+ available_enum_values = familyContext.get_base_available_enum_values();
35
+
36
+ enum_value_translate_matrix = familyContext.get_base_enum_value_translate_matrix();
37
+
38
+ attribute_name_translate_matrix = familyContext.get_catalog_attribute_name_translate_matrix();
39
+
40
+
41
+ /**
42
+ * @returns {object}
43
+ */
44
+ static get_base_available_enum_values()
45
+ {
46
+ return {
47
+ context_scope: [ 'SYSTEM', 'PROJECT' ],
48
+ };
49
+ }
50
+
51
+
52
+ /**
53
+ * @returns {object}
54
+ */
55
+ static get_base_enum_value_translate_matrix()
56
+ {
57
+ return {
58
+ context_scope: {
59
+ en: {
60
+ SYSTEM : 'System',
61
+ PROJECT: 'Project',
62
+ },
63
+ ru: {
64
+ SYSTEM : 'Системный',
65
+ PROJECT: 'Проекта',
66
+ },
67
+ },
68
+ };
69
+ }
70
+
71
+
72
+ /**
73
+ * @returns {string|false}
74
+ */
75
+ get_context_axis()
76
+ {
77
+ return this.context_axis || false;
78
+ }
79
+
80
+
81
+ /**
82
+ * Общие поля записи справочника (добавляются в structure_scheme наследников).
83
+ *
84
+ * @returns {object}
85
+ */
86
+ static get_catalog_base_structure_scheme()
87
+ {
88
+ return {
89
+ context_key : 'string | max:128 | require',
90
+ context_name : 'string | max:255 | require',
91
+ context_scope : 'string | enum | require',
92
+ project_id : 'integer | optional',
93
+ parent_context_id : 'integer | optional',
94
+ sort_order : 'integer | optional',
95
+ is_active : 'boolean | optional',
96
+ meta : 'object | optional',
97
+ created_at : 'timestamp | require',
98
+ updated_at : 'timestamp | optional',
99
+ };
100
+ }
101
+
102
+
103
+ /**
104
+ * @returns {{ en: object, ru: object }}
105
+ */
106
+ static get_catalog_attribute_name_translate_matrix()
107
+ {
108
+ return {
109
+ en: {
110
+ context_key : 'Key',
111
+ context_name : 'Name',
112
+ context_scope : 'Scope',
113
+ project_id : 'Project',
114
+ parent_context_id : 'Parent',
115
+ sort_order : 'Sort order',
116
+ is_active : 'Active',
117
+ meta : 'Meta',
118
+ created_at : 'Created at',
119
+ updated_at : 'Updated at',
120
+ },
121
+ ru: {
122
+ context_key : 'Ключ',
123
+ context_name : 'Название',
124
+ context_scope : 'Область',
125
+ project_id : 'Проект',
126
+ parent_context_id : 'Родитель',
127
+ sort_order : 'Порядок',
128
+ is_active : 'Активен',
129
+ meta : 'Мета',
130
+ created_at : 'Создано',
131
+ updated_at : 'Обновлено',
132
+ },
133
+ };
134
+ }
135
+
136
+
137
+ /**
138
+ * @param {any} data
139
+ */
140
+ constructor(data = false)
141
+ {
142
+ super();
143
+ }
144
+ }
@@ -0,0 +1,20 @@
1
+ import { familyGeneralElement } from "./0_familyGeneralElement.js";
2
+
3
+
4
+ /**
5
+ * Семейство типов, относящееся к модулю автоматического тестирования
6
+ *
7
+ * @version v.0.1 (29/11/2025)
8
+ */
9
+ export class familyTestAutomation extends familyGeneralElement
10
+ {
11
+
12
+ /**
13
+ *
14
+ * @param {any} data
15
+ */
16
+ constructor(data = false)
17
+ {
18
+ super();
19
+ }
20
+ }
@@ -0,0 +1,21 @@
1
+ import { familyGeneralElement } from "./0_familyGeneralElement.js";
2
+
3
+
4
+ /**
5
+ * Семейство типов, относящееся к модулю тестовой документации
6
+ *
7
+ * @version v.0.1 (29/11/2025)
8
+ */
9
+ export class familyTestDocumentation extends familyGeneralElement
10
+ {
11
+
12
+ /**
13
+ *
14
+ * @param {any} data
15
+ */
16
+ constructor(data = false)
17
+ {
18
+ super();
19
+ }
20
+
21
+ }
@@ -0,0 +1,144 @@
1
+ import { familyGeneralElement } from "../family_elements/0_familyGeneralElement.js";
2
+
3
+
4
+ /**
5
+ * Семейство справочников осей окружения (context catalogs).
6
+ *
7
+ * Строки справочника: system (seed сервиса) и project (свои записи команды).
8
+ * Стабильный код автоматизации: context_key. Отображение: context_name.
9
+ *
10
+ * @see typeExecutionContext — снимок FK на момент бага / прогона / автотеста
11
+ *
12
+ * @version v.0.1 (03/06/2026)
13
+ */
14
+ export class familyContext extends familyGeneralElement
15
+ {
16
+ context_key;
17
+ context_name;
18
+ context_scope;
19
+ project_id;
20
+ parent_context_id;
21
+ sort_order;
22
+ is_active;
23
+ meta;
24
+ created_at;
25
+ updated_at;
26
+
27
+ /**
28
+ * Ось справочника (browser, os, …) — переопределяется в наследниках.
29
+ *
30
+ * @type {string|false}
31
+ */
32
+ context_axis = false;
33
+
34
+ available_enum_values = familyContext.get_base_available_enum_values();
35
+
36
+ enum_value_translate_matrix = familyContext.get_base_enum_value_translate_matrix();
37
+
38
+ attribute_name_translate_matrix = familyContext.get_catalog_attribute_name_translate_matrix();
39
+
40
+
41
+ /**
42
+ * @returns {object}
43
+ */
44
+ static get_base_available_enum_values()
45
+ {
46
+ return {
47
+ context_scope: [ 'SYSTEM', 'PROJECT' ],
48
+ };
49
+ }
50
+
51
+
52
+ /**
53
+ * @returns {object}
54
+ */
55
+ static get_base_enum_value_translate_matrix()
56
+ {
57
+ return {
58
+ context_scope: {
59
+ en: {
60
+ SYSTEM : 'System',
61
+ PROJECT: 'Project',
62
+ },
63
+ ru: {
64
+ SYSTEM : 'Системный',
65
+ PROJECT: 'Проекта',
66
+ },
67
+ },
68
+ };
69
+ }
70
+
71
+
72
+ /**
73
+ * @returns {string|false}
74
+ */
75
+ get_context_axis()
76
+ {
77
+ return this.context_axis || false;
78
+ }
79
+
80
+
81
+ /**
82
+ * Общие поля записи справочника (добавляются в structure_scheme наследников).
83
+ *
84
+ * @returns {object}
85
+ */
86
+ static get_catalog_base_structure_scheme()
87
+ {
88
+ return {
89
+ context_key : 'string | max:128 | require',
90
+ context_name : 'string | max:255 | require',
91
+ context_scope : 'string | enum | require',
92
+ project_id : 'integer | optional',
93
+ parent_context_id : 'integer | optional',
94
+ sort_order : 'integer | optional',
95
+ is_active : 'boolean | optional',
96
+ meta : 'object | optional',
97
+ created_at : 'timestamp | require',
98
+ updated_at : 'timestamp | optional',
99
+ };
100
+ }
101
+
102
+
103
+ /**
104
+ * @returns {{ en: object, ru: object }}
105
+ */
106
+ static get_catalog_attribute_name_translate_matrix()
107
+ {
108
+ return {
109
+ en: {
110
+ context_key : 'Key',
111
+ context_name : 'Name',
112
+ context_scope : 'Scope',
113
+ project_id : 'Project',
114
+ parent_context_id : 'Parent',
115
+ sort_order : 'Sort order',
116
+ is_active : 'Active',
117
+ meta : 'Meta',
118
+ created_at : 'Created at',
119
+ updated_at : 'Updated at',
120
+ },
121
+ ru: {
122
+ context_key : 'Ключ',
123
+ context_name : 'Название',
124
+ context_scope : 'Область',
125
+ project_id : 'Проект',
126
+ parent_context_id : 'Родитель',
127
+ sort_order : 'Порядок',
128
+ is_active : 'Активен',
129
+ meta : 'Мета',
130
+ created_at : 'Создано',
131
+ updated_at : 'Обновлено',
132
+ },
133
+ };
134
+ }
135
+
136
+
137
+ /**
138
+ * @param {any} data
139
+ */
140
+ constructor(data = false)
141
+ {
142
+ super();
143
+ }
144
+ }
@@ -0,0 +1,59 @@
1
+ import { familyContext } from "../core/0_familyContext.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+
4
+
5
+ /**
6
+ * Справочник браузеров (Chromium-family, Firefox, WebKit, …).
7
+ *
8
+ * Ориентиры: Playwright browserName, Selenium capabilities, TestRail/Jira custom «Browser».
9
+ * meta: engine, playwright_browser, min_version (под seed и runner).
10
+ *
11
+ * @version v.0.1 (03/06/2026)
12
+ */
13
+ export class typeBrowserContext extends familyContext
14
+ {
15
+ browser_context_id;
16
+ browser_vendor;
17
+
18
+ context_axis = 'browser';
19
+
20
+ primary_key = 'browser_context_id';
21
+ api_key = 'browser_context';
22
+
23
+ structure_scheme = {
24
+ browser_context_id: 'integer | require',
25
+ browser_vendor : 'string | max:64 | optional',
26
+ ...familyContext.get_catalog_base_structure_scheme(),
27
+ };
28
+
29
+ attribute_name_translate_matrix = (() =>
30
+ {
31
+ let base = familyContext.get_catalog_attribute_name_translate_matrix();
32
+ return {
33
+ en: { ...base.en, browser_context_id: 'ID', browser_vendor: 'Vendor' },
34
+ ru: { ...base.ru, browser_context_id: 'ID', browser_vendor: 'Вендор' },
35
+ };
36
+ })();
37
+
38
+
39
+ /**
40
+ * @param {object|false|undefined} data
41
+ */
42
+ constructor(data = false)
43
+ {
44
+ super();
45
+
46
+ if (data && is_object(data))
47
+ {
48
+ _.mapObject(data, (value, key) =>
49
+ {
50
+ if (this.hasOwnProperty(key))
51
+ {
52
+ this [ key ] = value;
53
+ }
54
+ });
55
+ }
56
+
57
+ return this;
58
+ }
59
+ }
@@ -0,0 +1,98 @@
1
+ import { familyContext } from "../core/0_familyContext.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+
4
+
5
+ /**
6
+ * Справочник цели развёртывания / среды (Jira Environment, staging vs prod).
7
+ *
8
+ * Не путать с URL: host/base_url задаётся в typeExecutionContext.
9
+ * deployment_tier — укрупнённый tier для отчётов и политик.
10
+ *
11
+ * @version v.0.1 (03/06/2026)
12
+ */
13
+ export class typeDeploymentTargetContext extends familyContext
14
+ {
15
+ deployment_target_context_id;
16
+ deployment_tier;
17
+
18
+ context_axis = 'deployment_target';
19
+
20
+ primary_key = 'deployment_target_context_id';
21
+ api_key = 'deployment_target_context';
22
+
23
+ structure_scheme = {
24
+ deployment_target_context_id: 'integer | require',
25
+ deployment_tier : 'string | enum | optional',
26
+ ...familyContext.get_catalog_base_structure_scheme(),
27
+ };
28
+
29
+ available_enum_values = {
30
+ ...familyContext.get_base_available_enum_values(),
31
+ deployment_tier: [ 'LOCAL', 'DEVELOPMENT', 'QA', 'STAGING', 'UAT', 'PRODUCTION', 'DR', 'OTHER' ],
32
+ };
33
+
34
+ enum_value_translate_matrix = {
35
+ ...familyContext.get_base_enum_value_translate_matrix(),
36
+ deployment_tier: {
37
+ en: {
38
+ LOCAL : 'Local',
39
+ DEVELOPMENT: 'Development',
40
+ QA : 'QA',
41
+ STAGING : 'Staging',
42
+ UAT : 'UAT',
43
+ PRODUCTION : 'Production',
44
+ DR : 'Disaster recovery',
45
+ OTHER : 'Other',
46
+ },
47
+ ru: {
48
+ LOCAL : 'Локальная',
49
+ DEVELOPMENT: 'Разработка',
50
+ QA : 'QA',
51
+ STAGING : 'Staging',
52
+ UAT : 'UAT',
53
+ PRODUCTION : 'Продакшен',
54
+ DR : 'DR',
55
+ OTHER : 'Другое',
56
+ },
57
+ },
58
+ };
59
+
60
+ attribute_name_translate_matrix = (() =>
61
+ {
62
+ let base = familyContext.get_catalog_attribute_name_translate_matrix();
63
+ return {
64
+ en: {
65
+ ...base.en,
66
+ deployment_target_context_id: 'ID',
67
+ deployment_tier : 'Tier',
68
+ },
69
+ ru: {
70
+ ...base.ru,
71
+ deployment_target_context_id: 'ID',
72
+ deployment_tier : 'Уровень',
73
+ },
74
+ };
75
+ })();
76
+
77
+
78
+ /**
79
+ * @param {object|false|undefined} data
80
+ */
81
+ constructor(data = false)
82
+ {
83
+ super();
84
+
85
+ if (data && is_object(data))
86
+ {
87
+ _.mapObject(data, (value, key) =>
88
+ {
89
+ if (this.hasOwnProperty(key))
90
+ {
91
+ this [ key ] = value;
92
+ }
93
+ });
94
+ }
95
+
96
+ return this;
97
+ }
98
+ }
@@ -0,0 +1,86 @@
1
+ import { familyContext } from "../core/0_familyContext.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+
4
+
5
+ /**
6
+ * Справочник класса устройства / form-factor.
7
+ *
8
+ * Ориентиры: W3C media features, TestRail device, mobile vs desktop testing.
9
+ * Отдельно от OS и viewport: «phone» vs «1920×1080».
10
+ *
11
+ * @version v.0.1 (03/06/2026)
12
+ */
13
+ export class typeDeviceContext extends familyContext
14
+ {
15
+ device_context_id;
16
+ device_class;
17
+
18
+ context_axis = 'device';
19
+
20
+ primary_key = 'device_context_id';
21
+ api_key = 'device_context';
22
+
23
+ structure_scheme = {
24
+ device_context_id: 'integer | require',
25
+ device_class : 'string | enum | require',
26
+ ...familyContext.get_catalog_base_structure_scheme(),
27
+ };
28
+
29
+ available_enum_values = {
30
+ ...familyContext.get_base_available_enum_values(),
31
+ device_class: [ 'DESKTOP', 'MOBILE', 'TABLET', 'TV', 'WATCH', 'OTHER' ],
32
+ };
33
+
34
+ enum_value_translate_matrix = {
35
+ ...familyContext.get_base_enum_value_translate_matrix(),
36
+ device_class: {
37
+ en: {
38
+ DESKTOP: 'Desktop',
39
+ MOBILE : 'Mobile',
40
+ TABLET : 'Tablet',
41
+ TV : 'TV',
42
+ WATCH : 'Watch',
43
+ OTHER : 'Other',
44
+ },
45
+ ru: {
46
+ DESKTOP: 'Настольный',
47
+ MOBILE : 'Мобильный',
48
+ TABLET : 'Планшет',
49
+ TV : 'ТВ',
50
+ WATCH : 'Часы',
51
+ OTHER : 'Другое',
52
+ },
53
+ },
54
+ };
55
+
56
+ attribute_name_translate_matrix = (() =>
57
+ {
58
+ let base = familyContext.get_catalog_attribute_name_translate_matrix();
59
+ return {
60
+ en: { ...base.en, device_context_id: 'ID', device_class: 'Device class' },
61
+ ru: { ...base.ru, device_context_id: 'ID', device_class: 'Класс устройства' },
62
+ };
63
+ })();
64
+
65
+
66
+ /**
67
+ * @param {object|false|undefined} data
68
+ */
69
+ constructor(data = false)
70
+ {
71
+ super();
72
+
73
+ if (data && is_object(data))
74
+ {
75
+ _.mapObject(data, (value, key) =>
76
+ {
77
+ if (this.hasOwnProperty(key))
78
+ {
79
+ this [ key ] = value;
80
+ }
81
+ });
82
+ }
83
+
84
+ return this;
85
+ }
86
+ }