artes 1.7.19 โ 1.7.21
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 +781 -781
- package/assets/styles.css +4 -4
- package/cucumber.config.js +253 -253
- package/docs/ciExecutors.md +198 -198
- package/docs/emulationDevicesList.md +152 -152
- package/docs/functionDefinitions.md +2401 -2401
- package/docs/stepDefinitions.md +435 -435
- package/executer.js +266 -266
- package/index.js +51 -51
- package/package.json +56 -56
- package/src/helper/contextManager/browserManager.js +74 -74
- package/src/helper/contextManager/requestManager.js +23 -23
- package/src/helper/controller/elementController.js +230 -230
- package/src/helper/controller/findDuplicateTestNames.js +69 -69
- package/src/helper/controller/getEnvInfo.js +97 -97
- package/src/helper/controller/getExecutor.js +109 -109
- package/src/helper/controller/pomCollector.js +83 -83
- package/src/helper/controller/reportCustomizer.js +511 -511
- package/src/helper/controller/screenComparer.js +96 -96
- package/src/helper/controller/status-formatter.js +137 -137
- package/src/helper/controller/testCoverageCalculator.js +111 -111
- package/src/helper/executers/cleaner.js +23 -23
- package/src/helper/executers/exporter.js +19 -19
- package/src/helper/executers/helper.js +193 -193
- package/src/helper/executers/projectCreator.js +226 -226
- package/src/helper/executers/reportGenerator.js +91 -91
- package/src/helper/executers/testRunner.js +28 -28
- package/src/helper/executers/versionChecker.js +31 -31
- package/src/helper/imports/commons.js +69 -69
- package/src/helper/stepFunctions/APIActions.js +582 -582
- package/src/helper/stepFunctions/assertions.js +986 -986
- package/src/helper/stepFunctions/browserActions.js +87 -87
- package/src/helper/stepFunctions/elementInteractions.js +60 -60
- package/src/helper/stepFunctions/exporter.js +19 -19
- package/src/helper/stepFunctions/frameActions.js +72 -72
- package/src/helper/stepFunctions/keyboardActions.js +66 -66
- package/src/helper/stepFunctions/mouseActions.js +84 -84
- package/src/helper/stepFunctions/pageActions.js +43 -43
- package/src/hooks/context.js +18 -18
- package/src/hooks/hooks.js +287 -287
- package/src/stepDefinitions/API.steps.js +404 -404
- package/src/stepDefinitions/assertions.steps.js +1358 -1351
- package/src/stepDefinitions/browser.steps.js +74 -74
- package/src/stepDefinitions/frameActions.steps.js +76 -76
- package/src/stepDefinitions/keyboardActions.steps.js +264 -264
- package/src/stepDefinitions/mouseActions.steps.js +374 -374
- package/src/stepDefinitions/page.steps.js +71 -71
- package/src/stepDefinitions/random.steps.js +199 -199
- package/src/stepDefinitions/report.steps.js +5 -5
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
const { spawnSync } = require("child_process");
|
|
2
|
-
const { moduleConfig } = require("../imports/commons");
|
|
3
|
-
|
|
4
|
-
function runTests() {
|
|
5
|
-
try {
|
|
6
|
-
console.log("๐งช Running tests...");
|
|
7
|
-
|
|
8
|
-
spawnSync("cucumber-js", ["--config=cucumber.config.js"], {
|
|
9
|
-
cwd: moduleConfig.modulePath,
|
|
10
|
-
stdio: "inherit",
|
|
11
|
-
shell: true,
|
|
12
|
-
env: {
|
|
13
|
-
...process.env,
|
|
14
|
-
FORCE_TTY: "1",
|
|
15
|
-
FORCE_COLOR: "1",
|
|
16
|
-
CI: "false",
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
console.log("โ
Tests running completed successfully!");
|
|
20
|
-
} catch (error) {
|
|
21
|
-
console.error("โ Test execution failed:", error);
|
|
22
|
-
process.env.EXIT_CODE = 1;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
module.exports = {
|
|
27
|
-
runTests,
|
|
28
|
-
};
|
|
1
|
+
const { spawnSync } = require("child_process");
|
|
2
|
+
const { moduleConfig } = require("../imports/commons");
|
|
3
|
+
|
|
4
|
+
function runTests() {
|
|
5
|
+
try {
|
|
6
|
+
console.log("๐งช Running tests...");
|
|
7
|
+
|
|
8
|
+
spawnSync("cucumber-js", ["--config=cucumber.config.js"], {
|
|
9
|
+
cwd: moduleConfig.modulePath,
|
|
10
|
+
stdio: "inherit",
|
|
11
|
+
shell: true,
|
|
12
|
+
env: {
|
|
13
|
+
...process.env,
|
|
14
|
+
FORCE_TTY: "1",
|
|
15
|
+
FORCE_COLOR: "1",
|
|
16
|
+
CI: "false",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
console.log("โ
Tests running completed successfully!");
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.error("โ Test execution failed:", error);
|
|
22
|
+
process.env.EXIT_CODE = 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = {
|
|
27
|
+
runTests,
|
|
28
|
+
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
const { execSync } = require("child_process");
|
|
2
|
-
const path = require("path");
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
|
|
5
|
-
function showVersion() {
|
|
6
|
-
try {
|
|
7
|
-
const localPath = path.join(
|
|
8
|
-
process.cwd(),
|
|
9
|
-
"node_modules",
|
|
10
|
-
"artes",
|
|
11
|
-
"package.json",
|
|
12
|
-
);
|
|
13
|
-
const localData = fs.readFileSync(localPath, "utf8");
|
|
14
|
-
const localArtes = JSON.parse(localData);
|
|
15
|
-
console.log(`ARTES Version: ${localArtes.version}`);
|
|
16
|
-
return;
|
|
17
|
-
} catch (err) {}
|
|
18
|
-
|
|
19
|
-
try {
|
|
20
|
-
const globalRoot = execSync("npm root -g").toString().trim();
|
|
21
|
-
const globalPath = path.join(globalRoot, "artes", "package.json");
|
|
22
|
-
const globalData = fs.readFileSync(globalPath, "utf8");
|
|
23
|
-
const globalArtes = JSON.parse(globalData);
|
|
24
|
-
console.log(`ARTES Version: ${globalArtes.version}`);
|
|
25
|
-
return;
|
|
26
|
-
} catch (err) {}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
module.exports = {
|
|
30
|
-
showVersion,
|
|
31
|
-
};
|
|
1
|
+
const { execSync } = require("child_process");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
|
|
5
|
+
function showVersion() {
|
|
6
|
+
try {
|
|
7
|
+
const localPath = path.join(
|
|
8
|
+
process.cwd(),
|
|
9
|
+
"node_modules",
|
|
10
|
+
"artes",
|
|
11
|
+
"package.json",
|
|
12
|
+
);
|
|
13
|
+
const localData = fs.readFileSync(localPath, "utf8");
|
|
14
|
+
const localArtes = JSON.parse(localData);
|
|
15
|
+
console.log(`ARTES Version: ${localArtes.version}`);
|
|
16
|
+
return;
|
|
17
|
+
} catch (err) {}
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
const globalRoot = execSync("npm root -g").toString().trim();
|
|
21
|
+
const globalPath = path.join(globalRoot, "artes", "package.json");
|
|
22
|
+
const globalData = fs.readFileSync(globalPath, "utf8");
|
|
23
|
+
const globalArtes = JSON.parse(globalData);
|
|
24
|
+
console.log(`ARTES Version: ${globalArtes.version}`);
|
|
25
|
+
return;
|
|
26
|
+
} catch (err) {}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = {
|
|
30
|
+
showVersion,
|
|
31
|
+
};
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
const { expect } = require("playwright/test");
|
|
2
|
-
const { Given, When, Then } = require("@cucumber/cucumber");
|
|
3
|
-
const {
|
|
4
|
-
getElement,
|
|
5
|
-
getSelector,
|
|
6
|
-
extractVarsFromResponse,
|
|
7
|
-
pathToCamelCase,
|
|
8
|
-
saveVar,
|
|
9
|
-
resolveVariable,
|
|
10
|
-
normalizeCrossplatformPath
|
|
11
|
-
} = require("../controller/elementController");
|
|
12
|
-
const { context } = require("../../hooks/context");
|
|
13
|
-
|
|
14
|
-
const { faker } = require("@faker-js/faker");
|
|
15
|
-
const dayjs = require("dayjs");
|
|
16
|
-
|
|
17
|
-
const element = getElement;
|
|
18
|
-
const selector = getSelector;
|
|
19
|
-
const browserPage = context.page;
|
|
20
|
-
const request = context.request;
|
|
21
|
-
|
|
22
|
-
const random = faker;
|
|
23
|
-
const time = dayjs;
|
|
24
|
-
|
|
25
|
-
const path = require("path");
|
|
26
|
-
const projectPath = path.resolve(__dirname, "../../../../../");
|
|
27
|
-
const modulePath = path.join(projectPath, "node_modules", "artes");
|
|
28
|
-
|
|
29
|
-
const moduleConfig = {
|
|
30
|
-
projectPath: projectPath,
|
|
31
|
-
modulePackageJsonPath: path.join(modulePath, "package.json"),
|
|
32
|
-
modulePath: modulePath,
|
|
33
|
-
reportPath: path.join(projectPath, "report"),
|
|
34
|
-
tracerPath: path.join(projectPath, "trace.zip"),
|
|
35
|
-
cucumberConfigPath: path.join(projectPath, "artes.config.js"),
|
|
36
|
-
featuresPath: path.join(projectPath, "tests", "features"),
|
|
37
|
-
stepsPath: path.join(projectPath, "tests", "steps", "*.js"),
|
|
38
|
-
pomPath: path.join(projectPath, "tests", "POMs"),
|
|
39
|
-
cleanUpPaths: [
|
|
40
|
-
"allure-result",
|
|
41
|
-
"allure-results",
|
|
42
|
-
"test-results",
|
|
43
|
-
"@rerun.txt",
|
|
44
|
-
"test-status",
|
|
45
|
-
"null",
|
|
46
|
-
"pomDuplicateWarnings.json",
|
|
47
|
-
"browser-info.json",
|
|
48
|
-
],
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
module.exports = {
|
|
52
|
-
expect,
|
|
53
|
-
Given,
|
|
54
|
-
When,
|
|
55
|
-
Then,
|
|
56
|
-
element,
|
|
57
|
-
selector,
|
|
58
|
-
extractVarsFromResponse,
|
|
59
|
-
pathToCamelCase,
|
|
60
|
-
normalizeCrossplatformPath,
|
|
61
|
-
saveVar,
|
|
62
|
-
resolveVariable,
|
|
63
|
-
random,
|
|
64
|
-
time,
|
|
65
|
-
browserPage,
|
|
66
|
-
request,
|
|
67
|
-
context,
|
|
68
|
-
moduleConfig,
|
|
69
|
-
};
|
|
1
|
+
const { expect } = require("playwright/test");
|
|
2
|
+
const { Given, When, Then } = require("@cucumber/cucumber");
|
|
3
|
+
const {
|
|
4
|
+
getElement,
|
|
5
|
+
getSelector,
|
|
6
|
+
extractVarsFromResponse,
|
|
7
|
+
pathToCamelCase,
|
|
8
|
+
saveVar,
|
|
9
|
+
resolveVariable,
|
|
10
|
+
normalizeCrossplatformPath
|
|
11
|
+
} = require("../controller/elementController");
|
|
12
|
+
const { context } = require("../../hooks/context");
|
|
13
|
+
|
|
14
|
+
const { faker } = require("@faker-js/faker");
|
|
15
|
+
const dayjs = require("dayjs");
|
|
16
|
+
|
|
17
|
+
const element = getElement;
|
|
18
|
+
const selector = getSelector;
|
|
19
|
+
const browserPage = context.page;
|
|
20
|
+
const request = context.request;
|
|
21
|
+
|
|
22
|
+
const random = faker;
|
|
23
|
+
const time = dayjs;
|
|
24
|
+
|
|
25
|
+
const path = require("path");
|
|
26
|
+
const projectPath = path.resolve(__dirname, "../../../../../");
|
|
27
|
+
const modulePath = path.join(projectPath, "node_modules", "artes");
|
|
28
|
+
|
|
29
|
+
const moduleConfig = {
|
|
30
|
+
projectPath: projectPath,
|
|
31
|
+
modulePackageJsonPath: path.join(modulePath, "package.json"),
|
|
32
|
+
modulePath: modulePath,
|
|
33
|
+
reportPath: path.join(projectPath, "report"),
|
|
34
|
+
tracerPath: path.join(projectPath, "trace.zip"),
|
|
35
|
+
cucumberConfigPath: path.join(projectPath, "artes.config.js"),
|
|
36
|
+
featuresPath: path.join(projectPath, "tests", "features"),
|
|
37
|
+
stepsPath: path.join(projectPath, "tests", "steps", "*.js"),
|
|
38
|
+
pomPath: path.join(projectPath, "tests", "POMs"),
|
|
39
|
+
cleanUpPaths: [
|
|
40
|
+
"allure-result",
|
|
41
|
+
"allure-results",
|
|
42
|
+
"test-results",
|
|
43
|
+
"@rerun.txt",
|
|
44
|
+
"test-status",
|
|
45
|
+
"null",
|
|
46
|
+
"pomDuplicateWarnings.json",
|
|
47
|
+
"browser-info.json",
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
module.exports = {
|
|
52
|
+
expect,
|
|
53
|
+
Given,
|
|
54
|
+
When,
|
|
55
|
+
Then,
|
|
56
|
+
element,
|
|
57
|
+
selector,
|
|
58
|
+
extractVarsFromResponse,
|
|
59
|
+
pathToCamelCase,
|
|
60
|
+
normalizeCrossplatformPath,
|
|
61
|
+
saveVar,
|
|
62
|
+
resolveVariable,
|
|
63
|
+
random,
|
|
64
|
+
time,
|
|
65
|
+
browserPage,
|
|
66
|
+
request,
|
|
67
|
+
context,
|
|
68
|
+
moduleConfig,
|
|
69
|
+
};
|