artes 1.7.4 → 1.7.6

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 (48) hide show
  1. package/README.md +781 -779
  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 -433
  8. package/executer.js +266 -264
  9. package/index.js +50 -50
  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 +210 -210
  14. package/src/helper/controller/findDuplicateTestNames.js +69 -69
  15. package/src/helper/controller/getEnvInfo.js +94 -94
  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 +485 -485
  19. package/src/helper/controller/screenComparer.js +97 -108
  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 -191
  25. package/src/helper/executers/projectCreator.js +226 -222
  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 +65 -65
  30. package/src/helper/stepFunctions/APIActions.js +495 -495
  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 +15 -15
  40. package/src/hooks/hooks.js +287 -279
  41. package/src/stepDefinitions/API.steps.js +310 -310
  42. package/src/stepDefinitions/assertions.steps.js +1303 -1280
  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 +378 -378
  47. package/src/stepDefinitions/page.steps.js +71 -71
  48. package/src/stepDefinitions/random.steps.js +191 -191
@@ -1,84 +1,84 @@
1
- const path = require("path");
2
- const {
3
- element,
4
- context,
5
- selector,
6
- moduleConfig,
7
- resolveVariable,
8
- } = require("../imports/commons");
9
-
10
- const mouse = {
11
- click: async (selector, options) => {
12
- options = options ?? {};
13
-
14
- await element(selector).click(options);
15
- },
16
- doubleClick: async (selector, options) => {
17
- options = options ?? {};
18
-
19
- await element(selector).dblclick(options);
20
- },
21
- hover: async (selector, options) => {
22
- options = options ?? {};
23
-
24
- await element(selector).hover(options);
25
- },
26
- focus: async (selector, options) => {
27
- options = options ?? {};
28
-
29
- await element(selector).focus(options);
30
- },
31
- dragAndDrop: async (sourceSelector, targetSelector, options) => {
32
- options = options ?? {};
33
-
34
- const source = await element(sourceSelector);
35
- const target = await element(targetSelector);
36
- await source.dragTo(target, options);
37
- },
38
- selectByValue: async (selector, value, options) => {
39
- options = options ?? {};
40
-
41
- value = await resolveVariable(value);
42
-
43
- value !== "" ? await element(selector).selectOption(value, options) : "";
44
- },
45
- selectByText: async (selector, text, options) => {
46
- options = options ?? {};
47
-
48
- text = await resolveVariable(text);
49
-
50
- text !== "" ? await element(selector).selectOption(text, options) : "";
51
- },
52
- check: async (selector, options) => {
53
- options = options ?? {};
54
-
55
- await element(selector).check(options);
56
- },
57
- uncheck: async (selector, options) => {
58
- options = options ?? {};
59
-
60
- await element(selector).uncheck(options);
61
- },
62
- scrollIntoViewIfNeeded: async (selector, options) => {
63
- options = options ?? {};
64
-
65
- await element(selector).scrollIntoViewIfNeeded(options);
66
- },
67
- upload: async (filePath, fileInput, options) => {
68
- options = options ?? {};
69
-
70
- filePath = await resolveVariable(filePath);
71
- const file = selector(filePath);
72
- const fileChooserPromise = context.page.waitForEvent("filechooser");
73
- await element(fileInput).click();
74
- const fileChooser = await fileChooserPromise;
75
- await fileChooser.setFiles(
76
- path.join(moduleConfig.projectPath, file),
77
- options,
78
- );
79
- },
80
- };
81
-
82
- module.exports = {
83
- mouse,
84
- };
1
+ const path = require("path");
2
+ const {
3
+ element,
4
+ context,
5
+ selector,
6
+ moduleConfig,
7
+ resolveVariable,
8
+ } = require("../imports/commons");
9
+
10
+ const mouse = {
11
+ click: async (selector, options) => {
12
+ options = options ?? {};
13
+
14
+ await element(selector).click(options);
15
+ },
16
+ doubleClick: async (selector, options) => {
17
+ options = options ?? {};
18
+
19
+ await element(selector).dblclick(options);
20
+ },
21
+ hover: async (selector, options) => {
22
+ options = options ?? {};
23
+
24
+ await element(selector).hover(options);
25
+ },
26
+ focus: async (selector, options) => {
27
+ options = options ?? {};
28
+
29
+ await element(selector).focus(options);
30
+ },
31
+ dragAndDrop: async (sourceSelector, targetSelector, options) => {
32
+ options = options ?? {};
33
+
34
+ const source = await element(sourceSelector);
35
+ const target = await element(targetSelector);
36
+ await source.dragTo(target, options);
37
+ },
38
+ selectByValue: async (selector, value, options) => {
39
+ options = options ?? {};
40
+
41
+ value = await resolveVariable(value);
42
+
43
+ value !== "" ? await element(selector).selectOption(value, options) : "";
44
+ },
45
+ selectByText: async (selector, text, options) => {
46
+ options = options ?? {};
47
+
48
+ text = await resolveVariable(text);
49
+
50
+ text !== "" ? await element(selector).selectOption(text, options) : "";
51
+ },
52
+ check: async (selector, options) => {
53
+ options = options ?? {};
54
+
55
+ await element(selector).check(options);
56
+ },
57
+ uncheck: async (selector, options) => {
58
+ options = options ?? {};
59
+
60
+ await element(selector).uncheck(options);
61
+ },
62
+ scrollIntoViewIfNeeded: async (selector, options) => {
63
+ options = options ?? {};
64
+
65
+ await element(selector).scrollIntoViewIfNeeded(options);
66
+ },
67
+ upload: async (filePath, fileInput, options) => {
68
+ options = options ?? {};
69
+
70
+ filePath = await resolveVariable(filePath);
71
+ const file = selector(filePath);
72
+ const fileChooserPromise = context.page.waitForEvent("filechooser");
73
+ await element(fileInput).click();
74
+ const fileChooser = await fileChooserPromise;
75
+ await fileChooser.setFiles(
76
+ path.join(moduleConfig.projectPath, file),
77
+ options,
78
+ );
79
+ },
80
+ };
81
+
82
+ module.exports = {
83
+ mouse,
84
+ };
@@ -1,43 +1,43 @@
1
- const { context, selector, resolveVariable } = require("../imports/commons");
2
-
3
- const page = {
4
- navigateTo: async (url, options) => {
5
- options = options ?? {};
6
-
7
- url = await resolveVariable(url);
8
- url = await selector(url);
9
-
10
- return await context.page.goto(url, options);
11
- },
12
- getURL: async (options) => {
13
- options = options ?? {};
14
-
15
- return await context.page.url(options);
16
- },
17
- navigateBack: async (options) => {
18
- options = options ?? {};
19
-
20
- return await context.page.goBack(options);
21
- },
22
- navigateForward: async (options) => {
23
- options = options ?? {};
24
-
25
- return await context.page.goForward(options);
26
- },
27
- reload: async (options) => {
28
- options = options ?? {};
29
-
30
- return await context.page.reload(options);
31
- },
32
- wait: async (time, options) => {
33
- options = options ?? {};
34
-
35
- time = await resolveVariable(time);
36
-
37
- return await context.page.waitForTimeout(time, options);
38
- },
39
- };
40
-
41
- module.exports = {
42
- page,
43
- };
1
+ const { context, selector, resolveVariable } = require("../imports/commons");
2
+
3
+ const page = {
4
+ navigateTo: async (url, options) => {
5
+ options = options ?? {};
6
+
7
+ url = await resolveVariable(url);
8
+ url = await selector(url);
9
+
10
+ return await context.page.goto(url, options);
11
+ },
12
+ getURL: async (options) => {
13
+ options = options ?? {};
14
+
15
+ return await context.page.url(options);
16
+ },
17
+ navigateBack: async (options) => {
18
+ options = options ?? {};
19
+
20
+ return await context.page.goBack(options);
21
+ },
22
+ navigateForward: async (options) => {
23
+ options = options ?? {};
24
+
25
+ return await context.page.goForward(options);
26
+ },
27
+ reload: async (options) => {
28
+ options = options ?? {};
29
+
30
+ return await context.page.reload(options);
31
+ },
32
+ wait: async (time, options) => {
33
+ options = options ?? {};
34
+
35
+ time = await resolveVariable(time);
36
+
37
+ return await context.page.waitForTimeout(time, options);
38
+ },
39
+ };
40
+
41
+ module.exports = {
42
+ page,
43
+ };
@@ -1,15 +1,15 @@
1
- class Context {
2
- constructor() {
3
- this.browser = undefined;
4
- this.page = undefined;
5
- this.request = undefined;
6
- this.response = undefined;
7
- this.vars = undefined;
8
- }
9
- }
10
-
11
- const context = new Context();
12
-
13
- module.exports = {
14
- context,
15
- };
1
+ class Context {
2
+ constructor() {
3
+ this.browser = undefined;
4
+ this.page = undefined;
5
+ this.request = undefined;
6
+ this.response = undefined;
7
+ this.vars = undefined;
8
+ }
9
+ }
10
+
11
+ const context = new Context();
12
+
13
+ module.exports = {
14
+ context,
15
+ };