@uuv/cypress 2.12.1 → 2.13.1
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/CHANGELOG.md +14 -0
- package/README.md +1 -1
- package/dist/lib/uuv-cli.js +35 -15
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.13.1](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.13.0...runner-cypress-v2.13.1) (2024-03-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **runner-cypress:** update dependency @cypress/webpack-preprocessor to v6 ([2e9a52b](https://github.com/Orange-OpenSource/uuv/commit/2e9a52b2cc1bfb05e96c212cdec0fd644f41d02b))
|
|
7
|
+
|
|
8
|
+
# [2.13.0](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.12.1...runner-cypress-v2.13.0) (2024-03-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **runner-cypress,runner-playwright:** add UUV_BASE_URL environment variable to uuv-cli, [#538](https://github.com/Orange-OpenSource/uuv/issues/538) ([7b48c9d](https://github.com/Orange-OpenSource/uuv/commit/7b48c9d28aed7b10d72120d767f50c8705c2b92d))
|
|
14
|
+
|
|
1
15
|
## [2.12.1](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.12.0...runner-cypress-v2.12.1) (2024-03-10)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ We can use the cypress engine(`@uuv/cypress`) to run test or playwright with [@u
|
|
|
64
64
|
|
|
65
65
|
## Benefits
|
|
66
66
|
- If used correctly, integrates accessibility from the development stage
|
|
67
|
-
- A living documentation is possible because we propose an unified language for developers and non-developers with a [rich dictionary](category/step-definition) of ready-to-use sentences
|
|
67
|
+
- A living documentation is possible because we propose an unified language for developers and non-developers with a [rich dictionary](https://orange-opensource.github.io/uuv/docs/category/step-definition) of ready-to-use sentences
|
|
68
68
|
- [@uuv/assistant](https://www.npmjs.com/package/@uuv/assistant) that facilitates the writing of tests by suggesting the most accessible sentences
|
|
69
69
|
- [JetBrains Plugin](https://orange-opensource.github.io/uuv/docs/tools/uuv-jetbrains-plugin) that helps you to write and execute your UUV E2E tests from JetBrains IDEs
|
|
70
70
|
- Integrates several runtime engines: Cypress / Playwright
|
package/dist/lib/uuv-cli.js
CHANGED
|
@@ -36,27 +36,42 @@ async function main(projectDir = "./uuv") {
|
|
|
36
36
|
const JUNIT_UNIFIED_REPORT = `${projectDir}/reports/e2e/junit-report.xml`;
|
|
37
37
|
const CUCUMBER_MESSAGES_FILE = path_1.default.join(projectDir, "cucumber-messages.ndjson");
|
|
38
38
|
printBanner(getCurrentVersion);
|
|
39
|
+
setBaseUrl();
|
|
39
40
|
const argv = (0, minimist_1.default)(process.argv.slice(2));
|
|
40
41
|
const command = findTargetCommand(argv);
|
|
41
42
|
console.info(chalk_1.default.blueBright(`Executing UUV command ${command}...`));
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
createReportDirectories();
|
|
44
|
+
await executeCommand();
|
|
45
|
+
console.info(`UUV command ${command} executed`);
|
|
46
|
+
function setBaseUrl() {
|
|
47
|
+
// eslint-disable-next-line dot-notation
|
|
48
|
+
const baseUrl = process.env["UUV_BASE_URL"];
|
|
49
|
+
if (baseUrl) {
|
|
50
|
+
// eslint-disable-next-line dot-notation
|
|
51
|
+
process.env["CYPRESS_BASE_URL"] = process.env["UUV_BASE_URL"];
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
function createReportDirectories() {
|
|
55
|
+
if (!fs_1.default.existsSync(REPORT_DIR)) {
|
|
56
|
+
fs_1.default.mkdirSync(REPORT_DIR);
|
|
57
|
+
}
|
|
58
|
+
if (fs_1.default.existsSync(E2E_REPORT_DIR)) {
|
|
59
|
+
deleteAllFileOfDirectory(E2E_REPORT_DIR);
|
|
60
|
+
}
|
|
47
61
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
async function executeCommand() {
|
|
63
|
+
switch (command) {
|
|
64
|
+
case "open":
|
|
65
|
+
await openCypress(argv);
|
|
66
|
+
break;
|
|
67
|
+
case "e2e":
|
|
68
|
+
await runE2ETests(argv);
|
|
69
|
+
break;
|
|
70
|
+
default:
|
|
71
|
+
console.error(chalk_1.default.red("Unknown command"));
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
58
74
|
}
|
|
59
|
-
console.info(`UUV command ${command} executed`);
|
|
60
75
|
function extractArgs(argv) {
|
|
61
76
|
const browser = argv.browser ? argv.browser : "chrome";
|
|
62
77
|
const env = argv.env ? JSON.parse(argv.env.replace(/'/g, "\"")) : {};
|
|
@@ -68,6 +83,11 @@ async function main(projectDir = "./uuv") {
|
|
|
68
83
|
env.generateJunitReport = argv.generateJunitReport;
|
|
69
84
|
env.generateHtmlReport = argv.generateHtmlReport;
|
|
70
85
|
console.debug("Variables: ");
|
|
86
|
+
// eslint-disable-next-line dot-notation
|
|
87
|
+
const baseUrl = process.env["CYPRESS_BASE_URL"];
|
|
88
|
+
if (baseUrl) {
|
|
89
|
+
console.debug(` -> baseUrl: ${baseUrl}`);
|
|
90
|
+
}
|
|
71
91
|
console.debug(` -> browser: ${browser}`);
|
|
72
92
|
console.debug(` -> env: ${JSON.stringify(env)}`);
|
|
73
93
|
if (targetTestFile) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uuv/cypress",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
|
|
6
6
|
"description": "A solution to facilitate the writing and execution of E2E tests understandable by any human being using cucumber(BDD) and cypress",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@badeball/cypress-cucumber-preprocessor": "16.0.3",
|
|
46
|
-
"@cypress/webpack-preprocessor": "
|
|
46
|
+
"@cypress/webpack-preprocessor": "6.0.1",
|
|
47
47
|
"@testing-library/cypress": "10.0.1",
|
|
48
|
-
"@uuv/a11y": "1.0.0-beta.
|
|
49
|
-
"@uuv/runner-commons": "2.8.
|
|
48
|
+
"@uuv/a11y": "1.0.0-beta.19",
|
|
49
|
+
"@uuv/runner-commons": "2.8.2",
|
|
50
50
|
"axe-core": "4.8.4",
|
|
51
51
|
"chai-subset": "^1.6.0",
|
|
52
52
|
"chalk": "4.1.2",
|