artes 1.0.62 → 1.0.63
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
package/cucumber.config.js
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
const fs = require("fs");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const { moduleConfig } = require("./src/helper/imports/commons");
|
|
4
|
-
|
|
5
|
-
let artesConfig = {};
|
|
6
|
-
|
|
7
|
-
try {
|
|
8
|
-
if (fs.existsSync(moduleConfig.cucumberConfigPath)) {
|
|
9
|
-
const artesConf = require(moduleConfig.cucumberConfigPath);
|
|
10
|
-
artesConfig = artesConf || {};
|
|
11
|
-
}
|
|
12
|
-
} catch (error) {
|
|
13
|
-
console.warn("Error reading config file:", error.message);
|
|
14
|
-
console.log("Proceeding with default config.");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
module.exports = {
|
|
18
|
-
default: {
|
|
19
|
-
// File paths and patterns
|
|
20
|
-
timeout: artesConfig.timeout || 30, // Default timeout in milliseconds
|
|
21
|
-
paths: process.env.FEATURES
|
|
22
|
-
? [path.join(moduleConfig.projectPath, process.env.FEATURES)]
|
|
23
|
-
: artesConfig.features
|
|
24
|
-
? path.join(moduleConfig.projectPath, artesConfig.features)
|
|
25
|
-
: [moduleConfig.featuresPath], // Paths to feature files
|
|
26
|
-
require: [
|
|
27
|
-
artesConfig.steps
|
|
28
|
-
? path.join(moduleConfig.projectPath, artesConfig.steps)
|
|
29
|
-
: moduleConfig.stepsPath,
|
|
30
|
-
"src/stepDefinitions/*.js",
|
|
31
|
-
"src/hooks/hooks.js",
|
|
32
|
-
], // Support code paths (CommonJS)
|
|
33
|
-
pomPath: artesConfig.pomPath
|
|
34
|
-
? path.join(moduleConfig.projectPath, artesConfig.pomPath)
|
|
35
|
-
: moduleConfig.pomPath,
|
|
36
|
-
import: artesConfig.import || [], // Support code paths
|
|
37
|
-
|
|
38
|
-
// Formatting and output
|
|
39
|
-
format: process.env.REPORT_FORMAT
|
|
40
|
-
? JSON.parse(process.env.REPORT_FORMAT)
|
|
41
|
-
: artesConfig.format || [
|
|
42
|
-
"rerun:@rerun.txt",
|
|
43
|
-
"allure-cucumberjs/reporter",
|
|
44
|
-
], // Formatter names/paths
|
|
45
|
-
formatOptions: artesConfig.formatOptions || {
|
|
46
|
-
resultsDir: `allure-result`,
|
|
47
|
-
}, // Formatter options
|
|
48
|
-
|
|
49
|
-
// Execution options
|
|
50
|
-
parallel: artesConfig.parallel || 1, // Number of parallel workers
|
|
51
|
-
dryRun: artesConfig.dryRun || false, // Prepare test run without execution
|
|
52
|
-
failFast: artesConfig.failFast || false, // Stop on first test failure
|
|
53
|
-
forceExit: artesConfig.forceExit || false, // Force process.exit() after tests
|
|
54
|
-
strict: artesConfig.strict || true, // Fail on pending steps
|
|
55
|
-
backtrace: artesConfig.backtrace || false, // Show full backtrace for errors
|
|
56
|
-
|
|
57
|
-
// Filtering and organization
|
|
58
|
-
tags: process.env.RUN_TAGS
|
|
59
|
-
? JSON.parse(process.env.RUN_TAGS)
|
|
60
|
-
: artesConfig.tags || artesConfig.tags || "", // Tag expression to filter scenarios
|
|
61
|
-
name: artesConfig.name || [], // Run scenarios matching regex
|
|
62
|
-
order: artesConfig.order || "defined", // Run order (defined/random)
|
|
63
|
-
language: artesConfig.language || "en", // Default feature file language
|
|
64
|
-
|
|
65
|
-
// Module loading
|
|
66
|
-
loader: artesConfig.loader || [], // Module loader specifications
|
|
67
|
-
requireModule: artesConfig.requireModule || [], // Transpilation module names
|
|
68
|
-
|
|
69
|
-
// Retry logic
|
|
70
|
-
retry: artesConfig.retry || 0, // Retry attempts for failing tests
|
|
71
|
-
retryTagFilter: artesConfig.retryTagFilter || "", // Tag expression for retries
|
|
72
|
-
|
|
73
|
-
// Publishing
|
|
74
|
-
publish: artesConfig.publish || false, // Publish to cucumber.io
|
|
75
|
-
|
|
76
|
-
// World parameters
|
|
77
|
-
worldParameters: artesConfig.worldParameters || {}, // Custom world parameters
|
|
78
|
-
},
|
|
79
|
-
env: process.env.ENV ? JSON.parse(process.env.ENV) : artesConfig.env || "",
|
|
80
|
-
baseURL: artesConfig?.baseURL ? artesConfig?.baseURL : "",
|
|
81
|
-
|
|
82
|
-
browser: {
|
|
83
|
-
browserType: artesConfig?.browser || "chrome",
|
|
84
|
-
viewport: {
|
|
85
|
-
width: artesConfig?.width || 1280,
|
|
86
|
-
height: artesConfig?.height || 720,
|
|
87
|
-
},
|
|
88
|
-
maximizeScreen:
|
|
89
|
-
artesConfig?.maximizeScreen !== undefined
|
|
90
|
-
? artesConfig.maximizeScreen
|
|
91
|
-
: true,
|
|
92
|
-
headless: process.env.MODE
|
|
93
|
-
? JSON.parse(process.env.MODE)
|
|
94
|
-
: artesConfig?.headless !== undefined
|
|
95
|
-
? artesConfig.headless
|
|
96
|
-
: true,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
1
|
+
const fs = require("fs");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const { moduleConfig } = require("./src/helper/imports/commons");
|
|
4
|
+
|
|
5
|
+
let artesConfig = {};
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
if (fs.existsSync(moduleConfig.cucumberConfigPath)) {
|
|
9
|
+
const artesConf = require(moduleConfig.cucumberConfigPath);
|
|
10
|
+
artesConfig = artesConf || {};
|
|
11
|
+
}
|
|
12
|
+
} catch (error) {
|
|
13
|
+
console.warn("Error reading config file:", error.message);
|
|
14
|
+
console.log("Proceeding with default config.");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = {
|
|
18
|
+
default: {
|
|
19
|
+
// File paths and patterns
|
|
20
|
+
timeout: artesConfig.timeout || 30, // Default timeout in milliseconds
|
|
21
|
+
paths: process.env.FEATURES
|
|
22
|
+
? [path.join(moduleConfig.projectPath, process.env.FEATURES)]
|
|
23
|
+
: artesConfig.features
|
|
24
|
+
? path.join(moduleConfig.projectPath, artesConfig.features)
|
|
25
|
+
: [moduleConfig.featuresPath], // Paths to feature files
|
|
26
|
+
require: [
|
|
27
|
+
artesConfig.steps
|
|
28
|
+
? path.join(moduleConfig.projectPath, artesConfig.steps)
|
|
29
|
+
: moduleConfig.stepsPath,
|
|
30
|
+
"src/stepDefinitions/*.js",
|
|
31
|
+
"src/hooks/hooks.js",
|
|
32
|
+
], // Support code paths (CommonJS)
|
|
33
|
+
pomPath: artesConfig.pomPath
|
|
34
|
+
? path.join(moduleConfig.projectPath, artesConfig.pomPath)
|
|
35
|
+
: moduleConfig.pomPath,
|
|
36
|
+
import: artesConfig.import || [], // Support code paths
|
|
37
|
+
|
|
38
|
+
// Formatting and output
|
|
39
|
+
format: process.env.REPORT_FORMAT
|
|
40
|
+
? JSON.parse(process.env.REPORT_FORMAT)
|
|
41
|
+
: artesConfig.format || [
|
|
42
|
+
"rerun:@rerun.txt",
|
|
43
|
+
"allure-cucumberjs/reporter",
|
|
44
|
+
], // Formatter names/paths
|
|
45
|
+
formatOptions: artesConfig.formatOptions || {
|
|
46
|
+
resultsDir: `allure-result`,
|
|
47
|
+
}, // Formatter options
|
|
48
|
+
|
|
49
|
+
// Execution options
|
|
50
|
+
parallel: artesConfig.parallel || 1, // Number of parallel workers
|
|
51
|
+
dryRun: artesConfig.dryRun || false, // Prepare test run without execution
|
|
52
|
+
failFast: artesConfig.failFast || false, // Stop on first test failure
|
|
53
|
+
forceExit: artesConfig.forceExit || false, // Force process.exit() after tests
|
|
54
|
+
strict: artesConfig.strict || true, // Fail on pending steps
|
|
55
|
+
backtrace: artesConfig.backtrace || false, // Show full backtrace for errors
|
|
56
|
+
|
|
57
|
+
// Filtering and organization
|
|
58
|
+
tags: process.env.RUN_TAGS
|
|
59
|
+
? JSON.parse(process.env.RUN_TAGS)
|
|
60
|
+
: artesConfig.tags || artesConfig.tags || "", // Tag expression to filter scenarios
|
|
61
|
+
name: artesConfig.name || [], // Run scenarios matching regex
|
|
62
|
+
order: artesConfig.order || "defined", // Run order (defined/random)
|
|
63
|
+
language: artesConfig.language || "en", // Default feature file language
|
|
64
|
+
|
|
65
|
+
// Module loading
|
|
66
|
+
loader: artesConfig.loader || [], // Module loader specifications
|
|
67
|
+
requireModule: artesConfig.requireModule || [], // Transpilation module names
|
|
68
|
+
|
|
69
|
+
// Retry logic
|
|
70
|
+
retry: artesConfig.retry || 0, // Retry attempts for failing tests
|
|
71
|
+
retryTagFilter: artesConfig.retryTagFilter || "", // Tag expression for retries
|
|
72
|
+
|
|
73
|
+
// Publishing
|
|
74
|
+
publish: artesConfig.publish || false, // Publish to cucumber.io
|
|
75
|
+
|
|
76
|
+
// World parameters
|
|
77
|
+
worldParameters: artesConfig.worldParameters || {}, // Custom world parameters
|
|
78
|
+
},
|
|
79
|
+
env: process.env.ENV ? JSON.parse(process.env.ENV) : artesConfig.env || "",
|
|
80
|
+
baseURL: artesConfig?.baseURL ? artesConfig?.baseURL : "",
|
|
81
|
+
|
|
82
|
+
browser: {
|
|
83
|
+
browserType: artesConfig?.browser || "chrome",
|
|
84
|
+
viewport: {
|
|
85
|
+
width: artesConfig?.width || 1280,
|
|
86
|
+
height: artesConfig?.height || 720,
|
|
87
|
+
},
|
|
88
|
+
maximizeScreen:
|
|
89
|
+
artesConfig?.maximizeScreen !== undefined
|
|
90
|
+
? artesConfig.maximizeScreen
|
|
91
|
+
: true,
|
|
92
|
+
headless: process.env.MODE
|
|
93
|
+
? JSON.parse(process.env.MODE)
|
|
94
|
+
: artesConfig?.headless !== undefined
|
|
95
|
+
? artesConfig.headless
|
|
96
|
+
: true,
|
|
97
|
+
},
|
|
98
|
+
};
|