artes 1.0.86 โ†’ 1.0.88

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.
Files changed (38) hide show
  1. package/README.md +367 -366
  2. package/cucumber.config.js +136 -120
  3. package/docs/functionDefinitions.md +2401 -2401
  4. package/docs/stepDefinitions.md +352 -352
  5. package/executer.js +108 -106
  6. package/index.js +46 -46
  7. package/package.json +50 -50
  8. package/src/helper/contextManager/browserManager.js +71 -70
  9. package/src/helper/contextManager/requestManager.js +30 -30
  10. package/src/helper/executers/cleaner.js +19 -19
  11. package/src/helper/executers/exporter.js +15 -15
  12. package/src/helper/executers/helper.js +77 -74
  13. package/src/helper/executers/projectCreator.js +164 -163
  14. package/src/helper/executers/reportGenerator.js +25 -25
  15. package/src/helper/executers/testRunner.js +30 -30
  16. package/src/helper/executers/versionChecker.js +14 -13
  17. package/src/helper/imports/commons.js +52 -52
  18. package/src/helper/pomController/elementController.js +144 -144
  19. package/src/helper/pomController/pomCollector.js +20 -20
  20. package/src/helper/stepFunctions/APIActions.js +313 -313
  21. package/src/helper/stepFunctions/assertions.js +523 -523
  22. package/src/helper/stepFunctions/browserActions.js +21 -21
  23. package/src/helper/stepFunctions/elementInteractions.js +38 -38
  24. package/src/helper/stepFunctions/exporter.js +19 -19
  25. package/src/helper/stepFunctions/frameActions.js +50 -50
  26. package/src/helper/stepFunctions/keyboardActions.js +41 -41
  27. package/src/helper/stepFunctions/mouseActions.js +145 -145
  28. package/src/helper/stepFunctions/pageActions.js +27 -27
  29. package/src/hooks/context.js +15 -15
  30. package/src/hooks/hooks.js +157 -157
  31. package/src/stepDefinitions/API.steps.js +252 -252
  32. package/src/stepDefinitions/assertions.steps.js +826 -826
  33. package/src/stepDefinitions/browser.steps.js +7 -7
  34. package/src/stepDefinitions/frameActions.steps.js +76 -76
  35. package/src/stepDefinitions/keyboardActions.steps.js +95 -87
  36. package/src/stepDefinitions/mouseActions.steps.js +256 -256
  37. package/src/stepDefinitions/page.steps.js +71 -71
  38. package/src/stepDefinitions/random.steps.js +31 -31
