artes 1.1.31 → 1.1.32

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 +458 -458
  2. package/cucumber.config.js +162 -162
  3. package/docs/functionDefinitions.md +2401 -2401
  4. package/docs/stepDefinitions.md +352 -352
  5. package/executer.js +162 -162
  6. package/index.js +48 -48
  7. package/package.json +54 -54
  8. package/src/helper/contextManager/browserManager.js +68 -68
  9. package/src/helper/contextManager/requestManager.js +28 -28
  10. package/src/helper/controller/elementController.js +157 -157
  11. package/src/helper/controller/pomCollector.js +24 -24
  12. package/src/helper/executers/cleaner.js +19 -19
  13. package/src/helper/executers/exporter.js +15 -15
  14. package/src/helper/executers/helper.js +89 -89
  15. package/src/helper/executers/projectCreator.js +168 -168
  16. package/src/helper/executers/reportGenerator.js +25 -25
  17. package/src/helper/executers/testRunner.js +30 -30
  18. package/src/helper/executers/versionChecker.js +31 -31
  19. package/src/helper/imports/commons.js +57 -57
  20. package/src/helper/stepFunctions/APIActions.js +298 -298
  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 +216 -216
  31. package/src/stepDefinitions/API.steps.js +247 -247
  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 -95
  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 +68 -68
@@ -1,68 +1,68 @@
1
- const { Given, context, random } = require("../helper/imports/commons");
2
- const { api } = require("../helper/stepFunctions/exporter");
3
-
4
- Given("User sets random word as {string} variable", async (key) => {
5
- const word = random.lorem.word();
6
- context.vars[key] = word;
7
- });
8
-
9
- Given(
10
- "User sets random word that has {int} character as {string} variable",
11
- async (key, count) => {
12
- const word = random.lorem.word(count);
13
- context.vars[key] = word;
14
- },
15
- );
16
-
17
- Given(
18
- "User sets random word that has character between {int} and {int} as {string} variable",
19
- async (key, from, to) => {
20
- const word = random.lorem.word({ length: { min: from, max: to } });
21
- context.vars[key] = word;
22
- },
23
- );
24
-
25
- Given("User sets random words as {string} variable", async (key) => {
26
- const words = random.lorem.words();
27
- context.vars[key] = words;
28
- });
29
-
30
- Given(
31
- "User sets random {int} words as {string} variable",
32
- async (key, count) => {
33
- const words = random.lorem.words({ wordCount: count });
34
- context.vars[key] = words;
35
- },
36
- );
37
-
38
- Given(
39
- "User sets random words that range between {int} and {int} as {string} variable",
40
- async (key, from, to) => {
41
- const words = random.lorem.words({ min: from, max: to });
42
- context.vars[key] = words;
43
- },
44
- );
45
-
46
- Given(
47
- "User sets random number from {int} to {int} as {string} variable",
48
- async (from, to, key) => {
49
- const number = random.number.int({ min: from, max: to });
50
- context.vars[key] = number;
51
- },
52
- );
53
-
54
- Given(
55
- "User sends GET request to {string} and save {string} variable from {string} array as a {string} randomly",
56
- async (endPoint, varName, fromArray, variableKey) => {
57
- await api.get(endPoint);
58
- let responseBody;
59
- if (fromArray == "[]") {
60
- responseBody = await context.response["Response Body"];
61
- } else {
62
- responseBody = await context.response["Response Body"][fromArray];
63
- }
64
- const randomContent =
65
- responseBody[random.number.int({ min: 0, max: responseBody.length - 1 })];
66
- context.vars[variableKey] = randomContent[varName];
67
- },
68
- );
1
+ const { Given, context, random } = require("../helper/imports/commons");
2
+ const { api } = require("../helper/stepFunctions/exporter");
3
+
4
+ Given("User sets random word as {string} variable", async (key) => {
5
+ const word = random.lorem.word();
6
+ context.vars[key] = word;
7
+ });
8
+
9
+ Given(
10
+ "User sets random word that has {int} character as {string} variable",
11
+ async (key, count) => {
12
+ const word = random.lorem.word(count);
13
+ context.vars[key] = word;
14
+ },
15
+ );
16
+
17
+ Given(
18
+ "User sets random word that has character between {int} and {int} as {string} variable",
19
+ async (key, from, to) => {
20
+ const word = random.lorem.word({ length: { min: from, max: to } });
21
+ context.vars[key] = word;
22
+ },
23
+ );
24
+
25
+ Given("User sets random words as {string} variable", async (key) => {
26
+ const words = random.lorem.words();
27
+ context.vars[key] = words;
28
+ });
29
+
30
+ Given(
31
+ "User sets random {int} words as {string} variable",
32
+ async (key, count) => {
33
+ const words = random.lorem.words({ wordCount: count });
34
+ context.vars[key] = words;
35
+ },
36
+ );
37
+
38
+ Given(
39
+ "User sets random words that range between {int} and {int} as {string} variable",
40
+ async (key, from, to) => {
41
+ const words = random.lorem.words({ min: from, max: to });
42
+ context.vars[key] = words;
43
+ },
44
+ );
45
+
46
+ Given(
47
+ "User sets random number from {int} to {int} as {string} variable",
48
+ async (from, to, key) => {
49
+ const number = random.number.int({ min: from, max: to });
50
+ context.vars[key] = number;
51
+ },
52
+ );
53
+
54
+ Given(
55
+ "User sends GET request to {string} and save {string} variable from {string} array as a {string} randomly",
56
+ async (endPoint, varName, fromArray, variableKey) => {
57
+ await api.get(endPoint);
58
+ let responseBody;
59
+ if (fromArray == "[]") {
60
+ responseBody = await context.response["Response Body"];
61
+ } else {
62
+ responseBody = await context.response["Response Body"][fromArray];
63
+ }
64
+ const randomContent =
65
+ responseBody[random.number.int({ min: 0, max: responseBody.length - 1 })];
66
+ context.vars[variableKey] = randomContent[varName];
67
+ },
68
+ );