@acorex-platform/module-test-management-client 0.0.46
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/fesm2022/acorex-platform-module-test-management-client-contracts.mjs +103 -0
- package/fesm2022/acorex-platform-module-test-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-test-management-client.mjs +101 -0
- package/fesm2022/acorex-platform-module-test-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-test-management-client-contracts.d.ts +74 -0
- package/types/acorex-platform-module-test-management-client.d.ts +9 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Insights & Reporting capability for stored CTRF test runs.
|
|
3
|
+
* Group ids live in `AXPCommonPermissionGroupKeys`.
|
|
4
|
+
*/
|
|
5
|
+
const AXPTestManagementPermissionKeys = {
|
|
6
|
+
MaintainTestResults: 'InsightsReporting:Permission:MaintainTestResults',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const AXPTestManagementMenuKeys = {
|
|
10
|
+
Root: 'TestManagement:Menu',
|
|
11
|
+
TestRuns: 'TestManagement:Menu:TestRuns',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** CTRF test status values. */
|
|
15
|
+
const CTRF_TEST_STATUSES = ['passed', 'failed', 'skipped', 'pending', 'other'];
|
|
16
|
+
const STATUS_I18N = '@test-management:terms.status';
|
|
17
|
+
const STATUS_CSS_CLASS = {
|
|
18
|
+
passed: 'success-lighter-surface',
|
|
19
|
+
failed: 'danger-lighter-surface',
|
|
20
|
+
};
|
|
21
|
+
function ctrfStatusDataSource() {
|
|
22
|
+
return CTRF_TEST_STATUSES.map((value) => ({
|
|
23
|
+
value,
|
|
24
|
+
text: `${STATUS_I18N}.${value}`,
|
|
25
|
+
...(STATUS_CSS_CLASS[value] ? { cssClass: STATUS_CSS_CLASS[value] } : {}),
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const config = {
|
|
30
|
+
i18n: 'test-management',
|
|
31
|
+
module: 'TestManagement',
|
|
32
|
+
};
|
|
33
|
+
const RootConfig = {
|
|
34
|
+
config,
|
|
35
|
+
module: {
|
|
36
|
+
module: 'test-management',
|
|
37
|
+
name: config.module,
|
|
38
|
+
title: `@${config.i18n}:module.title`,
|
|
39
|
+
icon: 'fa-light fa-file-chart-column',
|
|
40
|
+
},
|
|
41
|
+
entities: {
|
|
42
|
+
testRun: {
|
|
43
|
+
name: 'TestRun',
|
|
44
|
+
source: `${config.module}.TestRun`,
|
|
45
|
+
title: `@${config.i18n}:entities.test-run.title`,
|
|
46
|
+
titlePlural: `@${config.i18n}:entities.test-run.plural`,
|
|
47
|
+
icon: 'fa-light fa-file-chart-column',
|
|
48
|
+
},
|
|
49
|
+
testResult: {
|
|
50
|
+
name: 'TestResult',
|
|
51
|
+
source: `${config.module}.TestResult`,
|
|
52
|
+
title: `@${config.i18n}:entities.test-result.title`,
|
|
53
|
+
titlePlural: `@${config.i18n}:entities.test-result.plural`,
|
|
54
|
+
icon: 'fa-light fa-list-check',
|
|
55
|
+
},
|
|
56
|
+
testArtifact: {
|
|
57
|
+
name: 'TestArtifact',
|
|
58
|
+
source: `${config.module}.TestArtifact`,
|
|
59
|
+
title: `@${config.i18n}:entities.test-artifact.title`,
|
|
60
|
+
titlePlural: `@${config.i18n}:entities.test-artifact.plural`,
|
|
61
|
+
icon: 'fa-light fa-paperclip',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
//#region ---- Imports ----
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region ---- Manifest ----
|
|
69
|
+
const TestManagementManifest = {
|
|
70
|
+
name: RootConfig.module.name,
|
|
71
|
+
version: '1.0.0',
|
|
72
|
+
title: RootConfig.module.title,
|
|
73
|
+
icon: RootConfig.module.icon,
|
|
74
|
+
i18n: RootConfig.config.i18n,
|
|
75
|
+
type: 'platform',
|
|
76
|
+
domain: 'platform',
|
|
77
|
+
required: true,
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
|
|
81
|
+
//#region ---- Import CTRF command key ----
|
|
82
|
+
const AXPTestManagementCommandKeys = {
|
|
83
|
+
ImportCtrf: 'TestManagement:ImportCtrf',
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
|
|
87
|
+
//#region ---- Test run / result file storage refs ----
|
|
88
|
+
/** Gallery / file-viewer field on TestRun and TestResult. Matches File:Save `category`. */
|
|
89
|
+
const TEST_MANAGEMENT_FILES_FIELD = 'files';
|
|
90
|
+
const TEST_MANAGEMENT_FILES_CATEGORY = TEST_MANAGEMENT_FILES_FIELD;
|
|
91
|
+
const TEST_RUN_FILE_REF_TYPE = RootConfig.entities.testRun.source;
|
|
92
|
+
const TEST_RESULT_FILE_REF_TYPE = RootConfig.entities.testResult.source;
|
|
93
|
+
//#endregion
|
|
94
|
+
|
|
95
|
+
//#region ---- Contracts barrel ----
|
|
96
|
+
//#endregion
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Generated bundle index. Do not edit.
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
export { AXPTestManagementCommandKeys, AXPTestManagementMenuKeys, AXPTestManagementPermissionKeys, CTRF_TEST_STATUSES, RootConfig, TEST_MANAGEMENT_FILES_CATEGORY, TEST_MANAGEMENT_FILES_FIELD, TEST_RESULT_FILE_REF_TYPE, TEST_RUN_FILE_REF_TYPE, TestManagementManifest, ctrfStatusDataSource };
|
|
103
|
+
//# sourceMappingURL=acorex-platform-module-test-management-client-contracts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-test-management-client-contracts.mjs","sources":["../../../../libs/modules/test-management/contracts/src/permission.keys.ts","../../../../libs/modules/test-management/contracts/src/menu.keys.ts","../../../../libs/modules/test-management/contracts/src/test-status.options.ts","../../../../libs/modules/test-management/contracts/src/root-config.ts","../../../../libs/modules/test-management/contracts/src/manifest.ts","../../../../libs/modules/test-management/contracts/src/runtime.keys.ts","../../../../libs/modules/test-management/contracts/src/test-files.constants.ts","../../../../libs/modules/test-management/contracts/src/index.ts","../../../../libs/modules/test-management/contracts/src/acorex-platform-module-test-management-client-contracts.ts"],"sourcesContent":["/**\n * Insights & Reporting capability for stored CTRF test runs.\n * Group ids live in `AXPCommonPermissionGroupKeys`.\n */\nexport const AXPTestManagementPermissionKeys = {\n MaintainTestResults: 'InsightsReporting:Permission:MaintainTestResults',\n} as const;\n","export const AXPTestManagementMenuKeys = {\n Root: 'TestManagement:Menu',\n TestRuns: 'TestManagement:Menu:TestRuns',\n} as const;\n","/** CTRF test status values. */\nexport const CTRF_TEST_STATUSES = ['passed', 'failed', 'skipped', 'pending', 'other'] as const;\n\nexport type CtrfTestStatus = (typeof CTRF_TEST_STATUSES)[number];\n\nconst STATUS_I18N = '@test-management:terms.status';\n\nconst STATUS_CSS_CLASS: Partial<Record<CtrfTestStatus, string>> = {\n passed: 'success-lighter-surface',\n failed: 'danger-lighter-surface',\n};\n\nexport function ctrfStatusDataSource(): Array<{ value: CtrfTestStatus; text: string; cssClass?: string }> {\n return CTRF_TEST_STATUSES.map((value) => ({\n value,\n text: `${STATUS_I18N}.${value}`,\n ...(STATUS_CSS_CLASS[value] ? { cssClass: STATUS_CSS_CLASS[value] } : {}),\n }));\n}\n","const config = {\n i18n: 'test-management',\n module: 'TestManagement',\n} as const;\n\nexport const RootConfig = {\n config,\n module: {\n module: 'test-management',\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-file-chart-column',\n },\n entities: {\n testRun: {\n name: 'TestRun',\n source: `${config.module}.TestRun`,\n title: `@${config.i18n}:entities.test-run.title`,\n titlePlural: `@${config.i18n}:entities.test-run.plural`,\n icon: 'fa-light fa-file-chart-column',\n },\n testResult: {\n name: 'TestResult',\n source: `${config.module}.TestResult`,\n title: `@${config.i18n}:entities.test-result.title`,\n titlePlural: `@${config.i18n}:entities.test-result.plural`,\n icon: 'fa-light fa-list-check',\n },\n testArtifact: {\n name: 'TestArtifact',\n source: `${config.module}.TestArtifact`,\n title: `@${config.i18n}:entities.test-artifact.title`,\n titlePlural: `@${config.i18n}:entities.test-artifact.plural`,\n icon: 'fa-light fa-paperclip',\n },\n },\n} as const;\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\n\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest ----\n\nexport const TestManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n required: true,\n};\n\n//#endregion\n","//#region ---- Import CTRF command key ----\n\nexport const AXPTestManagementCommandKeys = {\n ImportCtrf: 'TestManagement:ImportCtrf',\n} as const;\n\n//#endregion\n","//#region ---- Test run / result file storage refs ----\n\nimport { RootConfig } from './root-config';\n\n/** Gallery / file-viewer field on TestRun and TestResult. Matches File:Save `category`. */\nexport const TEST_MANAGEMENT_FILES_FIELD = 'files';\n\nexport const TEST_MANAGEMENT_FILES_CATEGORY = TEST_MANAGEMENT_FILES_FIELD;\n\nexport const TEST_RUN_FILE_REF_TYPE = RootConfig.entities.testRun.source;\n\nexport const TEST_RESULT_FILE_REF_TYPE = RootConfig.entities.testResult.source;\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './permission.keys';\nexport * from './menu.keys';\nexport * from './test-status.options';\nexport * from './root-config';\nexport * from './manifest';\nexport * from './runtime.keys';\nexport * from './test-files.constants';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;;AAGG;AACI,MAAM,+BAA+B,GAAG;AAC7C,IAAA,mBAAmB,EAAE,kDAAkD;;;ACLlE,MAAM,yBAAyB,GAAG;AACvC,IAAA,IAAI,EAAE,qBAAqB;AAC3B,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C,MAAM,8BAA8B,GAAG;AAEvC,MAAM,sBAAsB,GAAG,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC;AAE3D,MAAM,yBAAyB,GAAG,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC;AAExE;;ACbA;AAUA;;ACVA;;AAEG;;"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';
|
|
4
|
+
import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
|
|
5
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
6
|
+
import { AXPCommonMenuKeys, AXPCommonPermissionGroupKeys } from '@acorex-platform/module-common-client/contracts';
|
|
7
|
+
import { RootConfig, AXPTestManagementPermissionKeys, AXPTestManagementMenuKeys } from '@acorex-platform/module-test-management-client/contracts';
|
|
8
|
+
|
|
9
|
+
//#region ---- Imports ----
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ---- Menu ----
|
|
12
|
+
class AXMMenuProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.entityService = inject(AXPEntityService);
|
|
15
|
+
}
|
|
16
|
+
async provide(context) {
|
|
17
|
+
const module = RootConfig.module;
|
|
18
|
+
context.find(AXPCommonMenuKeys.Administration).addItems([
|
|
19
|
+
{
|
|
20
|
+
name: AXPTestManagementMenuKeys.TestRuns,
|
|
21
|
+
text: RootConfig.entities.testRun.titlePlural,
|
|
22
|
+
path: this.entityService.withEntity(module.name, RootConfig.entities.testRun.name).createPath(),
|
|
23
|
+
icon: RootConfig.entities.testRun.icon,
|
|
24
|
+
priority: 8400,
|
|
25
|
+
policy: {
|
|
26
|
+
features: [module.name],
|
|
27
|
+
permissions: [AXPTestManagementPermissionKeys.MaintainTestResults],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
]);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
|
|
35
|
+
//#region ---- Imports ----
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ---- Permission Definition Provider ----
|
|
38
|
+
class AXMPermissionDefinitionProvider {
|
|
39
|
+
async define(context) {
|
|
40
|
+
const keys = AXPTestManagementPermissionKeys;
|
|
41
|
+
const groups = AXPCommonPermissionGroupKeys;
|
|
42
|
+
const P = '@common:insights-reporting.permissions';
|
|
43
|
+
const G = '@common:permission-groups';
|
|
44
|
+
context.addGroup(groups.InsightsReporting.Root, `${G}.insights-reporting.title`, `${G}.insights-reporting.description`, { order: 100 });
|
|
45
|
+
context
|
|
46
|
+
.addGroup(groups.InsightsReporting.Reports, `${G}.insights-reporting-reports.title`, `${G}.insights-reporting-reports.description`, { parent: groups.InsightsReporting.Root, order: 10 })
|
|
47
|
+
.addPermission(keys.MaintainTestResults, `${P}.maintain-test-results.title`, `${P}.maintain-test-results.description`, { modules: ['TestManagement'], requiredFeatures: ['TestManagement'] })
|
|
48
|
+
.endPermission()
|
|
49
|
+
.endGroup();
|
|
50
|
+
}
|
|
51
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPermissionDefinitionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
52
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPermissionDefinitionProvider }); }
|
|
53
|
+
}
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMPermissionDefinitionProvider, decorators: [{
|
|
55
|
+
type: Injectable
|
|
56
|
+
}] });
|
|
57
|
+
|
|
58
|
+
//#region ---- Imports ----
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region ---- Module ----
|
|
61
|
+
class AXMTestManagementModule {
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTestManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
63
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXMTestManagementModule }); }
|
|
64
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTestManagementModule, providers: [
|
|
65
|
+
{
|
|
66
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
67
|
+
useClass: AXMPermissionDefinitionProvider,
|
|
68
|
+
multi: true,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
provide: AXP_MENU_PROVIDER,
|
|
72
|
+
useClass: AXMMenuProvider,
|
|
73
|
+
multi: true,
|
|
74
|
+
},
|
|
75
|
+
] }); }
|
|
76
|
+
}
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTestManagementModule, decorators: [{
|
|
78
|
+
type: NgModule,
|
|
79
|
+
args: [{
|
|
80
|
+
imports: [],
|
|
81
|
+
providers: [
|
|
82
|
+
{
|
|
83
|
+
provide: AXP_PERMISSION_DEFINITION_PROVIDER,
|
|
84
|
+
useClass: AXMPermissionDefinitionProvider,
|
|
85
|
+
multi: true,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
provide: AXP_MENU_PROVIDER,
|
|
89
|
+
useClass: AXMMenuProvider,
|
|
90
|
+
multi: true,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
}]
|
|
94
|
+
}] });
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Generated bundle index. Do not edit.
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
export { AXMTestManagementModule };
|
|
101
|
+
//# sourceMappingURL=acorex-platform-module-test-management-client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-test-management-client.mjs","sources":["../../../../libs/modules/test-management/client/src/lib/menu.provider.ts","../../../../libs/modules/test-management/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/test-management/client/src/lib/test-management.module.ts","../../../../libs/modules/test-management/client/src/acorex-platform-module-test-management-client.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPTestManagementMenuKeys,\n AXPTestManagementPermissionKeys,\n RootConfig,\n} from '@acorex-platform/module-test-management-client/contracts';\nimport { inject } from '@angular/core';\n\n//#endregion\n\n//#region ---- Menu ----\n\nexport class AXMMenuProvider implements AXPMenuProvider {\n private entityService = inject(AXPEntityService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const module = RootConfig.module;\n\n context.find(AXPCommonMenuKeys.Administration).addItems([\n {\n name: AXPTestManagementMenuKeys.TestRuns,\n text: RootConfig.entities.testRun.titlePlural,\n path: this.entityService.withEntity(module.name, RootConfig.entities.testRun.name).createPath(),\n icon: RootConfig.entities.testRun.icon,\n priority: 8400,\n policy: {\n features: [module.name],\n permissions: [AXPTestManagementPermissionKeys.MaintainTestResults],\n },\n },\n ]);\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { Injectable } from '@angular/core';\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport { AXPCommonPermissionGroupKeys } from '@acorex-platform/module-common-client/contracts';\nimport { AXPTestManagementPermissionKeys } from '@acorex-platform/module-test-management-client/contracts';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n@Injectable()\nexport class AXMPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPTestManagementPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:insights-reporting.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(\n groups.InsightsReporting.Root,\n `${G}.insights-reporting.title`,\n `${G}.insights-reporting.description`,\n { order: 100 },\n );\n\n context\n .addGroup(\n groups.InsightsReporting.Reports,\n `${G}.insights-reporting-reports.title`,\n `${G}.insights-reporting-reports.description`,\n { parent: groups.InsightsReporting.Root, order: 10 },\n )\n .addPermission(\n keys.MaintainTestResults,\n `${P}.maintain-test-results.title`,\n `${P}.maintain-test-results.description`,\n { modules: ['TestManagement'], requiredFeatures: ['TestManagement'] },\n )\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { NgModule } from '@angular/core';\nimport { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\n\nimport { AXMMenuProvider } from './menu.provider';\nimport { AXMPermissionDefinitionProvider } from './permission-definition.provider';\n\n//#endregion\n\n//#region ---- Module ----\n\n@NgModule({\n imports: [],\n providers: [\n {\n provide: AXP_PERMISSION_DEFINITION_PROVIDER,\n useClass: AXMPermissionDefinitionProvider,\n multi: true,\n },\n {\n provide: AXP_MENU_PROVIDER,\n useClass: AXMMenuProvider,\n multi: true,\n },\n ],\n})\nexport class AXMTestManagementModule {}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AAYA;AAEA;MAEa,eAAe,CAAA;AAA5B,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAmBlD;IAjBE,MAAM,OAAO,CAAC,OAA+B,EAAA;AAC3C,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM;QAEhC,OAAO,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AAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,kCAAkC;AAC3C,4BAAA,QAAQ,EAAE,+BAA+B;AACzC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,eAAe;AACzB,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA;;;AC3BD;;AAEG;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/module-test-management-client",
|
|
3
|
+
"version": "0.0.46",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0 || ^22.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0 || ^22.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-module-test-management-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-module-test-management-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-module-test-management-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-module-test-management-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-module-test-management-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-module-test-management-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { AXPModuleManifest } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Insights & Reporting capability for stored CTRF test runs.
|
|
5
|
+
* Group ids live in `AXPCommonPermissionGroupKeys`.
|
|
6
|
+
*/
|
|
7
|
+
declare const AXPTestManagementPermissionKeys: {
|
|
8
|
+
readonly MaintainTestResults: "InsightsReporting:Permission:MaintainTestResults";
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
declare const AXPTestManagementMenuKeys: {
|
|
12
|
+
readonly Root: "TestManagement:Menu";
|
|
13
|
+
readonly TestRuns: "TestManagement:Menu:TestRuns";
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** CTRF test status values. */
|
|
17
|
+
declare const CTRF_TEST_STATUSES: readonly ["passed", "failed", "skipped", "pending", "other"];
|
|
18
|
+
type CtrfTestStatus = (typeof CTRF_TEST_STATUSES)[number];
|
|
19
|
+
declare function ctrfStatusDataSource(): Array<{
|
|
20
|
+
value: CtrfTestStatus;
|
|
21
|
+
text: string;
|
|
22
|
+
cssClass?: string;
|
|
23
|
+
}>;
|
|
24
|
+
|
|
25
|
+
declare const RootConfig: {
|
|
26
|
+
readonly config: {
|
|
27
|
+
readonly i18n: "test-management";
|
|
28
|
+
readonly module: "TestManagement";
|
|
29
|
+
};
|
|
30
|
+
readonly module: {
|
|
31
|
+
readonly module: "test-management";
|
|
32
|
+
readonly name: "TestManagement";
|
|
33
|
+
readonly title: "@test-management:module.title";
|
|
34
|
+
readonly icon: "fa-light fa-file-chart-column";
|
|
35
|
+
};
|
|
36
|
+
readonly entities: {
|
|
37
|
+
readonly testRun: {
|
|
38
|
+
readonly name: "TestRun";
|
|
39
|
+
readonly source: "TestManagement.TestRun";
|
|
40
|
+
readonly title: "@test-management:entities.test-run.title";
|
|
41
|
+
readonly titlePlural: "@test-management:entities.test-run.plural";
|
|
42
|
+
readonly icon: "fa-light fa-file-chart-column";
|
|
43
|
+
};
|
|
44
|
+
readonly testResult: {
|
|
45
|
+
readonly name: "TestResult";
|
|
46
|
+
readonly source: "TestManagement.TestResult";
|
|
47
|
+
readonly title: "@test-management:entities.test-result.title";
|
|
48
|
+
readonly titlePlural: "@test-management:entities.test-result.plural";
|
|
49
|
+
readonly icon: "fa-light fa-list-check";
|
|
50
|
+
};
|
|
51
|
+
readonly testArtifact: {
|
|
52
|
+
readonly name: "TestArtifact";
|
|
53
|
+
readonly source: "TestManagement.TestArtifact";
|
|
54
|
+
readonly title: "@test-management:entities.test-artifact.title";
|
|
55
|
+
readonly titlePlural: "@test-management:entities.test-artifact.plural";
|
|
56
|
+
readonly icon: "fa-light fa-paperclip";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
declare const TestManagementManifest: AXPModuleManifest;
|
|
62
|
+
|
|
63
|
+
declare const AXPTestManagementCommandKeys: {
|
|
64
|
+
readonly ImportCtrf: "TestManagement:ImportCtrf";
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** Gallery / file-viewer field on TestRun and TestResult. Matches File:Save `category`. */
|
|
68
|
+
declare const TEST_MANAGEMENT_FILES_FIELD = "files";
|
|
69
|
+
declare const TEST_MANAGEMENT_FILES_CATEGORY = "files";
|
|
70
|
+
declare const TEST_RUN_FILE_REF_TYPE: "TestManagement.TestRun";
|
|
71
|
+
declare const TEST_RESULT_FILE_REF_TYPE: "TestManagement.TestResult";
|
|
72
|
+
|
|
73
|
+
export { AXPTestManagementCommandKeys, AXPTestManagementMenuKeys, AXPTestManagementPermissionKeys, CTRF_TEST_STATUSES, RootConfig, TEST_MANAGEMENT_FILES_CATEGORY, TEST_MANAGEMENT_FILES_FIELD, TEST_RESULT_FILE_REF_TYPE, TEST_RUN_FILE_REF_TYPE, TestManagementManifest, ctrfStatusDataSource };
|
|
74
|
+
export type { CtrfTestStatus };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare class AXMTestManagementModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXMTestManagementModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXMTestManagementModule, never, never, never>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXMTestManagementModule>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { AXMTestManagementModule };
|