complexqa_frontend_core 1.4.1 → 1.5.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
@@ -1,16 +1,17 @@
1
1
  {
2
2
  "name": "complexqa_frontend_core",
3
- "version": "1.4.1",
3
+ "version": "1.5.2",
4
4
  "description": "core of web ",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./publish/index.js"
8
8
  },
9
9
  "files": [
10
- "publish/"
10
+ "./publish"
11
11
  ],
12
12
  "scripts": {
13
- "test": "echo \"Error: no test specified\" && exit 1"
13
+ "test": "echo \"Error: no test specified\" && exit 1",
14
+ "build_package": "rollup -c rollup.config.js"
14
15
  },
15
16
  "repository": {
16
17
  "type": "git",
@@ -28,7 +29,7 @@
28
29
  "@babel/plugin-transform-modules-commonjs": "^7.24.7",
29
30
  "@babel/plugin-transform-runtime": "^7.27.4",
30
31
  "@babel/preset-env": "^7.24.7",
31
- "axios": "^1.7.2",
32
+ "axios": "^1.13.0",
32
33
  "gulp": "^5.0.0",
33
34
  "gulp-babel": "^8.0.0",
34
35
  "gulp-concat": "^2.6.1",
@@ -38,8 +39,8 @@
38
39
  "gulp-rollup": "^2.17.0",
39
40
  "gulp-strip-import-export": "^1.0.0",
40
41
  "gulp-uncomment": "^0.3.0",
41
- "i18next": "^23.11.5",
42
- "query-string": "^9.0.0",
42
+ "i18next": "^23.16.8",
43
+ "query-string": "^9.3.1",
43
44
  "uglify-js": "^3.19.3",
44
45
  "underscore": "^1.13.6"
45
46
  },
@@ -47,6 +48,7 @@
47
48
  "babel": "^6.23.0",
48
49
  "babel-plugin-module-resolver-standalone": "^0.0.2",
49
50
  "gulp-uglify": "^3.0.2",
50
- "requirejs-babel": "^0.0.9"
51
+ "requirejs-babel": "^0.0.9",
52
+ "rollup-plugin-dts": "^6.2.3"
51
53
  }
52
54
  }
package/publish/index.js CHANGED
@@ -7,7 +7,7 @@ export { typeProject } from './types/family_elements/typeProject.js';
7
7
  export { typeTestCase } from './types/family_elements/typeTestCase.js';
8
8
  export { typeTestCaseStep } from './types/family_elements/typeTestCaseStep.js';
9
9
  export { UserService } from './services/UserService.js'
10
- export { Api } from "./api";
10
+ export { Api } from "./api/index.js";
11
11
 
12
12
 
