@uuv/cypress 2.21.4 → 2.23.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,25 @@
1
+ # [2.23.0](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.22.0...runner-cypress-v2.23.0) (2024-07-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **assistant:** remove not required cucumber dependency ([da9f7b0](https://github.com/Orange-OpenSource/uuv/commit/da9f7b0089aeffc63604a306a799230fbcd70d3f))
7
+
8
+
9
+ ### Features
10
+
11
+ * **assistant:** update dependency @codemirror/view to v6.28.4 ([62aa840](https://github.com/Orange-OpenSource/uuv/commit/62aa8407bef7f2c953d1b7fe5a0b9fc8eb02812c))
12
+ * **assistant:** update dependency @uiw/codemirror-theme-github to v4.23.0 ([ca8e6b8](https://github.com/Orange-OpenSource/uuv/commit/ca8e6b83fac8b14ac0108ba263b968a2f9706528))
13
+ * **runner-cypress:** update dependency cypress to v13.13.0 ([78a9cfc](https://github.com/Orange-OpenSource/uuv/commit/78a9cfc4b0de465c527db65618bd9b4bd70704f6))
14
+ * **runner-playwright:** update dependency playwright-bdd to v6.6.0 ([f30b4d5](https://github.com/Orange-OpenSource/uuv/commit/f30b4d5ae5177e5a4281ee742debf0c3c73b47ac))
15
+
16
+ # [2.22.0](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.21.4...runner-cypress-v2.22.0) (2024-07-02)
17
+
18
+
19
+ ### Features
20
+
21
+ * introduce ipc-server to send uuv event, [#664](https://github.com/Orange-OpenSource/uuv/issues/664) ([270ac38](https://github.com/Orange-OpenSource/uuv/commit/270ac388a7abf17b0c296d029d6e12bd66a4f521))
22
+
1
23
  ## [2.21.4](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.21.3...runner-cypress-v2.21.4) (2024-06-27)
2
24
 
3
25
 
@@ -30,15 +30,23 @@ exports.setupNodeEvents = void 0;
30
30
  const webpack = __importStar(require("@cypress/webpack-preprocessor"));
31
31
  const cypress_cucumber_preprocessor_1 = require("@badeball/cypress-cucumber-preprocessor");
32
32
  const fs_1 = __importDefault(require("fs"));
33
+ const runner_commons_1 = require("@uuv/runner-commons");
33
34
  async function setupNodeEvents(on, config) {
34
35
  const startedFile = [];
35
36
  await (0, cypress_cucumber_preprocessor_1.addCucumberPreprocessorPlugin)(on, config);
37
+ await runner_commons_1.UUVListenerHelper.build();
36
38
  on("file:preprocessor", webpack.default({
37
39
  webpackOptions: {
38
40
  resolve: {
39
41
  extensions: [".ts", ".js"],
40
42
  fallback: {
43
+ child_process: false,
41
44
  fs: false,
45
+ os: false,
46
+ net: false,
47
+ tls: false,
48
+ dgram: false,
49
+ util: false,
42
50
  path: require.resolve("path-browserify")
43
51
  }
44
52
  },
@@ -79,60 +87,55 @@ async function setupNodeEvents(on, config) {
79
87
  if (generateA11yReport === true) {
80
88
  initA11yReport(a11yReportFilePath);
81
89
  }
82
- logTeamCity("##teamcity[progressStart 'Running UUV Tests']");
90
+ runner_commons_1.UUVEventEmitter.getInstance().emitProgressStart();
83
91
  });
84
92
  on("after:run", async () => {
85
93
  await (0, cypress_cucumber_preprocessor_1.afterRunHandler)(config);
86
- logTeamCity("##teamcity[progressFinish 'Running UUV Tests']");
94
+ runner_commons_1.UUVEventEmitter.getInstance().emitProgressFinish();
87
95
  });
88
96
  on("before:spec", async (spec) => {
89
97
  if (!startedFile.includes(spec.absolute)) {
90
98
  await (0, cypress_cucumber_preprocessor_1.beforeSpecHandler)(config, spec);
91
- logTeamCity(`##teamcity[testSuiteStarted ${teamcityAddName(spec.name)} ${teamcityFlowId(spec.name)} ${teamcityAddCustomField("locationHint", "test://" + spec.absolute)} ]`);
99
+ runner_commons_1.UUVEventEmitter.getInstance().emitTestSuiteStarted({
100
+ testSuiteName: spec.name,
101
+ testSuitelocation: spec.absolute
102
+ });
92
103
  startedFile.push(spec.absolute);
93
104
  }
94
105
  });
95
106
  on("after:spec", async (spec, results) => {
96
107
  await (0, cypress_cucumber_preprocessor_1.afterSpecHandler)(config, spec, results);
97
108
  results?.tests?.forEach(test => {
98
- logTeamCity(`##teamcity[testStarted ${teamcityAddName(test.title[1])} ${teamcityFlowIdAndParentFlowId(test.title[1], spec.name)} ${teamcityAddCustomField("locationHint", "test://" + spec.absolute)} ]`);
109
+ runner_commons_1.UUVEventEmitter.getInstance().emitTestStarted({
110
+ testName: test.title[1],
111
+ testSuiteName: spec.name,
112
+ testSuitelocation: spec.absolute
113
+ });
99
114
  if (test.state === "passed") {
100
- // eslint-disable-next-line max-len
101
- logTeamCity(`##teamcity[testFinished ${teamcityAddName(test.title[1])} ${teamcityFlowIdAndParentFlowId(test.title[1], spec.name)} ${teamcityAddDuration(test)} ]`);
115
+ runner_commons_1.UUVEventEmitter.getInstance().emitTestFinished({
116
+ testName: test.title[1],
117
+ testSuiteName: spec.name,
118
+ duration: test.duration
119
+ });
102
120
  }
103
121
  else if (test.state === "failed") {
104
- // eslint-disable-next-line max-len
105
- logTeamCity(`##teamcity[testFailed ${teamcityAddName(test.title[1])} ${teamcityFlowIdAndParentFlowId(test.title[1], spec.name)} type='comparisonFailure' message='Test failed' ]`);
106
- // eslint-disable-next-line max-len
107
- logTeamCity(`##teamcity[testFinished ${teamcityAddName(test.title[1])} ${teamcityFlowIdAndParentFlowId(test.title[1], spec.name)} ${teamcityAddDuration(test)} ]`);
122
+ runner_commons_1.UUVEventEmitter.getInstance().emitTestFailed({
123
+ testName: test.title[1],
124
+ testSuiteName: spec.name,
125
+ duration: test.duration
126
+ });
108
127
  }
109
128
  else {
110
- logTeamCity(`##teamcity[testIgnored ${teamcityAddName(test.title[1])} ${teamcityFlowIdAndParentFlowId(test.title[1], spec.name)} ]`);
129
+ runner_commons_1.UUVEventEmitter.getInstance().emitTestIgnored({
130
+ testName: test.title[1],
131
+ testSuiteName: spec.name
132
+ });
111
133
  }
112
134
  });
113
- logTeamCity(`##teamcity[testSuiteFinished ${teamcityAddName(spec.name)} ${teamcityFlowId(spec.name)}]`);
135
+ runner_commons_1.UUVEventEmitter.getInstance().emitTestSuiteFinished({
136
+ testSuiteName: spec.name
137
+ });
114
138
  });
115
- function logTeamCity(line) {
116
- // eslint-disable-next-line dot-notation
117
- if (config.env["enableTeamcityLogging"]) {
118
- console.log(line);
119
- }
120
- }
121
- function teamcityFlowId(name) {
122
- return "flowId='" + name.replaceAll("'", "|'") + "'";
123
- }
124
- function teamcityFlowIdAndParentFlowId(name, parentName) {
125
- return "flowId='" + name.replaceAll("'", "|'") + "' parent='" + parentName.replaceAll("'", "|'") + "'";
126
- }
127
- function teamcityAddName(name) {
128
- return "name='" + name.replaceAll("'", "|'") + "'";
129
- }
130
- function teamcityAddDuration(testResult) {
131
- return "duration='" + testResult.attempts[testResult.attempts.length - 1].wallClockDuration + "'";
132
- }
133
- function teamcityAddCustomField(fieldName, value) {
134
- return `${fieldName}='${value}'`;
135
- }
136
139
  function clearA11yReport(reportFilePath) {
137
140
  if (fs_1.default.existsSync(reportFilePath)) {
138
141
  fs_1.default.rmSync(reportFilePath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/cypress",
3
- "version": "2.21.4",
3
+ "version": "2.23.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",
@@ -37,8 +37,8 @@
37
37
  "package": "npm pack --pack-destination=\"../../dist/packages\"",
38
38
  "postinstall": "node postinstall.js",
39
39
  "unit-tests": "jest --runInBand --coverage --config=./jest.config.ts",
40
- "e2e-test:run": "node test.js e2e",
41
- "e2e-test:open": "node test.js open --",
40
+ "e2e-test:run": "ts-node test.ts e2e",
41
+ "e2e-test:open": "ts-node test.ts open --",
42
42
  "test": "npm run unit-test && npm run e2e-test:run",
43
43
  "lint": "eslint -c .eslintrc.json"
44
44
  },
@@ -46,11 +46,11 @@
46
46
  "@badeball/cypress-cucumber-preprocessor": "20.0.7",
47
47
  "@cypress/webpack-preprocessor": "6.0.2",
48
48
  "@testing-library/cypress": "10.0.2",
49
- "@uuv/a11y": "1.0.0-beta.31",
50
- "@uuv/runner-commons": "2.16.4",
49
+ "@uuv/a11y": "1.0.0-beta.33",
50
+ "@uuv/runner-commons": "2.18.0",
51
51
  "axe-core": "4.9.1",
52
52
  "chai-subset": "^1.6.0",
53
- "cypress": "13.10.0",
53
+ "cypress": "13.13.0",
54
54
  "cypress-axe": "1.5.0",
55
55
  "cypress-real-events": "^1.10.0",
56
56
  "is-admin": "4.0.0",