artes 1.0.60 → 1.0.62

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 +356 -340
  2. package/cucumber.config.js +98 -98
  3. package/docs/functionDefinitions.md +2343 -2101
  4. package/docs/stepDefinitions.md +352 -269
  5. package/executer.js +59 -59
  6. package/index.js +44 -44
  7. package/package.json +50 -50
  8. package/src/helper/contextManager/browserManager.js +66 -66
  9. package/src/helper/contextManager/requestManager.js +30 -30
  10. package/src/helper/executers/cleaner.js +23 -23
  11. package/src/helper/executers/exporter.js +15 -15
  12. package/src/helper/executers/helper.js +44 -44
  13. package/src/helper/executers/projectCreator.js +162 -162
  14. package/src/helper/executers/reportGenerator.js +29 -29
  15. package/src/helper/executers/testRunner.js +59 -59
  16. package/src/helper/executers/versionChecker.js +13 -13
  17. package/src/helper/imports/commons.js +51 -51
  18. package/src/helper/pomController/elementController.js +146 -146
  19. package/src/helper/pomController/pomCollector.js +20 -18
  20. package/src/helper/stepFunctions/APIActions.js +271 -303
  21. package/src/helper/stepFunctions/assertions.js +523 -523
  22. package/src/helper/stepFunctions/browserActions.js +21 -19
  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 -36
  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 +76 -74
  31. package/src/stepDefinitions/API.steps.js +248 -248
  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 +87 -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 +25 -25
@@ -1,25 +1,25 @@
1
- const { Given, context, random } = require("../helper/imports/commons");
2
-
3
- Given("User sets random words as {string} variable", async (key) => {
4
- const words = random.lorem.words({ min: 2, max: 5 });
5
- context.vars[key] = words;
6
- });
7
-
8
- Given(
9
- "User sets random number from {int} to {int} as {string} variable",
10
- async (from, to, key) => {
11
- const number = random.number.int({ min: from, max: to });
12
- context.vars[key] = number;
13
- },
14
- );
15
-
16
- Given(
17
- "User sends GET request to {string} and save {string} variable as a {string} randomly",
18
- async (api, varName, variableKey) => {
19
- const res = await fetch(api);
20
- const body = await res.json();
21
- const randomContent =
22
- body.content[random.number.int({ min: 0, max: body.content.length - 1 })];
23
- context.vars[variableKey] = randomContent[varName];
24
- },
25
- );
1
+ const { Given, context, random } = require("../helper/imports/commons");
2
+
3
+ Given("User sets random words as {string} variable", async (key) => {
4
+ const words = random.lorem.words({ min: 2, max: 5 });
5
+ context.vars[key] = words;
6
+ });
7
+
8
+ Given(
9
+ "User sets random number from {int} to {int} as {string} variable",
10
+ async (from, to, key) => {
11
+ const number = random.number.int({ min: from, max: to });
12
+ context.vars[key] = number;
13
+ },
14
+ );
15
+
16
+ Given(
17
+ "User sends GET request to {string} and save {string} variable as a {string} randomly",
18
+ async (api, varName, variableKey) => {
19
+ const res = await fetch(api);
20
+ const body = await res.json();
21
+ const randomContent =
22
+ body.content[random.number.int({ min: 0, max: body.content.length - 1 })];
23
+ context.vars[variableKey] = randomContent[varName];
24
+ },
25
+ );