@@ -1,15 +1,15 @@
1
- const { showHelp } = require("./helper");
2
- const { createProject } = require("./projectCreator");
3
- const { generateReport } = require("./reportGenerator");
4
- const { runTests } = require("./testRunner");
5
- const { showVersion } = require("./versionChecker");
6
- const { cleanUp } = require("./cleaner");
7
-
8
- module.exports = {
9
- createProject,
10
- generateReport,
11
- runTests,
12
- showHelp,
13
- showVersion,
14
- cleanUp,
15
- };
1
+ const { showHelp } = require("./helper");
2
+ const { createProject } = require("./projectCreator");
3
+ const { generateReport } = require("./reportGenerator");
4
+ const { runTests } = require("./testRunner");
5
+ const { showVersion } = require("./versionChecker");
6
+ const { cleanUp } = require("./cleaner");
7
+
8
+ module.exports = {
9
+ createProject,
10
+ generateReport,
11
+ runTests,
12
+ showHelp,
13
+ showVersion,
14
+ cleanUp,
15
+ };
@@ -1,74 +1,77 @@
1
- function showHelp() {
2
- console.log(`
3
- ๐Ÿš€ Artes - Playwright Test Runner
4
-
5
- Description:
6
- Artes is a test runner for Playwright that executes Cucumber tests
7
- and can generate Allure reports.
8
-
9
- Usage:
10
- npx artes [options]
11
-
12
- Options:
13
- ๐Ÿ†˜ -h, --help Show this help message
14
- Usage: artes -h or artes --help
15
-
16
- ๐Ÿท๏ธ -v, --version Show current version of artes
17
- Usage: artes -v or artes --version
18
-
19
- ๐Ÿ—๏ธ -c, --create Create example project with artes
20
- Usage: artes -c or artes --create
21
-
22
- โœ… -y, --yes Skip confirmation prompt for creating example project
23
- Usage: artes -c -y or artes --create --yes
24
-
25
- ๐Ÿ“Š -r, --report Run tests and generate Allure report
26
- Usage: artes -r or artes --report
27
-
28
- ๐Ÿ“ --features Specify one or more feature files' relative paths to run (comma-separated)
29
- Usage: artes --features "tests/features/Alma, tests/features/Banan.feature"
30
-
31
- ๐Ÿ”– --tags Run tests with specified Cucumber tags
32
- Usage: artes --tags "@smoke and not @wip"
33
-
34
- ๐ŸŒ --env Set environment for the test run
35
- Usage: artes --env "dev"
36
-
37
- ๐Ÿ•ถ๏ธ --headless Run browser in headless mode
38
- Usage: artes --headless
39
-
40
- โšก --parallel Run tests in parallel mode
41
- Usage: artes --parallel 3
42
-
43
- ๐Ÿ” --retry Retry failed tests
44
- Usage: artes --retry 2
45
-
46
- ๐ŸŽญ --dryrun Perform a dry run without executing tests
47
- Usage: artes --dryrun
48
-
49
- ๐Ÿ“ˆ --percentage Set minimum success percentage to pass test run
50
- Usage: artes --percentage 85
51
-
52
- ๐ŸŒ --browser Specify browser to use (chromium, firefox, webkit)
53
- Usage: artes --browser chromium
54
-
55
- ๐ŸŒ --baseURL Set base URL for the tests
56
- Usage: artes --baseURL "https://example.com"
57
-
58
- ๐Ÿ“ --maxScreen Maximize browser window
59
- Usage: artes --maxScreen
60
-
61
- ๐Ÿ“ --width Set browser width (default: 1280)
62
- Usage: artes --width 1920
63
-
64
- ๐Ÿ“ --height Set browser height (default: 720)
65
- Usage: artes --height 1080
66
-
67
- โฑ๏ธ --timeout Set timeout for each test step (default: 30 seconds)
68
- Usage: artes --timeout 10
69
- `);
70
- }
71
-
72
- module.exports = {
73
- showHelp,
74
- };
1
+ function showHelp() {
2
+ console.log(`
3
+ ๐Ÿš€ Artes - Playwright Test Runner
4
+
5
+ Description:
6
+ Artes is a test runner for Playwright that executes Cucumber tests
7
+ and can generate Allure reports.
8
+
9
+ Usage:
10
+ npx artes [options]
11
+
12
+ Options:
13
+ ๐Ÿ†˜ -h, --help Show this help message
14
+ Usage: artes -h or artes --help
15
+
16
+ ๐Ÿท๏ธ -v, --version Show current version of artes
17
+ Usage: artes -v or artes --version
18
+
19
+ ๐Ÿ—๏ธ -c, --create Create example project with artes
20
+ Usage: artes -c or artes --create
21
+
22
+ โœ… -y, --yes Skip confirmation prompt for creating example project
23
+ Usage: artes -c -y or artes --create --yes
24
+
25
+ ๐Ÿ“Š -r, --report Run tests and generate Allure report
26
+ Usage: artes -r or artes --report
27
+
28
+ ๐Ÿ“ --features Specify one or more feature files' relative paths to run (comma-separated)
29
+ Usage: artes --features "tests/features/Alma, tests/features/Banan.feature"
30
+
31
+ ๐Ÿ”– --tags Run tests with specified Cucumber tags
32
+ Usage: artes --tags "@smoke and not @wip"
33
+
34
+ ๐ŸŒ --env Set environment for the test run
35
+ Usage: artes --env "dev"
36
+
37
+ ๐Ÿ•ถ๏ธ --headless Run browser in headless mode
38
+ Usage: artes --headless
39
+
40
+ โšก --parallel Run tests in parallel mode
41
+ Usage: artes --parallel 3
42
+
43
+ ๐Ÿ” --retry Retry failed tests
44
+ Usage: artes --retry 2
45
+
46
+ ๐ŸŽญ --dryrun Perform a dry run without executing tests
47
+ Usage: artes --dryrun
48
+
49
+ ๐Ÿ“ˆ --percentage Set minimum success percentage to pass test run
50
+ Usage: artes --percentage 85
51
+
52
+ ๐ŸŒ --browser Specify browser to use (chromium, firefox, webkit)
53
+ Usage: artes --browser chromium
54
+
55
+ ๐ŸŒ --baseURL Set base URL for the tests
56
+ Usage: artes --baseURL "https://example.com"
57
+
58
+ ๐Ÿ“ --maxScreen Maximize browser window
59
+ Usage: artes --maxScreen
60
+
61
+ ๐Ÿ“ --width Set browser width (default: 1280)
62
+ Usage: artes --width 1920
63
+
64
+ ๐Ÿ“ --height Set browser height (default: 720)
65
+ Usage: artes --height 1080
66
+
67
+ โฑ๏ธ --timeout Set timeout for each test step (default: 30 seconds)
68
+ Usage: artes --timeout 10
69
+
70
+ ๐Ÿข --slowmo Slow down text execution for clear view (default: 0ms)
71
+ Usage: artes --slowmo 1000
72
+ `);
73
+ }
74
+
75
+ module.exports = {
76
+ showHelp,
77
+ };
@@ -1,163 +1,164 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require("fs");
4
- const path = require("path");
5
- const { execSync } = require("child_process");
6
-
7
- function createProject(createYes) {
8
- const projectDir = path.join(process.cwd(), "artes");
9
- const srcDir = path.join(projectDir, "tests");
10
-
11
- [
12
- projectDir,
13
- path.join(srcDir, "features"),
14
- path.join(srcDir, "POMs"),
15
- path.join(srcDir, "steps"),
16
- path.join(projectDir, ".vscode"),
17
- ].forEach((dir) => fs.mkdirSync(dir, { recursive: true }));
18
-
19
- process.chdir(projectDir);
20
-
21
- console.log("๐Ÿš€ Initializing project...");
22
- execSync(`npm init ${createYes ? "-y" : ""}`, { stdio: "inherit" });
23
- execSync("npm i artes", { stdio: "inherit" });
24
-
25
- console.log("๐Ÿ“ฆ Setting up browsers...");
26
- execSync("npx playwright install", { stdio: "inherit" });
27
-
28
- const packageJsonPath = path.join(projectDir, "package.json");
29
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
30
-
31
- packageJson.scripts = {
32
- test: "npx artes",
33
- testWithReport: "npx artes -r",
34
- };
35
-
36
- fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
37
-
38
- const config = `module.exports = {
39
- headless: false, // Set to true for headless browser mode
40
-
41
- // Configuration options:
42
- // env: "", // string - Environment name for tests
43
- // testPercentage: 0, // number - Minimum success rate percentage(Default: 0)
44
- // baseURL: "", // string - Base URL for API tests
45
- // paths: [], // string[] - Paths to feature files
46
- // steps: "", // string - Step definitions files
47
- // pomPath: "", // string - Path to POM files
48
- // timeout : 0, // number - Test timeout in seconds
49
- // parallel: 0, // number - Number of parallel workers
50
- // format: [], // string[] - Formatter names/paths
51
- // formatOptions: {}, // object - Formatter options
52
- // retry: 0, // number - Retry attempts for failing tests
53
- // tags: "", // string - Tag expression to filter scenarios
54
- // backtrace: false, // boolean - Show full backtrace for errors
55
- // dryRun: false, // boolean - Prepare test run without execution
56
- // browser: "chrome", // "chrome", "firefox", "webkit"
57
- // width: 1280, // number - Browser width
58
- // height: 720, // number - Browser height
59
- // maximizeScreen: true // boolean - Maximize browser window
60
- // forceExit: false, // boolean - Force process.exit() after tests
61
- // failFast: false, // boolean - Stop on first test failure
62
- // import: [], // string[] - Support code paths
63
- // language: "en", // string - Default feature file language
64
- // loader: [], // string[] - Module loader specifications
65
- // name: [], // string[] - Run scenarios matching regex
66
- // order: "defined", // string - Run order (defined/random)
67
- // publish: false, // boolean - Publish to cucumber.io
68
- // requireModule: [], // string[] - Transpilation module names
69
- // retryTagFilter: "", // string - Tag expression for retries
70
- // strict: true, // boolean - Fail on pending steps
71
- // worldParameters: {} // object - World constructor parameters
72
- };
73
- `;
74
-
75
- const featureContent = `Feature: Shopping on SauceDemo ๐Ÿ›’
76
-
77
- Background: Login on SauceDemo
78
- Given User is on home page of SauceDemo
79
- And User types "standard_user" in "username_input"
80
- And User types "secret_sauce" in "password_input"
81
- And User clicks "#login-button"
82
-
83
- Scenario Outline: Success Shopping
84
- And User expects the page url should be "https://www.saucedemo.com/inventory.html"
85
- And User clicks "product_title"
86
- And User clicks "add_to_cart_button"
87
- And User clicks "cart_button"
88
- Then User expects "item_price" should have "$29.99" text
89
-
90
- Scenario Outline: Failed Shopping
91
- And User expects the page url should be "https://www.saucedemo.com/inventory.html"
92
- And User clicks "product_title"
93
- And User clicks "add_to_cart_button"
94
- And User clicks "cart_button"
95
- Then User expects "item_price" should not have "$29.99" text
96
-
97
- `;
98
-
99
- const pomContent = JSON.stringify(
100
- {
101
- username_input: { selector: "#user-name" },
102
- password_input: "#password",
103
- login_button: "#login-button",
104
- product_title:
105
- "xpath=/html/body/div/div/div/div[2]/div/div/div/div[1]/div[2]/div[1]/a/div",
106
- add_to_cart_button: "#add-to-cart",
107
- cart_button: ".shopping_cart_link",
108
- item_price: ".inventory_item_price",
109
- },
110
- null,
111
- 2,
112
- );
113
-
114
- const stepsContent = `
115
- const {Given,context} = require("artes");
116
-
117
- // Example step definition
118
- Given("User is on home page of SauceDemo", async () => {
119
- await context.page.goto("https://www.saucedemo.com/");
120
- });
121
- `;
122
-
123
- const vsCodeExtension = JSON.stringify({
124
- recommendations: ["CucumberOpen.cucumber-official"],
125
- });
126
-
127
- const vsCodeSettings = JSON.stringify({
128
- "cucumber.glue": [
129
- "tests/steps/*.{ts,js}",
130
- "node_modules/artes/src/stepDefinitions/*.{ts,js}",
131
- ],
132
- "cucumber.features": ["tests/features/**/*.feature"],
133
- "cucumberautocomplete.syncfeatures": true,
134
- "cucumberautocomplete.strictGherkinCompletion": true,
135
- });
136
-
137
- console.log("๐Ÿ“‚ Creating project files...");
138
-
139
- fs.writeFileSync(path.join(projectDir, "artes.config.js"), config, "utf-8");
140
- fs.writeFileSync(
141
- path.join(srcDir, "features", "example.feature"),
142
- featureContent,
143
- );
144
- fs.writeFileSync(path.join(srcDir, "POMs", "example.pom.json"), pomContent);
145
- fs.writeFileSync(path.join(srcDir, "steps", "common.steps.js"), stepsContent);
146
-
147
- fs.writeFileSync(
148
- path.join(projectDir, ".vscode", "settings.json"),
149
- vsCodeSettings,
150
- );
151
-
152
- fs.writeFileSync(
153
- path.join(projectDir, ".vscode", "extensions.json"),
154
- vsCodeExtension,
155
- );
156
-
157
- console.log(`โœจ Project created successfully in ${projectDir}!`);
158
- console.log("Happy Testing ๐ŸŽ‰");
159
- }
160
-
161
- module.exports = {
162
- createProject,
163
- };
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const { execSync } = require("child_process");
6
+
7
+ function createProject(createYes) {
8
+ const projectDir = path.join(process.cwd(), "artes");
9
+ const srcDir = path.join(projectDir, "tests");
10
+
11
+ [
12
+ projectDir,
13
+ path.join(srcDir, "features"),
14
+ path.join(srcDir, "POMs"),
15
+ path.join(srcDir, "steps"),
16
+ path.join(projectDir, ".vscode"),
17
+ ].forEach((dir) => fs.mkdirSync(dir, { recursive: true }));
18
+
19
+ process.chdir(projectDir);
20
+
21
+ console.log("๐Ÿš€ Initializing project...");
22
+ execSync(`npm init ${createYes ? "-y" : ""}`, { stdio: "inherit" });
23
+ execSync("npm i artes", { stdio: "inherit" });
24
+
25
+ console.log("๐Ÿ“ฆ Setting up browsers...");
26
+ execSync("npx playwright install", { stdio: "inherit" });
27
+
28
+ const packageJsonPath = path.join(projectDir, "package.json");
29
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
30
+
31
+ packageJson.scripts = {
32
+ test: "npx artes",
33
+ testWithReport: "npx artes -r",
34
+ };
35
+
36
+ fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
37
+
38
+ const config = `module.exports = {
39
+ headless: false, // Set to true for headless browser mode
40
+
41
+ // Configuration options:
42
+ // env: "", // string - Environment name for tests
43
+ // testPercentage: 0, // number - Minimum success rate percentage(Default: 0)
44
+ // baseURL: "", // string - Base URL for API tests
45
+ // paths: [], // string[] - Paths to feature files
46
+ // steps: "", // string - Step definitions files
47
+ // pomPath: "", // string - Path to POM files
48
+ // timeout : 0, // number - Test timeout in seconds
49
+ // slowmo: 0, // number - Slow down test execution (Default: 0ms)
50
+ // parallel: 0, // number - Number of parallel workers
51
+ // format: [], // string[] - Formatter names/paths
52
+ // formatOptions: {}, // object - Formatter options
53
+ // retry: 0, // number - Retry attempts for failing tests
54
+ // tags: "", // string - Tag expression to filter scenarios
55
+ // backtrace: false, // boolean - Show full backtrace for errors
56
+ // dryRun: false, // boolean - Prepare test run without execution
57
+ // browser: "chrome", // "chrome", "firefox", "webkit"
58
+ // width: 1280, // number - Browser width
59
+ // height: 720, // number - Browser height
60
+ // maximizeScreen: true // boolean - Maximize browser window
61
+ // forceExit: false, // boolean - Force process.exit() after tests
62
+ // failFast: false, // boolean - Stop on first test failure
63
+ // import: [], // string[] - Support code paths
64
+ // language: "en", // string - Default feature file language
65
+ // loader: [], // string[] - Module loader specifications
66
+ // name: [], // string[] - Run scenarios matching regex
67
+ // order: "defined", // string - Run order (defined/random)
68
+ // publish: false, // boolean - Publish to cucumber.io
69
+ // requireModule: [], // string[] - Transpilation module names
70
+ // retryTagFilter: "", // string - Tag expression for retries
71
+ // strict: true, // boolean - Fail on pending steps
72
+ // worldParameters: {} // object - World constructor parameters
73
+ };
74
+ `;
75
+
76
+ const featureContent = `Feature: Shopping on SauceDemo ๐Ÿ›’
77
+
78
+ Background: Login on SauceDemo
79
+ Given User is on home page of SauceDemo
80
+ And User types "standard_user" in "username_input"
81
+ And User types "secret_sauce" in "password_input"
82
+ And User clicks "#login-button"
83
+
84
+ Scenario Outline: Success Shopping
85
+ And User expects to be in "https://www.saucedemo.com/inventory.html" page
86
+ And User clicks "product_title"
87
+ And User clicks "add_to_cart_button"
88
+ And User clicks "cart_button"
89
+ Then User expects "item_price" should have "$29.99" text
90
+
91
+ Scenario Outline: Failed Shopping
92
+ And User expects to be in "https://www.saucedemo.com/inventory.html" page
93
+ And User clicks "product_title"
94
+ And User clicks "add_to_cart_button"
95
+ And User clicks "cart_button"
96
+ Then User expects "item_price" should not have "$29.99" text
97
+
98
+ `;
99
+
100
+ const pomContent = JSON.stringify(
101
+ {
102
+ username_input: { selector: "#user-name" },
103
+ password_input: "#password",
104
+ login_button: "#login-button",
105
+ product_title:
106
+ "xpath=/html/body/div/div/div/div[2]/div/div/div/div[1]/div[2]/div[1]/a/div",
107
+ add_to_cart_button: "#add-to-cart",
108
+ cart_button: ".shopping_cart_link",
109
+ item_price: ".inventory_item_price",
110
+ },
111
+ null,
112
+ 2,
113
+ );
114
+
115
+ const stepsContent = `
116
+ const {Given,context} = require("artes");
117
+
118
+ // Example step definition
119
+ Given("User is on home page of SauceDemo", async () => {
120
+ await context.page.goto("https://www.saucedemo.com/");
121
+ });
122
+ `;
123
+
124
+ const vsCodeExtension = JSON.stringify({
125
+ recommendations: ["CucumberOpen.cucumber-official"],
126
+ });
127
+
128
+ const vsCodeSettings = JSON.stringify({
129
+ "cucumber.glue": [
130
+ "tests/steps/*.{ts,js}",
131
+ "node_modules/artes/src/stepDefinitions/*.{ts,js}",
132
+ ],
133
+ "cucumber.features": ["tests/features/**/*.feature"],
134
+ "cucumberautocomplete.syncfeatures": true,
135
+ "cucumberautocomplete.strictGherkinCompletion": true,
136
+ });
137
+
138
+ console.log("๐Ÿ“‚ Creating project files...");
139
+
140
+ fs.writeFileSync(path.join(projectDir, "artes.config.js"), config, "utf-8");
141
+ fs.writeFileSync(
142
+ path.join(srcDir, "features", "example.feature"),
143
+ featureContent,
144
+ );
145
+ fs.writeFileSync(path.join(srcDir, "POMs", "example.pom.json"), pomContent);
146
+ fs.writeFileSync(path.join(srcDir, "steps", "common.steps.js"), stepsContent);
147
+
148
+ fs.writeFileSync(
149
+ path.join(projectDir, ".vscode", "settings.json"),
150
+ vsCodeSettings,
151
+ );
152
+
153
+ fs.writeFileSync(
154
+ path.join(projectDir, ".vscode", "extensions.json"),
155
+ vsCodeExtension,
156
+ );
157
+
158
+ console.log(`โœจ Project created successfully in ${projectDir}!`);
159
+ console.log("Happy Testing ๐ŸŽ‰");
160
+ }
161
+
162
+ module.exports = {
163
+ createProject,
164
+ };
@@ -1,25 +1,25 @@
1
- const { spawnSync } = require("child_process");
2
- const { moduleConfig } = require("../imports/commons");
3
-
4
- function generateReport() {
5
- try {
6
- console.log("๐Ÿ“Š Generating report...");
7
-
8
- spawnSync("npm", ["run", "testWithReport", moduleConfig.reportPath], {
9
- cwd: moduleConfig.modulePath,
10
- stdio: "ignore",
11
- shell: true,
12
- });
13
-
14
- console.log(
15
- `๐Ÿ“‹ Report generated successfully in ${moduleConfig.reportPath}!`,
16
- );
17
- } catch (error) {
18
- console.error("โŒ Report generation failed:", error);
19
- process.env.EXIT_CODE = 1;
20
- }
21
- }
22
-
23
- module.exports = {
24
- generateReport,
25
- };
1
+ const { spawnSync } = require("child_process");
2
+ const { moduleConfig } = require("../imports/commons");
3
+
4
+ function generateReport() {
5
+ try {
6
+ console.log("๐Ÿ“Š Generating report...");
7
+
8
+ spawnSync("npm", ["run", "testWithReport", moduleConfig.reportPath], {
9
+ cwd: moduleConfig.modulePath,
10
+ stdio: "ignore",
11
+ shell: true,
12
+ });
13
+
14
+ console.log(
15
+ `๐Ÿ“‹ Report generated successfully in ${moduleConfig.reportPath}!`,
16
+ );
17
+ } catch (error) {
18
+ console.error("โŒ Report generation failed:", error);
19
+ process.env.EXIT_CODE = 1;
20
+ }
21
+ }
22
+
23
+ module.exports = {
24
+ generateReport,
25
+ };
@@ -1,30 +1,30 @@
1
- const { spawnSync } = require("child_process");
2
- const { moduleConfig } = require("../imports/commons");
3
-
4
- function runTests() {
5
- try {
6
- console.log("๐Ÿงช Running tests...");
7
- process.env.FORCE_COLOR = "1";
8
- process.env.FORCE_STDIO_TTY = "1";
9
-
10
- spawnSync("cucumber-js", ["--config=cucumber.config.js"], {
11
- cwd: moduleConfig.modulePath,
12
- stdio: "inherit",
13
- shell: true,
14
- env: {
15
- ...process.env,
16
- FORCE_TTY: "1",
17
- FORCE_COLOR: "1",
18
- CI: "false",
19
- },
20
- });
21
- console.log("โœ… Tests running completed successfully!");
22
- } catch (error) {
23
- console.error("โŒ Test execution failed:", error);
24
- process.env.EXIT_CODE = 1;
25
- }
26
- }
27
-
28
- module.exports = {
29
- runTests,
30
- };
1
+ const { spawnSync } = require("child_process");
2
+ const { moduleConfig } = require("../imports/commons");
3
+
4
+ function runTests() {
5
+ try {
6
+ console.log("๐Ÿงช Running tests...");
7
+ process.env.FORCE_COLOR = "1";
8
+ process.env.FORCE_STDIO_TTY = "1";
9
+
10
+ spawnSync("cucumber-js", ["--config=cucumber.config.js"], {
11
+ cwd: moduleConfig.modulePath,
12
+ stdio: "inherit",
13
+ shell: true,
14
+ env: {
15
+ ...process.env,
16
+ FORCE_TTY: "1",
17
+ FORCE_COLOR: "1",
18
+ CI: "false",
19
+ },
20
+ });
21
+ console.log("โœ… Tests running completed successfully!");
22
+ } catch (error) {
23
+ console.error("โŒ Test execution failed:", error);
24
+ process.env.EXIT_CODE = 1;
25
+ }
26
+ }
27
+
28
+ module.exports = {
29
+ runTests,
30
+ };