@uuv/cypress 2.12.0 → 2.13.0

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 CHANGED
@@ -1,3 +1,18 @@
1
+ # [2.13.0](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.12.1...runner-cypress-v2.13.0) (2024-03-11)
2
+
3
+
4
+ ### Features
5
+
6
+ * **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))
7
+
8
+ ## [2.12.1](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.12.0...runner-cypress-v2.12.1) (2024-03-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **runner-cypress:** update dependency @testing-library/cypress to v10 ([8ef11bf](https://github.com/Orange-OpenSource/uuv/commit/8ef11bfde65efb9ace5942113a03c06c6f8c3b6e))
14
+ * **runner-playwright:** update dependency axe-playwright to v2 ([7e3f1f4](https://github.com/Orange-OpenSource/uuv/commit/7e3f1f4793f89c9d826c341bb73f59d698c3dfa0))
15
+
1
16
  # [2.12.0](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.11.1...runner-cypress-v2.12.0) (2024-03-07)
2
17
 
3
18
 
@@ -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
- if (!fs_1.default.existsSync(REPORT_DIR)) {
43
- fs_1.default.mkdirSync(REPORT_DIR);
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
- if (fs_1.default.existsSync(E2E_REPORT_DIR)) {
46
- deleteAllFileOfDirectory(E2E_REPORT_DIR);
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
- switch (command) {
49
- case "open":
50
- await openCypress(argv);
51
- break;
52
- case "e2e":
53
- await runE2ETests(argv);
54
- break;
55
- default:
56
- console.error(chalk_1.default.red("Unknown command"));
57
- process.exit(1);
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.12.0",
3
+ "version": "2.13.0",
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",
@@ -44,9 +44,9 @@
44
44
  "dependencies": {
45
45
  "@badeball/cypress-cucumber-preprocessor": "16.0.3",
46
46
  "@cypress/webpack-preprocessor": "5.17.1",
47
- "@testing-library/cypress": "9.0.0",
48
- "@uuv/a11y": "1.0.0-beta.17",
49
- "@uuv/runner-commons": "2.8.0",
47
+ "@testing-library/cypress": "10.0.1",
48
+ "@uuv/a11y": "1.0.0-beta.18",
49
+ "@uuv/runner-commons": "2.8.1",
50
50
  "axe-core": "4.8.4",
51
51
  "chai-subset": "^1.6.0",
52
52
  "chalk": "4.1.2",