allure-playwright
Advanced tools
Comparing version 2.5.0 to 2.6.0
@@ -23,5 +23,5 @@ import { Label, Link, MetadataMessage, ParameterOptions } from "allure-js-commons"; | ||
static tms(name: string, url: string): void; | ||
static parameter(name: string, value: string, options?: ParameterOptions): void; | ||
static parameter(name: string, value: any, options?: ParameterOptions): void; | ||
static addParameter(name: string, value: string, options?: ParameterOptions): void; | ||
} | ||
export { LabelName } from "allure-js-commons"; |
@@ -48,6 +48,6 @@ "use strict"; | ||
const group = this.ensureAllureGroupCreated(suite); | ||
const allureTest = group.startTest(test.title); | ||
const titleMetadata = (0, utils_1.extractMetadataFromString)(test.title); | ||
const allureTest = group.startTest(titleMetadata.cleanTitle); | ||
allureTest.addLabel(allure_js_commons_1.LabelName.LANGUAGE, "JavaScript"); | ||
allureTest.addLabel(allure_js_commons_1.LabelName.FRAMEWORK, "Playwright"); | ||
const titleMetadata = (0, utils_1.extractMetadataFromString)(test.title); | ||
titleMetadata.labels.forEach((label) => allureTest.addLabel(label.name, label.value)); | ||
@@ -66,7 +66,7 @@ const [, projectSuiteTitle, fileSuiteTitle, ...suiteTitles] = suite.titlePath(); | ||
const project = suite.project(); | ||
if (project.name) { | ||
allureTest.addParameter("Project", project.name); | ||
if (project === null || project === void 0 ? void 0 : project.name) { | ||
allureTest.parameter("Project", project.name); | ||
} | ||
if (project.repeatEach > 1) { | ||
allureTest.addParameter("Repetition", `${test.repeatEachIndex + 1}`); | ||
allureTest.parameter("Repetition", `${test.repeatEachIndex + 1}`); | ||
} | ||
@@ -136,3 +136,3 @@ const relativeFile = path_1.default | ||
(_b = metadata.labels) === null || _b === void 0 ? void 0 : _b.forEach((val) => allureTest.addLabel(val.name, val.value)); | ||
(_c = metadata.parameter) === null || _c === void 0 ? void 0 : _c.forEach((val) => allureTest.addParameter(val.name, val.value, { | ||
(_c = metadata.parameter) === null || _c === void 0 ? void 0 : _c.forEach((val) => allureTest.parameter(val.name, val.value, { | ||
excluded: val.excluded, | ||
@@ -139,0 +139,0 @@ mode: val.mode, |
import { Label } from "allure-js-commons"; | ||
export declare const extractMetadataFromString: (title: string) => { | ||
labels: Label[]; | ||
cleanTitle: string; | ||
}; |
@@ -19,5 +19,9 @@ "use strict"; | ||
}); | ||
return { labels }; | ||
const cleanTitle = title | ||
.replace(allure_js_commons_1.allureLabelRegexpGlobal, "") | ||
.replace(allure_js_commons_1.allureIdRegexpGlobal, "") | ||
.trim(); | ||
return { labels, cleanTitle }; | ||
}; | ||
exports.extractMetadataFromString = extractMetadataFromString; | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "allure-playwright", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Allure Playwright integration", | ||
@@ -39,3 +39,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"allure-js-commons": "2.5.0" | ||
"allure-js-commons": "2.6.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "files": [ |
@@ -274,3 +274,3 @@ # allure-playwright | ||
test("basic test", async ({ page }, testInfo) => { | ||
allure.addParameter("parameterName", "parameterValue", { mode: "masked", excluded: true }); | ||
allure.parameter("parameterName", "parameterValue", { mode: "masked", excluded: true }); | ||
}); | ||
@@ -354,1 +354,5 @@ ``` | ||
``` | ||
> **Warning** | ||
> Note that changing title can cause creating new testcases in history. | ||
> To fix this please add `@allure.id={yourTestCaseId}` to the test name if you passing allure metadata from test title |
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
46060
499
357
+ Addedallure-js-commons@2.6.0(transitive)
- Removedallure-js-commons@2.5.0(transitive)
Updatedallure-js-commons@2.6.0