@isaac.frontend/testcafe-reporter-allure
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -114,3 +114,3 @@ 'use strict'; | ||
SEVERITY: 'Normal', | ||
ISSUE_URL: 'https://jira.example.nl/browse/', | ||
ISSUE_URL: 'https://jira.example.nl/browse/' | ||
}, | ||
@@ -122,4 +122,4 @@ LABEL: { | ||
SCREENSHOT_ON_FAIL: 'Screenshot taken on fail', | ||
DEFAULT_STEP_NAME: 'Test Step', | ||
}, | ||
DEFAULT_STEP_NAME: 'Test Step' | ||
} | ||
}; | ||
@@ -129,3 +129,3 @@ var defaultCategoriesConfig = [ | ||
name: 'Ignored tests', | ||
matchedStatuses: [allureJsCommons.Status.SKIPPED], | ||
matchedStatuses: [allureJsCommons.Status.SKIPPED] | ||
}, | ||
@@ -135,7 +135,7 @@ { | ||
matchedStatuses: [allureJsCommons.Status.FAILED], | ||
messageRegex: '.*Assertion failed.*', | ||
messageRegex: '.*Assertion failed.*' | ||
}, | ||
{ | ||
name: 'Test defects', | ||
matchedStatuses: [allureJsCommons.Status.FAILED], | ||
matchedStatuses: [allureJsCommons.Status.FAILED] | ||
}, | ||
@@ -145,3 +145,3 @@ { | ||
matchedStatuses: [allureJsCommons.Status.PASSED], | ||
messageRegex: '.*Warning.*', | ||
messageRegex: '.*Warning.*' | ||
}, | ||
@@ -151,3 +151,3 @@ { | ||
matchedStatuses: [allureJsCommons.Status.PASSED, allureJsCommons.Status.FAILED], | ||
messageRegex: '.*Flaky.*', | ||
messageRegex: '.*Flaky.*' | ||
}, | ||
@@ -233,3 +233,3 @@ ]; | ||
} | ||
return text + "\n" + line; | ||
return "".concat(text, "\n").concat(line); | ||
} | ||
@@ -244,3 +244,3 @@ | ||
if (meta) { | ||
var severity = meta.severity, description = meta.description, issue = meta.issue, suite = meta.suite, epic = meta.epic, story = meta.story, feature = meta.feature, flaky = meta.flaky, steps = meta.steps, otherMeta_1 = __rest(meta, ["severity", "description", "issue", "suite", "epic", "story", "feature", "flaky", "steps"]); | ||
var severity = meta.severity, description = meta.description, issue = meta.issue, suite = meta.suite, epic = meta.epic, story = meta.story, feature = meta.feature, flaky = meta.flaky, steps = meta.steps, tags = meta.tags, otherMeta_1 = __rest(meta, ["severity", "description", "issue", "suite", "epic", "story", "feature", "flaky", "steps", "tags"]); | ||
if (this.isValidEnumValue(severity, allureJsCommons.Severity)) { | ||
@@ -278,2 +278,8 @@ this.severity = severity; | ||
} | ||
if (Array.isArray(tags)) { | ||
this.tags = tags; | ||
} | ||
else if (this.isString(tags)) { | ||
this.tags = [tags]; | ||
} | ||
Object.keys(otherMeta_1).forEach(function (key) { | ||
@@ -332,4 +338,9 @@ if (_this.isString(otherMeta_1[key])) { | ||
} | ||
if (this.tags) { | ||
this.tags.map(function (tag) { | ||
test.addLabel(allureJsCommons.LabelName.TAG, tag); | ||
}); | ||
} | ||
if (this.issue) { | ||
test.addLink("" + reporterConfig$3.META.ISSUE_URL + this.issue, reporterConfig$3.LABEL.ISSUE + ": " + this.issue, allureJsCommons.LinkType.ISSUE); | ||
test.addLink("".concat(reporterConfig$3.META.ISSUE_URL).concat(this.issue), "".concat(reporterConfig$3.LABEL.ISSUE, ": ").concat(this.issue), allureJsCommons.LinkType.ISSUE); | ||
} | ||
@@ -457,3 +468,3 @@ if (this.description) { | ||
var currentTest = currentGroup.startTest(name); | ||
currentTest.fullName = currentGroup.name + " : " + name; | ||
currentTest.fullName = "".concat(currentGroup.name, " : ").concat(name); | ||
currentTest.historyId = uuid.v4(); | ||
@@ -494,6 +505,6 @@ currentTest.stage = allureJsCommons.Stage.RUNNING; | ||
if (callSite.filename) { | ||
testDetails = addNewLine(testDetails, "File name: " + callSite.filename); | ||
testDetails = addNewLine(testDetails, "File name: ".concat(callSite.filename)); | ||
} | ||
if (callSite.lineNum) { | ||
testDetails = addNewLine(testDetails, "Line number: " + callSite.lineNum); | ||
testDetails = addNewLine(testDetails, "Line number: ".concat(callSite.lineNum)); | ||
} | ||
@@ -506,13 +517,13 @@ // renderSync needs to be in a try catch to avoid a file not found error | ||
stacktrace = error.callsite.renderSync({ | ||
renderer: noColorRenderer, | ||
renderer: noColorRenderer | ||
}); | ||
testDetails = addNewLine(testDetails, "Stacktrace:\n" + stacktrace); | ||
testDetails = addNewLine(testDetails, "Stacktrace:\n".concat(stacktrace)); | ||
} | ||
catch (err) { | ||
// eslint-disable-next-line no-console | ||
console.error("Error in callsite.renderSync in Allure reporting:\n" + err); | ||
console.error("Error in callsite.renderSync in Allure reporting:\n".concat(err)); | ||
} | ||
} | ||
if (error.userAgent) { | ||
testDetails = addNewLine(testDetails, "User Agent(s): " + error.userAgent); | ||
testDetails = addNewLine(testDetails, "User Agent(s): ".concat(error.userAgent)); | ||
} | ||
@@ -601,3 +612,3 @@ }); | ||
if (this.userAgents && this.userAgents.length > 1 && screenshot.userAgent) { | ||
screenshotName = screenshotName + " - " + screenshot.userAgent; | ||
screenshotName = "".concat(screenshotName, " - ").concat(screenshot.userAgent); | ||
} | ||
@@ -636,3 +647,3 @@ var img = fs__namespace.readFileSync(screenshot.screenshotPath); | ||
/* eslint-disable-next-line no-param-reassign */ | ||
mergedError.userAgent = mergedError.userAgent + ", " + error.userAgent; | ||
mergedError.userAgent = "".concat(mergedError.userAgent, ", ").concat(error.userAgent); | ||
} | ||
@@ -672,3 +683,3 @@ } | ||
if (!dataPath) return [3 /*break*/, 2]; | ||
return [4 /*yield*/, rimraf__default["default"](dataPath + "/*", function () { })]; | ||
return [4 /*yield*/, rimraf__default["default"]("".concat(dataPath, "/*"), function () { })]; | ||
case 1: | ||
@@ -747,3 +758,3 @@ _a.sent(); | ||
return __generator(this, function (_a) { | ||
log(this, "Starting Fixture: " + name); | ||
log(this, "Starting Fixture: ".concat(name)); | ||
// End the previous group because testcafe does not trigger the reporter when a fixture ends. | ||
@@ -759,3 +770,3 @@ this.allureReporter.endGroup(); | ||
return __generator(this, function (_a) { | ||
log(this, "Starting Test: " + name); | ||
log(this, "Starting Test: ".concat(name)); | ||
this.allureReporter.startTest(name, meta); | ||
@@ -769,3 +780,3 @@ return [2 /*return*/]; | ||
return __generator(this, function (_a) { | ||
log(this, "Ending Test: " + name); | ||
log(this, "Ending Test: ".concat(name)); | ||
this.allureReporter.endTest(name, testRunInfo, meta); | ||
@@ -785,5 +796,5 @@ return [2 /*return*/]; | ||
}); | ||
}, | ||
} | ||
}); }); | ||
module.exports = index; |
@@ -15,2 +15,3 @@ import { AllureTest, Severity } from 'allure-js-commons'; | ||
steps: TestStep[]; | ||
tags: string[]; | ||
otherMeta: Map<string, string>; | ||
@@ -17,0 +18,0 @@ constructor(meta?: any, test?: boolean); |
@@ -97,3 +97,3 @@ 'use strict'; | ||
SEVERITY: 'Normal', | ||
ISSUE_URL: 'https://jira.example.nl/browse/', | ||
ISSUE_URL: 'https://jira.example.nl/browse/' | ||
}, | ||
@@ -105,4 +105,4 @@ LABEL: { | ||
SCREENSHOT_ON_FAIL: 'Screenshot taken on fail', | ||
DEFAULT_STEP_NAME: 'Test Step', | ||
}, | ||
DEFAULT_STEP_NAME: 'Test Step' | ||
} | ||
}; | ||
@@ -112,3 +112,3 @@ [ | ||
name: 'Ignored tests', | ||
matchedStatuses: [allureJsCommons.Status.SKIPPED], | ||
matchedStatuses: [allureJsCommons.Status.SKIPPED] | ||
}, | ||
@@ -118,7 +118,7 @@ { | ||
matchedStatuses: [allureJsCommons.Status.FAILED], | ||
messageRegex: '.*Assertion failed.*', | ||
messageRegex: '.*Assertion failed.*' | ||
}, | ||
{ | ||
name: 'Test defects', | ||
matchedStatuses: [allureJsCommons.Status.FAILED], | ||
matchedStatuses: [allureJsCommons.Status.FAILED] | ||
}, | ||
@@ -128,3 +128,3 @@ { | ||
matchedStatuses: [allureJsCommons.Status.PASSED], | ||
messageRegex: '.*Warning.*', | ||
messageRegex: '.*Warning.*' | ||
}, | ||
@@ -134,3 +134,3 @@ { | ||
matchedStatuses: [allureJsCommons.Status.PASSED, allureJsCommons.Status.FAILED], | ||
messageRegex: '.*Flaky.*', | ||
messageRegex: '.*Flaky.*' | ||
}, | ||
@@ -137,0 +137,0 @@ ]; |
{ | ||
"name": "@isaac.frontend/testcafe-reporter-allure", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"author": "ISAAC E-commerce Solutions BV", | ||
@@ -53,4 +53,4 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@commitlint/cli": "14.1.0", | ||
"@commitlint/config-conventional": "14.1.0", | ||
"@commitlint/cli": "15.0.0", | ||
"@commitlint/config-conventional": "15.0.0", | ||
"@rollup/plugin-typescript": "8.3.0", | ||
@@ -63,14 +63,14 @@ "@semantic-release/changelog": "6.0.1", | ||
"@types/fs-extra": "9.0.13", | ||
"@types/jest": "27.0.2", | ||
"@types/jest": "27.0.3", | ||
"@types/rimraf": "3.0.2", | ||
"@types/uuid": "8.3.1", | ||
"@typescript-eslint/eslint-plugin": "5.3.0", | ||
"@typescript-eslint/parser": "5.3.0", | ||
"@types/uuid": "8.3.3", | ||
"@typescript-eslint/eslint-plugin": "5.4.0", | ||
"@typescript-eslint/parser": "5.4.0", | ||
"allure-commandline": "2.13.8", | ||
"eslint": "8.2.0", | ||
"eslint": "8.3.0", | ||
"eslint-config-airbnb-base": "14.2.1", | ||
"eslint-config-airbnb-typescript": "15.0.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"eslint-plugin-import": "2.25.2", | ||
"eslint-plugin-jest": "25.2.3", | ||
"eslint-plugin-import": "2.25.3", | ||
"eslint-plugin-jest": "25.2.4", | ||
"eslint-plugin-prettier": "4.0.0", | ||
@@ -86,10 +86,10 @@ "fs-extra": "10.0.0", | ||
"prettier": "2.4.1", | ||
"rollup": "2.59.0", | ||
"rollup-plugin-typescript2": "0.30.0", | ||
"rollup": "2.60.0", | ||
"rollup-plugin-typescript2": "0.31.0", | ||
"semantic-release": "18.0.0", | ||
"testcafe": "1.17.0", | ||
"testcafe": "1.17.1", | ||
"ts-jest": "27.0.7", | ||
"typescript": "4.4.4", | ||
"typescript": "4.5.2", | ||
"vuepress": "1.8.2" | ||
} | ||
} |
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
55188
1188