artes 1.0.33 → 1.0.34
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 +2 -2
- package/package.json +1 -1
- package/src/helper/stepFunctions/browserActions.js +11 -0
- package/src/helper/stepFunctions/exporter.js +2 -0
- package/src/helper/stepFunctions/mouseActions.js +1 -0
- package/src/hooks/context.js +1 -0
- package/src/hooks/hooks.js +1 -1
- package/src/stepDefinitions/browser.steps.js +7 -0
- /package/{documents → docs}/functionDefinitions.md +0 -0
- /package/{documents → docs}/stepDefinitions.md +0 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## 🚀 Summary
|
|
8
8
|
|
|
9
|
-
Artes is a test runner for Playwright that executes [predefined Cucumber tests](./
|
|
9
|
+
Artes is a test runner for Playwright that executes [predefined Cucumber tests](./docs/stepDefinitions.md) and can generate Allure reports for test results. It simplifies setting up Playwright with Cucumber in your automation workflow. With Artes, you can easily run tests without writing step definitions, generate reports, and customize your testing environment.
|
|
10
10
|
|
|
11
11
|

|
|
12
12
|
|
|
@@ -240,7 +240,7 @@ const { mouse, keyboard, frame, elementInteractions, page } = require("artes");
|
|
|
240
240
|
|
|
241
241
|
---
|
|
242
242
|
|
|
243
|
-
For a detailed explanation of each function, please refer to the [functionDefinitions.md](./
|
|
243
|
+
For a detailed explanation of each function, please refer to the [functionDefinitions.md](./docs/functionDefinitions.md).
|
|
244
244
|
|
|
245
245
|
---
|
|
246
246
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "artes",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"description": "The package provide step definitions and user writes feature files, and the package handles automation, with optional POM files and custom step definitions.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -5,6 +5,7 @@ const { frame } = require("./frameActions");
|
|
|
5
5
|
const { elementInteractions } = require("./elementInteractions");
|
|
6
6
|
const { page } = require("./pageActions");
|
|
7
7
|
const { api } = require("./APIActions");
|
|
8
|
+
const { browser } = require("./browserActions");
|
|
8
9
|
|
|
9
10
|
module.exports = {
|
|
10
11
|
assert,
|
|
@@ -14,4 +15,5 @@ module.exports = {
|
|
|
14
15
|
elementInteractions,
|
|
15
16
|
page,
|
|
16
17
|
api,
|
|
18
|
+
browser,
|
|
17
19
|
};
|
package/src/hooks/context.js
CHANGED
package/src/hooks/hooks.js
CHANGED
|
@@ -11,7 +11,6 @@ const { pomCollector } = require("../helper/pomController/pomCollector");
|
|
|
11
11
|
const cucumberConfig = require("../../cucumber.config");
|
|
12
12
|
const { context } = require("./context");
|
|
13
13
|
const fs = require("fs");
|
|
14
|
-
const { expect } = require("playwright/test");
|
|
15
14
|
const { moduleConfig } = require("artes/src/helper/imports/commons");
|
|
16
15
|
const path = require("path");
|
|
17
16
|
|
|
@@ -28,6 +27,7 @@ Before(async function () {
|
|
|
28
27
|
browser = await invokeBrowser();
|
|
29
28
|
request = await invokeRequest();
|
|
30
29
|
|
|
30
|
+
context.browser = await browser;
|
|
31
31
|
context.page = await browser.newPage();
|
|
32
32
|
await context.page.setDefaultTimeout(cucumberConfig.default.timeout * 1000);
|
|
33
33
|
context.request = await request;
|
|
@@ -0,0 +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
|
+
});
|
|
File without changes
|
|
File without changes
|