13
13
  /**
@@ -1,6 +1,6 @@
1
1
  import { abstractService } from "./abstractService";
2
2
  import i18next from 'i18next';
3
- import { Api } from "../api";
3
+ import { Api } from "../api/index.js";
4
4
  import { echo, in_array } from "../utils/utils.js";
5
5
 
6
6
  /**
@@ -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,73 @@
1
+ import { familyTestAutomation } from "./1_familyTestAutomation.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+
4
+ /**
5
+ *
6
+ * @version v.0.1 (29/11/2025)
7
+ */
8
+ export class typeAutomationTestEnvironment extends familyTestAutomation
9
+ {
10
+ automation_test_environment_id;
11
+ automation_test_environment_name;
12
+ host;
13
+ protocol;
14
+ device_type;
15
+ browser_name;
16
+ browser_version;
17
+ display_preset;
18
+
19
+ primary_key = 'automation_test_environment_id';
20
+
21
+ structure_scheme = {
22
+ automation_test_environment_id : 'integer | require',
23
+ host : 'string | require',
24
+ automation_test_environment_name: 'string | optional',
25
+ protocol : 'string | require',
26
+ device_type : 'string | enum | require',
27
+ browser_name : 'string | enum | optional',
28
+ browser_version : 'string | optional',
29
+ display_preset : 'string | enum | optional',
30
+ };
31
+
32
+
33
+ available_enum_values = {
34
+ device_type : [
35
+ 'desktop',
36
+ 'mobile',
37
+ ],
38
+ browser_name : [
39
+ 'chrome',
40
+ 'firefox',
41
+ 'webkit',
42
+ 'edge',
43
+ ],
44
+ display_preset: [
45
+ 'small',
46
+ 'medium',
47
+ 'large',
48
+ ],
49
+ };
50
+
51
+
52
+ /**
53
+ *
54
+ * @param {object|false|undefined} data
55
+ */
56
+ constructor(data = false)
57
+ {
58
+ super();
59
+
60
+ if (data && is_object(data))
61
+ {
62
+ _.mapObject(data, (value, key) =>
63
+ {
64
+ if (this.hasOwnProperty(key))
65
+ {
66
+ this [ key ] = value;
67
+ }
68
+ });
69
+ }
70
+
71
+ return this;
72
+ }
73
+ }
@@ -0,0 +1,40 @@
1
+ import { familyTestAutomation } from "./1_familyTestAutomation.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+
4
+ /**
5
+ * Пока - просто коллекция typeAutomationTestStep
6
+ * Возможно, также окружение
7
+ * TestStep является упорядоченной коллекцией
8
+ *
9
+ * @todo подумать где лучше sort_order хранить
10
+ *
11
+ * @version v.0.1 (29/11/2025)
12
+ */
13
+ export class typeAutomationTestPlan extends familyTestAutomation
14
+ {
15
+ test_step_ids;
16
+
17
+
18
+
19
+ /**
20
+ *
21
+ * @param {object|false|undefined} data
22
+ */
23
+ constructor(data = false)
24
+ {
25
+ super();
26
+
27
+ if (data && is_object(data))
28
+ {
29
+ _.mapObject(data, (value, key) =>
30
+ {
31
+ if (this.hasOwnProperty(key))
32
+ {
33
+ this [ key ] = value;
34
+ }
35
+ });
36
+ }
37
+
38
+ return this;
39
+ }
40
+ }
@@ -0,0 +1,62 @@
1
+ import { familyTestAutomation } from "./1_familyTestAutomation.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+
4
+ /**
5
+ *
6
+ * @version v.0.1 (29/11/2025)
7
+ */
8
+ export class typeAutomationTestStep extends familyTestAutomation
9
+ {
10
+ automation_test_step_id;
11
+ target; // typeAutomationTestStepTarget
12
+ action;
13
+ time;
14
+ screenshot;
15
+ url;
16
+
17
+ primary_key = 'automation_test_step_id';
18
+
19
+ structure_scheme = {
20
+ automation_test_step_id: 'integer | require',
21
+ target : 'typeAutomationTestStepTarget | optional',
22
+ action : 'string | enum | require',
23
+ time : 'integer | optional',
24
+ screenshot : 'string | optional',
25
+ url : 'string | optional',
26
+ };
27
+
28
+ available_enum_values = {
29
+ action: [
30
+ 'wait_element_located',
31
+ 'wait',
32
+ 'click',
33
+ 'right_click',
34
+ 'keypress',
35
+ 'keypress_special',
36
+ 'clear',
37
+ 'load_page',
38
+ ]
39
+ };
40
+
41
+ /**
42
+ *
43
+ * @param {object|false|undefined} data
44
+ */
45
+ constructor(data = false)
46
+ {
47
+ super();
48
+
49
+ if (data && is_object(data))
50
+ {
51
+ _.mapObject(data, (value, key) =>
52
+ {
53
+ if (this.hasOwnProperty(key))
54
+ {
55
+ this [ key ] = value;
56
+ }
57
+ });
58
+ }
59
+
60
+ return this;
61
+ }
62
+ }
@@ -0,0 +1,46 @@
1
+ import { familyTestAutomation } from "./1_familyTestAutomation.js";
2
+ import { is_object } from "../../utils/utils.js";
3
+
4
+ /**
5
+ * По сути это enum
6
+ * Но тут есть (будут) проверки на корректность, потому это отдельный тип
7
+ *
8
+ * @version v.0.1 (29/11/2025)
9
+ */
10
+ export class typeAutomationTestStepTarget extends familyTestAutomation
11
+ {
12
+ partial_link_text;
13
+ css;
14
+ id;
15
+ name;
16
+
17
+ structure_scheme = {
18
+ partial_link_text: 'string | optional',
19
+ css : 'string | optional',
20
+ id : 'string | optional',
21
+ name : 'string | optional',
22
+ };
23
+
24
+
25
+ /**
26
+ *
27
+ * @param {object|false|undefined} data
28
+ */
29
+ constructor(data = false)
30
+ {
31
+ super();
32
+
33
+ if (data && is_object(data))
34
+ {
35
+ _.mapObject(data, (value, key) =>
36
+ {
37
+ if (this.hasOwnProperty(key))
38
+ {
39
+ this [ key ] = value;
40
+ }
41
+ });
42
+ }
43
+
44
+ return this;
45
+ }
46
+ }
@@ -1,12 +1,13 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
 
