artes 1.0.9 → 1.0.11
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 +20 -20
- package/cucumber.config.js +1 -1
- package/package.json +1 -1
- package/src/hooks/hooks.js +8 -12
- package/src/tests/stepDefinitions/assertions.steps.js +1 -1
- package/.vscode/settings.json +0 -3
package/README.md
CHANGED
|
@@ -265,26 +265,26 @@ Then("User should see the login form", async () => {
|
|
|
265
265
|
|
|
266
266
|
You can configure Artes by editing the `artes.config.js` file. Below are the default configuration options with explanations:
|
|
267
267
|
|
|
268
|
-
| **Option** | **Default Value** | **Description**
|
|
269
|
-
| ---------------- | ---------------------------------------------------- |
|
|
270
|
-
| `headless` | `true` | Run in headless browser mode.
|
|
271
|
-
| `paths` | `["tests/features/"]` | Array of paths to feature files.
|
|
272
|
-
| `pomPath` | `"tests/POMs/*.json"` | Path to Page Object Models.
|
|
273
|
-
| `
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `
|
|
278
|
-
| `
|
|
279
|
-
| `
|
|
280
|
-
| `
|
|
281
|
-
| `
|
|
282
|
-
| `
|
|
283
|
-
| `
|
|
284
|
-
| `
|
|
285
|
-
| `
|
|
286
|
-
| `
|
|
287
|
-
| `publish` | `false` | Publish results to `cucumber.io`.
|
|
268
|
+
| **Option** | **Default Value** | **Description** |
|
|
269
|
+
| ---------------- | ---------------------------------------------------- | ----------------------------------- |
|
|
270
|
+
| `headless` | `true` | Run in headless browser mode. |
|
|
271
|
+
| `paths` | `["tests/features/"]` | Array of paths to feature files. |
|
|
272
|
+
| `pomPath` | `"tests/POMs/*.json"` | Path to Page Object Models. |
|
|
273
|
+
| `steps` | `"tests/steps/*.js"` | string - Step definitions files. |
|
|
274
|
+
| `format` | `["rerun:@rerun.txt", "allure-cucumberjs/reporter"]` | Array of formatter names/paths. |
|
|
275
|
+
| `formatOptions` | `{ "resultsDir": "allure-result" }` | Formatter options. |
|
|
276
|
+
| `parallel` | `1` | Number of parallel workers. |
|
|
277
|
+
| `tags` | `""` | Tag expression to filter scenarios. |
|
|
278
|
+
| `language` | `"en"` | Default language for feature files. |
|
|
279
|
+
| `order` | `"defined"` | Run order (defined or random). |
|
|
280
|
+
| `dryRun` | `false` | Prepare test run without execution. |
|
|
281
|
+
| `failFast` | `false` | Stop on first failure. |
|
|
282
|
+
| `forceExit` | `false` | Force `process.exit()` after tests. |
|
|
283
|
+
| `retry` | `0` | Retry attempts for failing tests. |
|
|
284
|
+
| `retryTagFilter` | `""` | Tag expression for retries. |
|
|
285
|
+
| `strict` | `true` | Fail on pending steps. |
|
|
286
|
+
| `backtrace` | `false` | Show full backtrace for errors. |
|
|
287
|
+
| `publish` | `false` | Publish results to `cucumber.io`. |
|
|
288
288
|
|
|
289
289
|
---
|
|
290
290
|
|
package/cucumber.config.js
CHANGED
|
@@ -17,7 +17,7 @@ try {
|
|
|
17
17
|
module.exports = {
|
|
18
18
|
default: {
|
|
19
19
|
// File paths and patterns
|
|
20
|
-
cucumberTimeout: artesConfig.
|
|
20
|
+
cucumberTimeout: artesConfig.timeout || 30, // Default timeout in milliseconds
|
|
21
21
|
paths: artesConfig.features
|
|
22
22
|
? path.join(moduleConfig.projectPath, artesConfig.features)
|
|
23
23
|
: [moduleConfig.featuresPath], // Paths to feature files
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "artes",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
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": {
|
package/src/hooks/hooks.js
CHANGED
|
@@ -19,9 +19,6 @@ let request;
|
|
|
19
19
|
setDefaultTimeout(cucumberConfig.default.cucumberTimeout * 1000);
|
|
20
20
|
|
|
21
21
|
BeforeAll(async function () {
|
|
22
|
-
browser = await invokeBrowser();
|
|
23
|
-
request = await invokeRequest();
|
|
24
|
-
|
|
25
22
|
pomCollector();
|
|
26
23
|
|
|
27
24
|
// browser.tracing.start({
|
|
@@ -32,6 +29,8 @@ BeforeAll(async function () {
|
|
|
32
29
|
});
|
|
33
30
|
|
|
34
31
|
Before(async function () {
|
|
32
|
+
browser = await invokeBrowser();
|
|
33
|
+
request = await invokeRequest();
|
|
35
34
|
context.page = await browser.newPage();
|
|
36
35
|
context.request = await request;
|
|
37
36
|
});
|
|
@@ -39,26 +38,23 @@ Before(async function () {
|
|
|
39
38
|
After(async function ({ pickle, result }) {
|
|
40
39
|
let img;
|
|
41
40
|
|
|
42
|
-
if (result?.status
|
|
41
|
+
if (result?.status != Status.PASSED) {
|
|
43
42
|
img = await context.page.screenshot({
|
|
44
43
|
path: `./test-results/visualReport/${pickle.name}/${pickle.name}.png`,
|
|
45
44
|
type: "png",
|
|
46
45
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (result?.status == Status.FAILED) {
|
|
50
|
-
this.attach(img, "image/png");
|
|
46
|
+
await this.attach(img, "image/png");
|
|
51
47
|
}
|
|
52
48
|
|
|
53
49
|
await context.page.close();
|
|
50
|
+
await browser.close();
|
|
51
|
+
|
|
54
52
|
// await browser.tracing.stop({ path: 'trace.zip' });
|
|
55
|
-
if (result?.status
|
|
53
|
+
if (result?.status != Status.PASSED) {
|
|
56
54
|
const videoPath = await context.page.video().path();
|
|
57
55
|
const webmBuffer = await fs.readFileSync(videoPath);
|
|
58
56
|
await this.attach(webmBuffer, "video/webm");
|
|
59
57
|
}
|
|
60
58
|
});
|
|
61
59
|
|
|
62
|
-
AfterAll(function () {
|
|
63
|
-
browser.close();
|
|
64
|
-
});
|
|
60
|
+
AfterAll(function () {});
|
|
@@ -568,7 +568,7 @@ Then(
|
|
|
568
568
|
|
|
569
569
|
// Check if a selector's text content should not be equal to the expected value
|
|
570
570
|
Then(
|
|
571
|
-
"User expects {string} should not
|
|
571
|
+
"User expects {string} should not be {string} text",
|
|
572
572
|
function (selector, expected) {
|
|
573
573
|
assert.shouldNotBe(selector, expected);
|
|
574
574
|
},
|
package/.vscode/settings.json
DELETED