allure-playwright
Advanced tools
Comparing version 2.7.0 to 2.8.0
@@ -57,13 +57,4 @@ "use strict"; | ||
titleMetadata.labels.forEach((label) => allureTest.addLabel(label.name, label.value)); | ||
const [, projectSuiteTitle, fileSuiteTitle, ...suiteTitles] = suite.titlePath(); | ||
const [, , , ...suiteTitles] = suite.titlePath(); | ||
allureTest.addLabel("titlePath", suite.titlePath().join(" > ")); | ||
if (projectSuiteTitle) { | ||
allureTest.addLabel(allure_js_commons_1.LabelName.PARENT_SUITE, projectSuiteTitle); | ||
} | ||
if (this.options.suiteTitle && fileSuiteTitle) { | ||
allureTest.addLabel(allure_js_commons_1.LabelName.SUITE, fileSuiteTitle); | ||
} | ||
if (suiteTitles.length > 0) { | ||
allureTest.addLabel(allure_js_commons_1.LabelName.SUB_SUITE, suiteTitles.join(" > ")); | ||
} | ||
const project = suite.project(); | ||
@@ -95,2 +86,5 @@ if (project === null || project === void 0 ? void 0 : project.name) { | ||
} | ||
if (step.category === "attach") { | ||
return; | ||
} | ||
const allureStep = this.ensureAllureStepCreated(step, allureTest); | ||
@@ -142,2 +136,12 @@ const name = (_a = allureStep.wrappedItem) === null || _a === void 0 ? void 0 : _a.name; | ||
} | ||
const [, projectSuiteTitle, fileSuiteTitle, ...suiteTitles] = test.parent.titlePath(); | ||
if (projectSuiteTitle && !hasLabel(allureTest, allure_js_commons_1.LabelName.PARENT_SUITE)) { | ||
allureTest.addLabel(allure_js_commons_1.LabelName.PARENT_SUITE, projectSuiteTitle); | ||
} | ||
if (this.options.suiteTitle && fileSuiteTitle && !hasLabel(allureTest, allure_js_commons_1.LabelName.SUITE)) { | ||
allureTest.addLabel(allure_js_commons_1.LabelName.SUITE, fileSuiteTitle); | ||
} | ||
if (suiteTitles.length > 0 && !hasLabel(allureTest, allure_js_commons_1.LabelName.SUB_SUITE)) { | ||
allureTest.addLabel(allure_js_commons_1.LabelName.SUB_SUITE, suiteTitles.join(" > ")); | ||
} | ||
allureTest.calculateHistoryId(); | ||
@@ -315,3 +319,11 @@ allureTest.endTest(); | ||
}; | ||
const hasLabel = (test, labelName) => { | ||
var _a; | ||
const wrappedItem = test.wrappedItem; | ||
if ("labels" in wrappedItem) { | ||
return ((_a = wrappedItem.labels) === null || _a === void 0 ? void 0 : _a.find((l) => l.name === labelName)) !== undefined; | ||
} | ||
return false; | ||
}; | ||
__exportStar(require("./helpers"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "allure-playwright", | ||
"version": "2.7.0", | ||
"version": "2.8.0", | ||
"description": "Allure Playwright integration", | ||
@@ -39,3 +39,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"allure-js-commons": "2.7.0" | ||
"allure-js-commons": "2.8.0" | ||
}, | ||
@@ -42,0 +42,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
51676
560
+ Addedallure-js-commons@2.8.0(transitive)
- Removedallure-js-commons@2.7.0(transitive)
- Removeduuid@8.3.2(transitive)
Updatedallure-js-commons@2.8.0