5
6
  /**
6
7
  *
7
8
  * @version v.0.1 (23/06/2024)
8
9
  */
9
- export class typeFunctional extends familyGeneralElement
10
+ export class typeFunctional extends familyTestDocumentation
10
11
  {
11
12
  functional_id;
12
13
  project_id; // foreign key
@@ -1,11 +1,12 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
 
5
6
  /**
6
7
  * @version v.0.2 (25/01/2025)
7
8
  */
8
- export class typeFunctionalGroup extends familyGeneralElement
9
+ export class typeFunctionalGroup extends familyTestDocumentation
9
10
  {
10
11
  functional_group_id;
11
12
  project_id; // foreign key
@@ -1,12 +1,13 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { echo, is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
 
5
6
  /**
6
7
  *
7
8
  * @version v.0.2 (10/12/2024)
8
9
  */
9
- export class typeTestCase extends familyGeneralElement
10
+ export class typeTestCase extends familyTestDocumentation
10
11
  {
11
12
  test_case_id;
12
13
  test_suite_id; // foreign key
@@ -1,12 +1,13 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
 
5
6
  /**
6
7
  *
7
8
  * @version v.1.1 (26/05/2024)
8
9
  */
9
- export class typeTestCaseStep extends familyGeneralElement
10
+ export class typeTestCaseStep extends familyTestDocumentation
10
11
  {
11
12
  test_case_step_id;
12
13
  test_case_step_type;
@@ -1,5 +1,6 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
 
5
6
  /**
@@ -7,7 +8,7 @@ import { is_object } from "../../utils/utils";
7
8
  *
8
9
  * @version v.0.1 (26/05/2024)
9
10
  */
10
- export class typeTestPlan extends familyGeneralElement
11
+ export class typeTestPlan extends familyTestDocumentation
11
12
  {
12
13
 
13
14
 
@@ -1,5 +1,6 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
  /**
5
6
  * Коллекция тестов для работы, она же parent для typeTestRunResult
@@ -8,13 +9,13 @@ import { is_object } from "../../utils/utils";
8
9
  *
9
10
  * @version v.0.2 (21/01/2025)
10
11
  */
11
- export class typeTestRun extends familyGeneralElement
12
+ export class typeTestRun extends familyTestDocumentation
12
13
  {
13
14
  test_run_id;
14
15
  test_run_name;
15
16
  test_run_description;
16
17
  milestone_id; /// ??
17
- assigned_to;
18
+ assigned_to; // кому назначили выполнение, пока в той же таблице, только 1 член команды
18
19
  test_case_ids; // массив тестов на запуск
19
20
  test_run_status;
20
21
  test_case_summary_statistic; // массив [key->value] по статусам вложенных тест-кейсов для визуализации
@@ -1,5 +1,6 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
  /**
5
6
  * 1 результат по каждому тест кейсу
@@ -8,7 +9,7 @@ import { is_object } from "../../utils/utils";
8
9
  *
9
10
  * @version v.0.4 (10/12/2024)
10
11
  */
11
- export class typeTestRunResult extends familyGeneralElement
12
+ export class typeTestRunResult extends familyTestDocumentation
12
13
  {
13
14
  test_run_result_id;
14
15
  test_case_id;
@@ -1,12 +1,13 @@
1
1
  import { familyGeneralElement } from "./0_familyGeneralElement";
2
2
  import { echo, is_object } from "../../utils/utils";
3
+ import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
3
4
 
4
5
  /**
5
6
  * Структурная коллекция тестов
6
7
  *
7
8
  * @version v.1.1 (23/06/2024)
8
9
  */
9
- export class typeTestSuite extends familyGeneralElement
10
+ export class typeTestSuite extends familyTestDocumentation
10
11
  {
11
12
  test_suite_id;
12
13
  project_id;