@uuv/playwright 3.48.0 → 3.48.1
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.
- package/dist/lib/runner-playwright.js +6 -3
- package/package.json +1 -1
- package/postinstall.js +5 -1
|
@@ -75,7 +75,7 @@ class UUVCliPlaywrightRunner {
|
|
|
75
75
|
async prepare(options) {
|
|
76
76
|
try {
|
|
77
77
|
console.log("running preprocessor...");
|
|
78
|
-
this.executeSystemCommand(
|
|
78
|
+
this.executeSystemCommand(`${getUserAgent()} bddgen -c ${this.projectDir}/playwright.config.ts`);
|
|
79
79
|
console.log("preprocessor executed\n");
|
|
80
80
|
}
|
|
81
81
|
catch (e) {
|
|
@@ -148,7 +148,7 @@ class UUVCliPlaywrightRunner {
|
|
|
148
148
|
}
|
|
149
149
|
buildCommand(options, configFile, reporter) {
|
|
150
150
|
return lodash_1.default.trimEnd([
|
|
151
|
-
|
|
151
|
+
getUserAgent(),
|
|
152
152
|
"playwright",
|
|
153
153
|
"test",
|
|
154
154
|
`--project="${options.browser}"`,
|
|
@@ -184,7 +184,7 @@ function executeSystemCommandHelper(command) {
|
|
|
184
184
|
function executePreprocessor(projectDir) {
|
|
185
185
|
console.log("running preprocessor...");
|
|
186
186
|
try {
|
|
187
|
-
executeSystemCommandHelper(
|
|
187
|
+
executeSystemCommandHelper(`${getUserAgent()} bddgen -c ${projectDir}/playwright.config.ts`);
|
|
188
188
|
console.log("preprocessor executed\n");
|
|
189
189
|
return true;
|
|
190
190
|
}
|
|
@@ -193,3 +193,6 @@ function executePreprocessor(projectDir) {
|
|
|
193
193
|
return false;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
+
function getUserAgent() {
|
|
197
|
+
return process.env["npm_config_user_agent"]?.startsWith("yarn") ? "yarn" : "npx";
|
|
198
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/playwright",
|
|
3
|
-
"version": "3.48.
|
|
3
|
+
"version": "3.48.1",
|
|
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",
|
package/postinstall.js
CHANGED
|
@@ -37,10 +37,14 @@ function copyFileIfMissing(fileToCopy, originFolder, destFolder) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function getUserAgent() {
|
|
41
|
+
return process.env["npm_config_user_agent"]?.startsWith("yarn") ? "yarn" : "npx";
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
function main () {
|
|
41
45
|
if (fs.existsSync(`${PROJECT_DIR}/package.json`) && !fs.existsSync(`${PROJECT_DIR}/.no-postinstall`)) {
|
|
42
46
|
copyFileIfMissing("playwright.config.ts", `${TARGET_CONFIG_DIR}`, `${PROJECT_DIR}/uuv`);
|
|
43
|
-
execSync(
|
|
47
|
+
execSync(`${getUserAgent()} playwright install`, { stdio: "inherit" });
|
|
44
48
|
} else {
|
|
45
49
|
console.log("postinstall - Nothing to copy");
|
|
46
50
|
}
|