@uuv/playwright 2.6.5 → 2.7.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.
|
@@ -113,7 +113,7 @@ function translateFeatures(tempDir, configDir) {
|
|
|
113
113
|
console.log(chalk_1.default.gray(`[WRITE] ${generatedFile} written successfully`));
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
function runPlaywright(mode, configDir, browser = "chromium", generateHtmlReport = false, env, targetTestFile) {
|
|
116
|
+
function runPlaywright(mode, configDir, browser = "chromium", generateHtmlReport = false, generateJunitReport = false, env, targetTestFile) {
|
|
117
117
|
const configFile = `${configDir}/playwright.config.ts`;
|
|
118
118
|
const reportType = generateHtmlReport ? uuv_playwright_reporter_helper_1.GeneratedReportType.HTML : uuv_playwright_reporter_helper_1.GeneratedReportType.CONSOLE;
|
|
119
119
|
try {
|
|
@@ -129,8 +129,15 @@ function runPlaywright(mode, configDir, browser = "chromium", generateHtmlReport
|
|
|
129
129
|
if (env) {
|
|
130
130
|
Object.keys(env).forEach(key => process.env[key] = env[key]);
|
|
131
131
|
}
|
|
132
|
+
let reporter = " --reporter=@uuv/playwright/uuv-playwright-reporter";
|
|
133
|
+
if (generateJunitReport) {
|
|
134
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
135
|
+
// @ts-ignore
|
|
136
|
+
process.env.PLAYWRIGHT_JUNIT_OUTPUT_NAME = `${configDir}/reports/e2e/junit-report.xml`;
|
|
137
|
+
reporter = `${reporter},junit`;
|
|
138
|
+
}
|
|
132
139
|
// eslint-disable-next-line max-len
|
|
133
|
-
const command = `npx playwright test --project=${browser} -c ${configFile} ${mode === "open" ? "--ui" : ""}${getTargetTestFileForPlawright(targetTestFile)}`;
|
|
140
|
+
const command = `npx playwright test --project=${browser} -c ${configFile} ${mode === "open" ? "--ui" : ""}${reporter}${getTargetTestFileForPlawright(targetTestFile)}`;
|
|
134
141
|
console.log(chalk_1.default.gray(`Running ${command}`));
|
|
135
142
|
(0, child_process_1.execSync)(command, { stdio: "inherit" });
|
|
136
143
|
}
|
|
@@ -159,7 +166,7 @@ async function run(mode, tempDir = "uuv/.features-gen/e2e", configDir = "uuv", a
|
|
|
159
166
|
if (mode === "open") {
|
|
160
167
|
child_process_1.default.fork(path_1.default.join(__dirname, "watch-test-files"), [tempDir, configDir, env]);
|
|
161
168
|
}
|
|
162
|
-
runPlaywright(mode, configDir, browser, argv.generateHtmlReport, env, targetTestFile);
|
|
169
|
+
runPlaywright(mode, configDir, browser, argv.generateHtmlReport, argv.generateJunitReport, env, targetTestFile);
|
|
163
170
|
}
|
|
164
171
|
exports.run = run;
|
|
165
172
|
function extractArgs(argv) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/playwright",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
6
6
|
"description": "A solution to facilitate the writing and execution of E2E tests understandable by any human being using cucumber(BDD) and playwright",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@cucumber/cucumber": "9.6.0",
|
|
46
46
|
"@cucumber/tag-expressions": "^6.0.0",
|
|
47
47
|
"@playwright/test": "1.33.0",
|
|
48
|
-
"@uuv/runner-commons": "2.
|
|
48
|
+
"@uuv/runner-commons": "2.7.0",
|
|
49
49
|
"axe-core": "4.8.4",
|
|
50
50
|
"axe-playwright": "1.2.3",
|
|
51
51
|
"chalk": "4.1.2",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@types/node": "16.18.68",
|
|
93
93
|
"cross-env": "7.0.3",
|
|
94
94
|
"eslint-plugin-cucumber": "2.0.0",
|
|
95
|
-
"eslint-plugin-jest": "27.
|
|
95
|
+
"eslint-plugin-jest": "27.9.0",
|
|
96
96
|
"eslint-plugin-playwright": "0.12.0",
|
|
97
97
|
"ts-loader": "9.4.2",
|
|
98
98
|
"tsconfig-paths": "4.2.0",
|