artes 1.0.62 → 1.0.64
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.
- package/README.md +356 -356
- package/cucumber.config.js +98 -98
- package/docs/functionDefinitions.md +2342 -2342
- package/docs/stepDefinitions.md +352 -352
- package/executer.js +59 -59
- package/index.js +44 -44
- package/package.json +50 -50
- package/src/helper/contextManager/browserManager.js +66 -66
- package/src/helper/contextManager/requestManager.js +30 -30
- package/src/helper/executers/cleaner.js +23 -23
- package/src/helper/executers/exporter.js +15 -15
- package/src/helper/executers/helper.js +44 -44
- package/src/helper/executers/projectCreator.js +162 -162
- package/src/helper/executers/reportGenerator.js +29 -29
- package/src/helper/executers/testRunner.js +59 -59
- package/src/helper/executers/versionChecker.js +13 -13
- package/src/helper/imports/commons.js +51 -51
- package/src/helper/pomController/elementController.js +146 -146
- package/src/helper/pomController/pomCollector.js +20 -20
- package/src/helper/stepFunctions/APIActions.js +271 -271
- package/src/helper/stepFunctions/assertions.js +523 -523
- package/src/helper/stepFunctions/browserActions.js +21 -21
- package/src/helper/stepFunctions/elementInteractions.js +38 -38
- package/src/helper/stepFunctions/exporter.js +19 -19
- package/src/helper/stepFunctions/frameActions.js +50 -50
- package/src/helper/stepFunctions/keyboardActions.js +41 -41
- package/src/helper/stepFunctions/mouseActions.js +145 -145
- package/src/helper/stepFunctions/pageActions.js +27 -27
- package/src/hooks/context.js +15 -15
- package/src/hooks/hooks.js +76 -76
- package/src/stepDefinitions/API.steps.js +248 -248
- package/src/stepDefinitions/assertions.steps.js +826 -826
- package/src/stepDefinitions/browser.steps.js +7 -7
- package/src/stepDefinitions/frameActions.steps.js +76 -76
- package/src/stepDefinitions/keyboardActions.steps.js +87 -87
- package/src/stepDefinitions/mouseActions.steps.js +256 -256
- package/src/stepDefinitions/page.steps.js +71 -71
- package/src/stepDefinitions/random.steps.js +25 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const { When } = require("../helper/imports/commons");
|
|
2
|
-
const { browser } = require("../helper/stepFunctions/exporter");
|
|
3
|
-
|
|
4
|
-
// User sets cookies in json format
|
|
5
|
-
When("User sets {string} cookies", async function (cookies) {
|
|
6
|
-
await browser.setCookies(cookies);
|
|
7
|
-
});
|
|
1
|
+
const { When } = require("../helper/imports/commons");
|
|
2
|
+
const { browser } = require("../helper/stepFunctions/exporter");
|
|
3
|
+
|
|
4
|
+
// User sets cookies in json format
|
|
5
|
+
When("User sets {string} cookies", async function (cookies) {
|
|
6
|
+
await browser.setCookies(cookies);
|
|
7
|
+
});
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
const { When } = require("../helper/imports/commons");
|
|
2
|
-
const { frame } = require("../helper/stepFunctions/exporter");
|
|
3
|
-
|
|
4
|
-
// User takes a screenshot of a specific selector
|
|
5
|
-
When("User takes a screenshot of {string}", async function (selector) {
|
|
6
|
-
await frame.screenshot(selector);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
// User gets the content frame of a specific selector
|
|
10
|
-
When("User gets the content frame of {string}", async function (selector) {
|
|
11
|
-
await frame.contentFrame(selector);
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
// User gets the frame locator of a specific selector
|
|
15
|
-
When("User gets the frame locator of {string}", async function (selector) {
|
|
16
|
-
await frame.frameLocator(selector);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// User gets the nth element of a specific selector
|
|
20
|
-
When(
|
|
21
|
-
"User gets the {int} th element of {string}",
|
|
22
|
-
async function (index, selector) {
|
|
23
|
-
await frame.nth(selector, index);
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
// User gets the first element of a specific selector
|
|
28
|
-
When("User gets the first element of {string}", async function (selector) {
|
|
29
|
-
await frame.first(selector);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// User gets the last element of a specific selector
|
|
33
|
-
When("User gets the last element of {string}", async function (selector) {
|
|
34
|
-
await frame.last(selector);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// User filters elements of a specific selector
|
|
38
|
-
When(
|
|
39
|
-
"User filters elements of {string} with filter {string}",
|
|
40
|
-
async function (selector, filter) {
|
|
41
|
-
await frame.filter(selector, filter);
|
|
42
|
-
},
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
// User counts the number of elements of a specific selector
|
|
46
|
-
When("User counts the elements of {string}", async function (selector) {
|
|
47
|
-
await frame.count(selector);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// User gets an element by its alt text
|
|
51
|
-
When("User gets the element with alt text {string}", async function (text) {
|
|
52
|
-
await frame.getByAltText(text);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// User gets an element by its label
|
|
56
|
-
When("User gets the element with label {string}", async function (label) {
|
|
57
|
-
await frame.getByLabel(label);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// User gets an element by its placeholder
|
|
61
|
-
When(
|
|
62
|
-
"User gets the element with placeholder {string}",
|
|
63
|
-
async function (placeholder) {
|
|
64
|
-
await frame.getByPlaceholder(placeholder);
|
|
65
|
-
},
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
// User gets an element by its role
|
|
69
|
-
When("User gets the element with role {string}", async function (role) {
|
|
70
|
-
await frame.getByRole(role);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// User gets an element by its testId
|
|
74
|
-
When("User gets the element with testId {string}", async function (testId) {
|
|
75
|
-
await frame.getByTestId(testId);
|
|
76
|
-
});
|
|
1
|
+
const { When } = require("../helper/imports/commons");
|
|
2
|
+
const { frame } = require("../helper/stepFunctions/exporter");
|
|
3
|
+
|
|
4
|
+
// User takes a screenshot of a specific selector
|
|
5
|
+
When("User takes a screenshot of {string}", async function (selector) {
|
|
6
|
+
await frame.screenshot(selector);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
// User gets the content frame of a specific selector
|
|
10
|
+
When("User gets the content frame of {string}", async function (selector) {
|
|
11
|
+
await frame.contentFrame(selector);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// User gets the frame locator of a specific selector
|
|
15
|
+
When("User gets the frame locator of {string}", async function (selector) {
|
|
16
|
+
await frame.frameLocator(selector);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// User gets the nth element of a specific selector
|
|
20
|
+
When(
|
|
21
|
+
"User gets the {int} th element of {string}",
|
|
22
|
+
async function (index, selector) {
|
|
23
|
+
await frame.nth(selector, index);
|
|
24
|
+
},
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// User gets the first element of a specific selector
|
|
28
|
+
When("User gets the first element of {string}", async function (selector) {
|
|
29
|
+
await frame.first(selector);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// User gets the last element of a specific selector
|
|
33
|
+
When("User gets the last element of {string}", async function (selector) {
|
|
34
|
+
await frame.last(selector);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
// User filters elements of a specific selector
|
|
38
|
+
When(
|
|
39
|
+
"User filters elements of {string} with filter {string}",
|
|
40
|
+
async function (selector, filter) {
|
|
41
|
+
await frame.filter(selector, filter);
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// User counts the number of elements of a specific selector
|
|
46
|
+
When("User counts the elements of {string}", async function (selector) {
|
|
47
|
+
await frame.count(selector);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// User gets an element by its alt text
|
|
51
|
+
When("User gets the element with alt text {string}", async function (text) {
|
|
52
|
+
await frame.getByAltText(text);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// User gets an element by its label
|
|
56
|
+
When("User gets the element with label {string}", async function (label) {
|
|
57
|
+
await frame.getByLabel(label);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// User gets an element by its placeholder
|
|
61
|
+
When(
|
|
62
|
+
"User gets the element with placeholder {string}",
|
|
63
|
+
async function (placeholder) {
|
|
64
|
+
await frame.getByPlaceholder(placeholder);
|
|
65
|
+
},
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
// User gets an element by its role
|
|
69
|
+
When("User gets the element with role {string}", async function (role) {
|
|
70
|
+
await frame.getByRole(role);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// User gets an element by its testId
|
|
74
|
+
When("User gets the element with testId {string}", async function (testId) {
|
|
75
|
+
await frame.getByTestId(testId);
|
|
76
|
+
});
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
const { When } = require("../helper/imports/commons");
|
|
2
|
-
const { keyboard, frame } = require("../helper/stepFunctions/exporter");
|
|
3
|
-
|
|
4
|
-
// User presses a key on a specific selector
|
|
5
|
-
When("User presses {string} on {string}", async function (key, selector) {
|
|
6
|
-
await keyboard.press(selector, key);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
When(
|
|
10
|
-
"User types {string} in {int} th of {string}",
|
|
11
|
-
async (text, order, elements) => {
|
|
12
|
-
const nthElement = await frame.nth(elements, order);
|
|
13
|
-
await nthElement.fill(text);
|
|
14
|
-
},
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
// User presses keys sequentially on a specific selector
|
|
18
|
-
When(
|
|
19
|
-
"User presses keys {string} sequentially on {string}",
|
|
20
|
-
async function (keys, selector) {
|
|
21
|
-
await keyboard.pressSequentially(selector, keys);
|
|
22
|
-
},
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
// User presses keys sequentially with a delay on a specific selector
|
|
26
|
-
When(
|
|
27
|
-
"User presses keys {string} sequentially with delay {int} on {string}",
|
|
28
|
-
async function (keys, delay, selector) {
|
|
29
|
-
await keyboard.pressSequentiallyDelay(selector, keys, delay);
|
|
30
|
-
},
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
// User fills a value into a specific selector
|
|
34
|
-
When("User types {string} in {string}", async function (value, selector) {
|
|
35
|
-
await keyboard.fill(selector, value);
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
When(
|
|
39
|
-
"User types {string} in multiple {string}",
|
|
40
|
-
async function (value, selectors) {
|
|
41
|
-
await keyboard.multipleElementFill(selectors, value);
|
|
42
|
-
},
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
// User clears the input of a specific selector
|
|
46
|
-
When("User clears {string}", async function (selector) {
|
|
47
|
-
await keyboard.clear(selector);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// User selects text in a specific selector
|
|
51
|
-
When("User selects {string} text", async function (text) {
|
|
52
|
-
await keyboard.selectText(text);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
// User sets input files for a specific selector
|
|
56
|
-
When(
|
|
57
|
-
"User sets input files {string} for {string}",
|
|
58
|
-
async function (files, selector) {
|
|
59
|
-
const fileArray = files.split(","); // Assuming files are comma-separated
|
|
60
|
-
await keyboard.setInputFiles(selector, fileArray);
|
|
61
|
-
},
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
// User presses a key down
|
|
65
|
-
When("User holds down {string}", async function (key) {
|
|
66
|
-
await keyboard.keyDown(key);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// User releases a key
|
|
70
|
-
When("User releases {string}", async function (key) {
|
|
71
|
-
await keyboard.keyUp(key);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
// User inserts text
|
|
75
|
-
When("User inserts text {string}", async function (text) {
|
|
76
|
-
await keyboard.insertText(text);
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
// User presses a key
|
|
80
|
-
When("User presses {string}", async function (key) {
|
|
81
|
-
await keyboard.keyboardPress(key);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// User types a key with a delay
|
|
85
|
-
When("User types {string} with delay {int}", async function (key, delay) {
|
|
86
|
-
await keyboard.keyboardType(key, delay);
|
|
87
|
-
});
|
|
1
|
+
const { When } = require("../helper/imports/commons");
|
|
2
|
+
const { keyboard, frame } = require("../helper/stepFunctions/exporter");
|
|
3
|
+
|
|
4
|
+
// User presses a key on a specific selector
|
|
5
|
+
When("User presses {string} on {string}", async function (key, selector) {
|
|
6
|
+
await keyboard.press(selector, key);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
When(
|
|
10
|
+
"User types {string} in {int} th of {string}",
|
|
11
|
+
async (text, order, elements) => {
|
|
12
|
+
const nthElement = await frame.nth(elements, order);
|
|
13
|
+
await nthElement.fill(text);
|
|
14
|
+
},
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
// User presses keys sequentially on a specific selector
|
|
18
|
+
When(
|
|
19
|
+
"User presses keys {string} sequentially on {string}",
|
|
20
|
+
async function (keys, selector) {
|
|
21
|
+
await keyboard.pressSequentially(selector, keys);
|
|
22
|
+
},
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
// User presses keys sequentially with a delay on a specific selector
|
|
26
|
+
When(
|
|
27
|
+
"User presses keys {string} sequentially with delay {int} on {string}",
|
|
28
|
+
async function (keys, delay, selector) {
|
|
29
|
+
await keyboard.pressSequentiallyDelay(selector, keys, delay);
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
// User fills a value into a specific selector
|
|
34
|
+
When("User types {string} in {string}", async function (value, selector) {
|
|
35
|
+
await keyboard.fill(selector, value);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
When(
|
|
39
|
+
"User types {string} in multiple {string}",
|
|
40
|
+
async function (value, selectors) {
|
|
41
|
+
await keyboard.multipleElementFill(selectors, value);
|
|
42
|
+
},
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// User clears the input of a specific selector
|
|
46
|
+
When("User clears {string}", async function (selector) {
|
|
47
|
+
await keyboard.clear(selector);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// User selects text in a specific selector
|
|
51
|
+
When("User selects {string} text", async function (text) {
|
|
52
|
+
await keyboard.selectText(text);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// User sets input files for a specific selector
|
|
56
|
+
When(
|
|
57
|
+
"User sets input files {string} for {string}",
|
|
58
|
+
async function (files, selector) {
|
|
59
|
+
const fileArray = files.split(","); // Assuming files are comma-separated
|
|
60
|
+
await keyboard.setInputFiles(selector, fileArray);
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
// User presses a key down
|
|
65
|
+
When("User holds down {string}", async function (key) {
|
|
66
|
+
await keyboard.keyDown(key);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
// User releases a key
|
|
70
|
+
When("User releases {string}", async function (key) {
|
|
71
|
+
await keyboard.keyUp(key);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// User inserts text
|
|
75
|
+
When("User inserts text {string}", async function (text) {
|
|
76
|
+
await keyboard.insertText(text);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// User presses a key
|
|
80
|
+
When("User presses {string}", async function (key) {
|
|
81
|
+
await keyboard.keyboardPress(key);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// User types a key with a delay
|
|
85
|
+
When("User types {string} with delay {int}", async function (key, delay) {
|
|
86
|
+
await keyboard.keyboardType(key, delay);
|
|
87
|
+
});
|