@uuv/playwright 3.0.1 → 3.1.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.
@@ -28,4 +28,4 @@ export declare class UUVCliPlaywrightRunner implements UUVCliRunner {
28
28
  private buildCommand;
29
29
  private executeSystemCommand;
30
30
  }
31
- export declare function executePreprocessor(): void;
31
+ export declare function executePreprocessor(projectDir: string): void;
@@ -50,7 +50,7 @@ class UUVCliPlaywrightRunner {
50
50
  projectDir;
51
51
  tempDir;
52
52
  name = "Playwright";
53
- defaultBrowser = "chromium";
53
+ defaultBrowser = "chrome";
54
54
  constructor(projectDir, tempDir) {
55
55
  this.projectDir = projectDir;
56
56
  this.tempDir = tempDir;
@@ -118,7 +118,7 @@ class UUVCliPlaywrightRunner {
118
118
  "npx",
119
119
  "playwright",
120
120
  "test",
121
- `--project=${options.browser}`,
121
+ `--project="${options.browser}"`,
122
122
  "-c",
123
123
  configFile,
124
124
  lodash_1.default.trimStart([
@@ -140,9 +140,9 @@ function executeSystemCommandHelper(command) {
140
140
  console.log(chalk_1.default.gray(`Running command: ${command}`));
141
141
  (0, child_process_1.execSync)(command, { stdio: "inherit" });
142
142
  }
143
- function executePreprocessor() {
143
+ function executePreprocessor(projectDir) {
144
144
  console.log("running preprocessor...");
145
- executeSystemCommandHelper("npx bddgen");
145
+ executeSystemCommandHelper(`npx bddgen -c ${projectDir}/playwright.config.ts`);
146
146
  console.log("preprocessor executed\n");
147
147
  }
148
148
  exports.executePreprocessor = executePreprocessor;
@@ -31,16 +31,16 @@ chokidar_1.default.watch(`${projectDir}/e2e/**/*.feature`, {
31
31
  })
32
32
  .on("change", () => {
33
33
  console.log(chalk_1.default.yellowBright("\nRefreshing test files..."));
34
- (0, runner_playwright_1.executePreprocessor)();
34
+ (0, runner_playwright_1.executePreprocessor)(projectDir);
35
35
  console.log(chalk_1.default.yellowBright("Test files refreshed\n"));
36
36
  })
37
37
  .on("add", path => {
38
38
  console.log(chalk_1.default.yellowBright(`\nFile ${path} has been added`));
39
- (0, runner_playwright_1.executePreprocessor)();
39
+ (0, runner_playwright_1.executePreprocessor)(projectDir);
40
40
  console.log(chalk_1.default.yellowBright("Test files refreshed\n"));
41
41
  })
42
42
  .on("unlink", path => {
43
43
  console.log(chalk_1.default.yellowBright(`\nFile ${path} has been removed`));
44
- (0, runner_playwright_1.executePreprocessor)();
44
+ (0, runner_playwright_1.executePreprocessor)(projectDir);
45
45
  console.log(chalk_1.default.yellowBright("Test files refreshed\n"));
46
46
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/playwright",
3
- "version": "3.0.1",
3
+ "version": "3.1.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",
@@ -44,7 +44,7 @@
44
44
  "dependencies": {
45
45
  "@cucumber/tag-expressions": "^6.0.0",
46
46
  "@playwright/test": "^1.44.1",
47
- "@uuv/runner-commons": "2.16.3",
47
+ "@uuv/runner-commons": "2.16.4",
48
48
  "axe-core": "4.9.1",
49
49
  "axe-playwright": "2.0.1",
50
50
  "chalk-table": "^1.0.2",
@@ -46,11 +46,11 @@ export default defineConfig({
46
46
 
47
47
  /* Test against branded browsers. */
48
48
  {
49
- name: "Microsoft Edge",
49
+ name: "edge",
50
50
  use: { ...devices["Desktop Edge"], channel: "msedge" },
51
51
  },
52
52
  {
53
- name: "Google Chrome",
53
+ name: "chrome",
54
54
  use: { ...devices["Desktop Chrome"], channel: "chrome" },
55
55
  },
56
56
  ],