allure-js-commons
Advanced tools
Comparing version 3.0.0-beta.6 to 3.0.0-beta.7
@@ -12,2 +12,3 @@ "use strict"; | ||
var _factory = require("./factory.js"); | ||
var _testplan = require("./testplan.js"); | ||
var _utils = require("./utils.js"); | ||
@@ -213,3 +214,3 @@ var _attachments = require("./utils/attachments.js"); | ||
} | ||
if (testResult.labels.find(label => label.name === "ALLURE_TESTPLAN_SKIP")) { | ||
if ((0, _testplan.hasSkipLabel)(testResult.labels)) { | ||
this.state.deleteTestResult(uuid); | ||
@@ -216,0 +217,0 @@ return; |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.parseTestPlan = exports.includedInTestPlan = void 0; | ||
exports.parseTestPlan = exports.includedInTestPlan = exports.hasSkipLabel = exports.addSkipLabelAsMeta = exports.addSkipLabel = void 0; | ||
var _nodeFs = require("node:fs"); | ||
@@ -46,2 +46,20 @@ var _utils = require("../utils.js"); | ||
exports.includedInTestPlan = includedInTestPlan; | ||
var addSkipLabel = labels => { | ||
labels.push({ | ||
name: "ALLURE_TESTPLAN_SKIP", | ||
value: "true" | ||
}); | ||
}; | ||
exports.addSkipLabel = addSkipLabel; | ||
var addSkipLabelAsMeta = name => { | ||
return "".concat(name, " @allure.label.ALLURE_TESTPLAN_SKIP:true"); | ||
}; | ||
exports.addSkipLabelAsMeta = addSkipLabelAsMeta; | ||
var hasSkipLabel = labels => labels.some(_ref => { | ||
var { | ||
name | ||
} = _ref; | ||
return name === "ALLURE_TESTPLAN_SKIP"; | ||
}); | ||
exports.hasSkipLabel = hasSkipLabel; | ||
//# sourceMappingURL=testplan.js.map |
@@ -59,7 +59,7 @@ "use strict"; | ||
exports.getMessageAndTraceFromError = getMessageAndTraceFromError; | ||
var allureIdRegexp = exports.allureIdRegexp = /*#__PURE__*/_wrapRegExp(/@?allure.id[:=]([^\s]+)/, { | ||
var allureIdRegexp = exports.allureIdRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.id[:=]([^\s]+)/, { | ||
id: 1 | ||
}); | ||
var allureIdRegexpGlobal = exports.allureIdRegexpGlobal = new RegExp(allureIdRegexp, "g"); | ||
var allureLabelRegexp = exports.allureLabelRegexp = /*#__PURE__*/_wrapRegExp(/@?allure.label.([^\s]+?)[:=]([^\s]+)/, { | ||
var allureLabelRegexp = exports.allureLabelRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.label\.([^:=\s]+)[:=]([^\s]+)/, { | ||
name: 1, | ||
@@ -66,0 +66,0 @@ value: 2 |
@@ -19,2 +19,3 @@ var _excluded = ["links", "labels", "parameters", "displayName"]; | ||
import { createFixtureResult, createStepResult, createTestResult } from "./factory.js"; | ||
import { hasSkipLabel } from "./testplan.js"; | ||
import { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from "./utils.js"; | ||
@@ -208,3 +209,3 @@ import { buildAttachmentFileName } from "./utils/attachments.js"; | ||
} | ||
if (testResult.labels.find(label => label.name === "ALLURE_TESTPLAN_SKIP")) { | ||
if (hasSkipLabel(testResult.labels)) { | ||
this.state.deleteTestResult(uuid); | ||
@@ -211,0 +212,0 @@ return; |
@@ -37,2 +37,17 @@ import { readFileSync } from "node:fs"; | ||
}; | ||
export var addSkipLabel = labels => { | ||
labels.push({ | ||
name: "ALLURE_TESTPLAN_SKIP", | ||
value: "true" | ||
}); | ||
}; | ||
export var addSkipLabelAsMeta = name => { | ||
return "".concat(name, " @allure.label.ALLURE_TESTPLAN_SKIP:true"); | ||
}; | ||
export var hasSkipLabel = labels => labels.some(_ref => { | ||
var { | ||
name | ||
} = _ref; | ||
return name === "ALLURE_TESTPLAN_SKIP"; | ||
}); | ||
//# sourceMappingURL=testplan.js.map |
@@ -50,7 +50,7 @@ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != typeof e[e.length - 1] && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); } | ||
}; | ||
export var allureIdRegexp = /*#__PURE__*/_wrapRegExp(/@?allure.id[:=]([^\s]+)/, { | ||
export var allureIdRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.id[:=]([^\s]+)/, { | ||
id: 1 | ||
}); | ||
export var allureIdRegexpGlobal = new RegExp(allureIdRegexp, "g"); | ||
export var allureLabelRegexp = /*#__PURE__*/_wrapRegExp(/@?allure.label.([^\s]+?)[:=]([^\s]+)/, { | ||
export var allureLabelRegexp = /*#__PURE__*/_wrapRegExp(/(?:^|\s)@?allure\.label\.([^:=\s]+)[:=]([^\s]+)/, { | ||
name: 1, | ||
@@ -57,0 +57,0 @@ value: 2 |
@@ -0,1 +1,2 @@ | ||
import type { Label } from "../../model.js"; | ||
import type { TestPlanV1 } from "../types.js"; | ||
@@ -8,1 +9,4 @@ export declare const parseTestPlan: () => TestPlanV1 | undefined; | ||
}) => boolean; | ||
export declare const addSkipLabel: (labels: Label[]) => void; | ||
export declare const addSkipLabelAsMeta: (name: string) => string; | ||
export declare const hasSkipLabel: (labels: readonly Label[]) => boolean; |
@@ -27,2 +27,2 @@ import type { FixtureResult, Label, StatusDetails, StepResult, TestResult } from "../model.js"; | ||
export declare const getUnfinishedStepsMessages: (messages: RuntimeMessage[]) => RuntimeMessage[][]; | ||
export declare const isPromise: (obj: any) => boolean; | ||
export declare const isPromise: <T = any>(obj: any) => obj is PromiseLike<T>; |
{ | ||
"name": "allure-js-commons", | ||
"version": "3.0.0-beta.6", | ||
"version": "3.0.0-beta.7", | ||
"description": "Allure JS Commons", | ||
@@ -85,3 +85,3 @@ "homepage": "https://allurereport.org/", | ||
"npm-run-all2": "^6.1.2", | ||
"rimraf": "^5.0.1", | ||
"rimraf": "^6.0.0", | ||
"typescript": "^5.2.2", | ||
@@ -91,3 +91,3 @@ "vitest": "^1.6.0" | ||
"peerDependencies": { | ||
"allure-playwright": "3.0.0-beta.6" | ||
"allure-playwright": "3.0.0-beta.7" | ||
}, | ||
@@ -94,0 +94,0 @@ "peerDependenciesMeta": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
720449
7093