@allurereport/plugin-testops 3.9.0 → 3.10.0
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/dist/plugin.js +11 -14
- package/package.json +13 -13
package/dist/plugin.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
+
};
|
|
1
6
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
7
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
8
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
11
|
};
|
|
7
|
-
var
|
|
8
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
-
};
|
|
12
|
-
var _TestOpsPlugin_instances, _TestOpsPlugin_logger, _TestOpsPlugin_ci, _TestOpsPlugin_client, _TestOpsPlugin_clientConfigured, _TestOpsPlugin_launchName, _TestOpsPlugin_launchTags, _TestOpsPlugin_uploadedTestResultsIds, _TestOpsPlugin_autocloseLaunch, _TestOpsPlugin_uploadQualityGateResults, _TestOpsPlugin_uploadGlobalErrors, _TestOpsPlugin_uploadGlobalAttachments, _TestOpsPlugin_uploadTestResults, _TestOpsPlugin_upload, _TestOpsPlugin_trsToUpload, _TestOpsPlugin_enrichWithCategories, _TestOpsPlugin_syncLaunchCategories, _TestOpsPlugin_collectCategoryNamesByExternalId, _TestOpsPlugin_assignCreatedCategoryIds, _TestOpsPlugin_startUpload, _TestOpsPlugin_stopUpload;
|
|
12
|
+
var _TestOpsPlugin_instances, _TestOpsPlugin_logger, _TestOpsPlugin_ci, _TestOpsPlugin_client, _TestOpsPlugin_launchName, _TestOpsPlugin_launchTags, _TestOpsPlugin_uploadedTestResultsIds, _TestOpsPlugin_autocloseLaunch, _TestOpsPlugin_uploadQualityGateResults, _TestOpsPlugin_uploadGlobalErrors, _TestOpsPlugin_uploadGlobalAttachments, _TestOpsPlugin_uploadTestResults, _TestOpsPlugin_upload, _TestOpsPlugin_trsToUpload, _TestOpsPlugin_enrichWithCategories, _TestOpsPlugin_syncLaunchCategories, _TestOpsPlugin_collectCategoryNamesByExternalId, _TestOpsPlugin_assignCreatedCategoryIds, _TestOpsPlugin_startUpload, _TestOpsPlugin_stopUpload;
|
|
13
13
|
import { env } from "node:process";
|
|
14
|
-
import { detect } from "@allurereport/ci";
|
|
14
|
+
import { detect, isLocalCiDescriptor } from "@allurereport/ci";
|
|
15
15
|
import { getWorstStatus } from "@allurereport/core-api";
|
|
16
16
|
import { createPluginSummary } from "@allurereport/plugin-api";
|
|
17
17
|
import { uniqBy, stubTrue } from "lodash-es";
|
|
@@ -27,21 +27,18 @@ export class TestOpsPlugin {
|
|
|
27
27
|
_TestOpsPlugin_instances.add(this);
|
|
28
28
|
this.options = options;
|
|
29
29
|
_TestOpsPlugin_logger.set(this, new Logger("TestOpsPlugin"));
|
|
30
|
-
_TestOpsPlugin_ci.set(this,
|
|
30
|
+
_TestOpsPlugin_ci.set(this, detect());
|
|
31
31
|
_TestOpsPlugin_client.set(this, void 0);
|
|
32
|
-
_TestOpsPlugin_clientConfigured.set(this, false);
|
|
33
32
|
_TestOpsPlugin_launchName.set(this, "");
|
|
34
33
|
_TestOpsPlugin_launchTags.set(this, []);
|
|
35
34
|
_TestOpsPlugin_uploadedTestResultsIds.set(this, new Set());
|
|
36
35
|
_TestOpsPlugin_autocloseLaunch.set(this, false);
|
|
37
|
-
|
|
38
|
-
if (!__classPrivateFieldGet(this, _TestOpsPlugin_ci, "f") || __classPrivateFieldGet(this, _TestOpsPlugin_ci, "f").type === "local") {
|
|
36
|
+
if (isLocalCiDescriptor(__classPrivateFieldGet(this, _TestOpsPlugin_ci, "f")) && !this.isOverridenByEnv) {
|
|
39
37
|
__classPrivateFieldGet(this, _TestOpsPlugin_logger, "f").info(`plugin is disabled - no CI environment detected. To enable, set ${bold("ALLURE_TESTOPS_ENABLED")}=true or ${bold("CI")}=true.`);
|
|
40
38
|
return;
|
|
41
39
|
}
|
|
42
40
|
const { accessToken, endpoint, projectId, launchName, launchTags, autocloseLaunch = true, } = resolvePluginOptions(options);
|
|
43
41
|
if ([accessToken, endpoint, projectId].every(Boolean)) {
|
|
44
|
-
__classPrivateFieldSet(this, _TestOpsPlugin_clientConfigured, true, "f");
|
|
45
42
|
__classPrivateFieldSet(this, _TestOpsPlugin_client, new TestOpsClient({
|
|
46
43
|
baseUrl: endpoint,
|
|
47
44
|
accessToken,
|
|
@@ -71,7 +68,7 @@ export class TestOpsPlugin {
|
|
|
71
68
|
return isEnabled(env.ALLURE_TESTOPS_ENABLED) || isEnabled(env.CI);
|
|
72
69
|
}
|
|
73
70
|
get enabled() {
|
|
74
|
-
if (!__classPrivateFieldGet(this,
|
|
71
|
+
if (!(__classPrivateFieldGet(this, _TestOpsPlugin_client, "f") instanceof TestOpsClient)) {
|
|
75
72
|
return false;
|
|
76
73
|
}
|
|
77
74
|
if (this.isOverridenByEnv) {
|
|
@@ -153,7 +150,7 @@ export class TestOpsPlugin {
|
|
|
153
150
|
return summary;
|
|
154
151
|
}
|
|
155
152
|
}
|
|
156
|
-
_TestOpsPlugin_logger = new WeakMap(), _TestOpsPlugin_ci = new WeakMap(), _TestOpsPlugin_client = new WeakMap(),
|
|
153
|
+
_TestOpsPlugin_logger = new WeakMap(), _TestOpsPlugin_ci = new WeakMap(), _TestOpsPlugin_client = new WeakMap(), _TestOpsPlugin_launchName = new WeakMap(), _TestOpsPlugin_launchTags = new WeakMap(), _TestOpsPlugin_uploadedTestResultsIds = new WeakMap(), _TestOpsPlugin_autocloseLaunch = new WeakMap(), _TestOpsPlugin_instances = new WeakSet(), _TestOpsPlugin_uploadQualityGateResults = async function _TestOpsPlugin_uploadQualityGateResults(store) {
|
|
157
154
|
const results = await store.qualityGateResults();
|
|
158
155
|
const uniqueResults = uniqBy(results.filter(({ success }) => !success), ({ rule, environment }) => `${rule}-${environment}`);
|
|
159
156
|
if (uniqueResults.length === 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-testops",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "Allure Plugin TestOps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"lint:fix": "oxlint --import-plugin --fix src test features stories"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@allurereport/ci": "3.
|
|
36
|
-
"@allurereport/core-api": "3.
|
|
37
|
-
"@allurereport/plugin-api": "3.
|
|
38
|
-
"@allurereport/reader-api": "3.
|
|
39
|
-
"@allurereport/service": "3.
|
|
35
|
+
"@allurereport/ci": "3.10.0",
|
|
36
|
+
"@allurereport/core-api": "3.10.0",
|
|
37
|
+
"@allurereport/plugin-api": "3.10.0",
|
|
38
|
+
"@allurereport/reader-api": "3.10.0",
|
|
39
|
+
"@allurereport/service": "3.10.0",
|
|
40
40
|
"axios": "^1.15.2",
|
|
41
41
|
"form-data": "^4.0.5",
|
|
42
42
|
"lodash-es": "^4.18.1",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/d3-shape": "^3.1.6",
|
|
49
49
|
"@types/lodash-es": "^4",
|
|
50
|
-
"@types/node": "^20
|
|
50
|
+
"@types/node": "^20",
|
|
51
51
|
"@types/progress": "^2",
|
|
52
|
-
"@vitest/runner": "^2
|
|
52
|
+
"@vitest/runner": "^2",
|
|
53
53
|
"@vitest/snapshot": "^2.1.9",
|
|
54
|
-
"allure-js-commons": "^3
|
|
55
|
-
"allure-vitest": "^3
|
|
56
|
-
"rimraf": "^6
|
|
57
|
-
"typescript": "^5
|
|
58
|
-
"vitest": "^
|
|
54
|
+
"allure-js-commons": "^3",
|
|
55
|
+
"allure-vitest": "^3",
|
|
56
|
+
"rimraf": "^6",
|
|
57
|
+
"typescript": "^5",
|
|
58
|
+
"vitest": "^4.1.0"
|
|
59
59
|
}
|
|
60
60
|
}
|