artes 1.7.19 โ†’ 1.7.21

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 (49) hide show
  1. package/README.md +781 -781
  2. package/assets/styles.css +4 -4
  3. package/cucumber.config.js +253 -253
  4. package/docs/ciExecutors.md +198 -198
  5. package/docs/emulationDevicesList.md +152 -152
  6. package/docs/functionDefinitions.md +2401 -2401
  7. package/docs/stepDefinitions.md +435 -435
  8. package/executer.js +266 -266
  9. package/index.js +51 -51
  10. package/package.json +56 -56
  11. package/src/helper/contextManager/browserManager.js +74 -74
  12. package/src/helper/contextManager/requestManager.js +23 -23
  13. package/src/helper/controller/elementController.js +230 -230
  14. package/src/helper/controller/findDuplicateTestNames.js +69 -69
  15. package/src/helper/controller/getEnvInfo.js +97 -97
  16. package/src/helper/controller/getExecutor.js +109 -109
  17. package/src/helper/controller/pomCollector.js +83 -83
  18. package/src/helper/controller/reportCustomizer.js +511 -511
  19. package/src/helper/controller/screenComparer.js +96 -96
  20. package/src/helper/controller/status-formatter.js +137 -137
  21. package/src/helper/controller/testCoverageCalculator.js +111 -111
  22. package/src/helper/executers/cleaner.js +23 -23
  23. package/src/helper/executers/exporter.js +19 -19
  24. package/src/helper/executers/helper.js +193 -193
  25. package/src/helper/executers/projectCreator.js +226 -226
  26. package/src/helper/executers/reportGenerator.js +91 -91
  27. package/src/helper/executers/testRunner.js +28 -28
  28. package/src/helper/executers/versionChecker.js +31 -31
  29. package/src/helper/imports/commons.js +69 -69
  30. package/src/helper/stepFunctions/APIActions.js +582 -582
  31. package/src/helper/stepFunctions/assertions.js +986 -986
  32. package/src/helper/stepFunctions/browserActions.js +87 -87
  33. package/src/helper/stepFunctions/elementInteractions.js +60 -60
  34. package/src/helper/stepFunctions/exporter.js +19 -19
  35. package/src/helper/stepFunctions/frameActions.js +72 -72
  36. package/src/helper/stepFunctions/keyboardActions.js +66 -66
  37. package/src/helper/stepFunctions/mouseActions.js +84 -84
  38. package/src/helper/stepFunctions/pageActions.js +43 -43
  39. package/src/hooks/context.js +18 -18
  40. package/src/hooks/hooks.js +287 -287
  41. package/src/stepDefinitions/API.steps.js +404 -404
  42. package/src/stepDefinitions/assertions.steps.js +1358 -1351
  43. package/src/stepDefinitions/browser.steps.js +74 -74
  44. package/src/stepDefinitions/frameActions.steps.js +76 -76
  45. package/src/stepDefinitions/keyboardActions.steps.js +264 -264
  46. package/src/stepDefinitions/mouseActions.steps.js +374 -374
  47. package/src/stepDefinitions/page.steps.js +71 -71
  48. package/src/stepDefinitions/random.steps.js +199 -199
  49. package/src/stepDefinitions/report.steps.js +5 -5
@@ -1,28 +1,28 @@
1
- const { spawnSync } = require("child_process");
2
- const { moduleConfig } = require("../imports/commons");
3
-
4
- function runTests() {
5
- try {
6
- console.log("๐Ÿงช Running tests...");
7
-
8
- spawnSync("cucumber-js", ["--config=cucumber.config.js"], {
9
- cwd: moduleConfig.modulePath,
10
- stdio: "inherit",
11
- shell: true,
12
- env: {
13
- ...process.env,
14
- FORCE_TTY: "1",
15
- FORCE_COLOR: "1",
16
- CI: "false",
17
- },
18
- });
19
- console.log("โœ… Tests running completed successfully!");
20
- } catch (error) {
21
- console.error("โŒ Test execution failed:", error);
22
- process.env.EXIT_CODE = 1;
23
- }
24
- }
25
-
26
- module.exports = {
27
- runTests,
28
- };
1
+ const { spawnSync } = require("child_process");
2
+ const { moduleConfig } = require("../imports/commons");
3
+
4
+ function runTests() {
5
+ try {
6
+ console.log("๐Ÿงช Running tests...");
7
+
8
+ spawnSync("cucumber-js", ["--config=cucumber.config.js"], {
9
+ cwd: moduleConfig.modulePath,
10
+ stdio: "inherit",
11
+ shell: true,
12
+ env: {
13
+ ...process.env,
14
+ FORCE_TTY: "1",
15
+ FORCE_COLOR: "1",
16
+ CI: "false",
17
+ },
18
+ });
19
+ console.log("โœ… Tests running completed successfully!");
20
+ } catch (error) {
21
+ console.error("โŒ Test execution failed:", error);
22
+ process.env.EXIT_CODE = 1;
23
+ }
24
+ }
25
+
26
+ module.exports = {
27
+ runTests,
28
+ };
@@ -1,31 +1,31 @@
1
- const { execSync } = require("child_process");
2
- const path = require("path");
3
- const fs = require("fs");
4
-
5
- function showVersion() {
6
- try {
7
- const localPath = path.join(
8
- process.cwd(),
9
- "node_modules",
10
- "artes",
11
- "package.json",
12
- );
13
- const localData = fs.readFileSync(localPath, "utf8");
14
- const localArtes = JSON.parse(localData);
15
- console.log(`ARTES Version: ${localArtes.version}`);
16
- return;
17
- } catch (err) {}
18
-
19
- try {
20
- const globalRoot = execSync("npm root -g").toString().trim();
21
- const globalPath = path.join(globalRoot, "artes", "package.json");
22
- const globalData = fs.readFileSync(globalPath, "utf8");
23
- const globalArtes = JSON.parse(globalData);
24
- console.log(`ARTES Version: ${globalArtes.version}`);
25
- return;
26
- } catch (err) {}
27
- }
28
-
29
- module.exports = {
30
- showVersion,
31
- };
1
+ const { execSync } = require("child_process");
2
+ const path = require("path");
3
+ const fs = require("fs");
4
+
5
+ function showVersion() {
6
+ try {
7
+ const localPath = path.join(
8
+ process.cwd(),
9
+ "node_modules",
10
+ "artes",
11
+ "package.json",
12
+ );
13
+ const localData = fs.readFileSync(localPath, "utf8");
14
+ const localArtes = JSON.parse(localData);
15
+ console.log(`ARTES Version: ${localArtes.version}`);
16
+ return;
17
+ } catch (err) {}
18
+
19
+ try {
20
+ const globalRoot = execSync("npm root -g").toString().trim();
21
+ const globalPath = path.join(globalRoot, "artes", "package.json");
22
+ const globalData = fs.readFileSync(globalPath, "utf8");
23
+ const globalArtes = JSON.parse(globalData);
24
+ console.log(`ARTES Version: ${globalArtes.version}`);
25
+ return;
26
+ } catch (err) {}
27
+ }
28
+
29
+ module.exports = {
30
+ showVersion,
31
+ };
@@ -1,69 +1,69 @@
1
- const { expect } = require("playwright/test");
2
- const { Given, When, Then } = require("@cucumber/cucumber");
3
- const {
4
- getElement,
5
- getSelector,
6
- extractVarsFromResponse,
7
- pathToCamelCase,
8
- saveVar,
9
- resolveVariable,
10
- normalizeCrossplatformPath
11
- } = require("../controller/elementController");
12
- const { context } = require("../../hooks/context");
13
-
14
- const { faker } = require("@faker-js/faker");
15
- const dayjs = require("dayjs");
16
-
17
- const element = getElement;
18
- const selector = getSelector;
19
- const browserPage = context.page;
20
- const request = context.request;
21
-
22
- const random = faker;
23
- const time = dayjs;
24
-
25
- const path = require("path");
26
- const projectPath = path.resolve(__dirname, "../../../../../");
27
- const modulePath = path.join(projectPath, "node_modules", "artes");
28
-
29
- const moduleConfig = {
30
- projectPath: projectPath,
31
- modulePackageJsonPath: path.join(modulePath, "package.json"),
32
- modulePath: modulePath,
33
- reportPath: path.join(projectPath, "report"),
34
- tracerPath: path.join(projectPath, "trace.zip"),
35
- cucumberConfigPath: path.join(projectPath, "artes.config.js"),
36
- featuresPath: path.join(projectPath, "tests", "features"),
37
- stepsPath: path.join(projectPath, "tests", "steps", "*.js"),
38
- pomPath: path.join(projectPath, "tests", "POMs"),
39
- cleanUpPaths: [
40
- "allure-result",
41
- "allure-results",
42
- "test-results",
43
- "@rerun.txt",
44
- "test-status",
45
- "null",
46
- "pomDuplicateWarnings.json",
47
- "browser-info.json",
48
- ],
49
- };
50
-
51
- module.exports = {
52
- expect,
53
- Given,
54
- When,
55
- Then,
56
- element,
57
- selector,
58
- extractVarsFromResponse,
59
- pathToCamelCase,
60
- normalizeCrossplatformPath,
61
- saveVar,
62
- resolveVariable,
63
- random,
64
- time,
65
- browserPage,
66
- request,
67
- context,
68
- moduleConfig,
69
- };
1
+ const { expect } = require("playwright/test");
2
+ const { Given, When, Then } = require("@cucumber/cucumber");
3
+ const {
4
+ getElement,
5
+ getSelector,
6
+ extractVarsFromResponse,
7
+ pathToCamelCase,
8
+ saveVar,
9
+ resolveVariable,
10
+ normalizeCrossplatformPath
11
+ } = require("../controller/elementController");
12
+ const { context } = require("../../hooks/context");
13
+
14
+ const { faker } = require("@faker-js/faker");
15
+ const dayjs = require("dayjs");
16
+
17
+ const element = getElement;
18
+ const selector = getSelector;
19
+ const browserPage = context.page;
20
+ const request = context.request;
21
+
22
+ const random = faker;
23
+ const time = dayjs;
24
+
25
+ const path = require("path");
26
+ const projectPath = path.resolve(__dirname, "../../../../../");
27
+ const modulePath = path.join(projectPath, "node_modules", "artes");
28
+
29
+ const moduleConfig = {
30
+ projectPath: projectPath,
31
+ modulePackageJsonPath: path.join(modulePath, "package.json"),
32
+ modulePath: modulePath,
33
+ reportPath: path.join(projectPath, "report"),
34
+ tracerPath: path.join(projectPath, "trace.zip"),
35
+ cucumberConfigPath: path.join(projectPath, "artes.config.js"),
36
+ featuresPath: path.join(projectPath, "tests", "features"),
37
+ stepsPath: path.join(projectPath, "tests", "steps", "*.js"),
38
+ pomPath: path.join(projectPath, "tests", "POMs"),
39
+ cleanUpPaths: [
40
+ "allure-result",
41
+ "allure-results",
42
+ "test-results",
43
+ "@rerun.txt",
44
+ "test-status",
45
+ "null",
46
+ "pomDuplicateWarnings.json",
47
+ "browser-info.json",
48
+ ],
49
+ };
50
+
51
+ module.exports = {
52
+ expect,
53
+ Given,
54
+ When,
55
+ Then,
56
+ element,
57
+ selector,
58
+ extractVarsFromResponse,
59
+ pathToCamelCase,
60
+ normalizeCrossplatformPath,
61
+ saveVar,
62
+ resolveVariable,
63
+ random,
64
+ time,
65
+ browserPage,
66
+ request,
67
+ context,
68
+ moduleConfig,
69
+ };