@uuv/cypress 2.23.0 → 2.23.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.23.1](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.23.0...runner-cypress-v2.23.1) (2024-07-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add lib path for event classes, [#679](https://github.com/Orange-OpenSource/uuv/issues/679) ([e8e521b](https://github.com/Orange-OpenSource/uuv/commit/e8e521ba4f3f5762cc69cdbb165ea151103d4087))
7
+
1
8
  # [2.23.0](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.22.0...runner-cypress-v2.23.0) (2024-07-07)
2
9
 
3
10
 
@@ -30,11 +30,11 @@ 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
+ const event_1 = require("@uuv/runner-commons/runner/event");
34
34
  async function setupNodeEvents(on, config) {
35
35
  const startedFile = [];
36
36
  await (0, cypress_cucumber_preprocessor_1.addCucumberPreprocessorPlugin)(on, config);
37
- await runner_commons_1.UUVListenerHelper.build();
37
+ await event_1.UUVListenerHelper.build();
38
38
  on("file:preprocessor", webpack.default({
39
39
  webpackOptions: {
40
40
  resolve: {
@@ -42,11 +42,6 @@ async function setupNodeEvents(on, config) {
42
42
  fallback: {
43
43
  child_process: false,
44
44
  fs: false,
45
- os: false,
46
- net: false,
47
- tls: false,
48
- dgram: false,
49
- util: false,
50
45
  path: require.resolve("path-browserify")
51
46
  }
52
47
  },
@@ -87,16 +82,16 @@ async function setupNodeEvents(on, config) {
87
82
  if (generateA11yReport === true) {
88
83
  initA11yReport(a11yReportFilePath);
89
84
  }
90
- runner_commons_1.UUVEventEmitter.getInstance().emitProgressStart();
85
+ event_1.UUVEventEmitter.getInstance().emitProgressStart();
91
86
  });
92
87
  on("after:run", async () => {
93
88
  await (0, cypress_cucumber_preprocessor_1.afterRunHandler)(config);
94
- runner_commons_1.UUVEventEmitter.getInstance().emitProgressFinish();
89
+ event_1.UUVEventEmitter.getInstance().emitProgressFinish();
95
90
  });
96
91
  on("before:spec", async (spec) => {
97
92
  if (!startedFile.includes(spec.absolute)) {
98
93
  await (0, cypress_cucumber_preprocessor_1.beforeSpecHandler)(config, spec);
99
- runner_commons_1.UUVEventEmitter.getInstance().emitTestSuiteStarted({
94
+ event_1.UUVEventEmitter.getInstance().emitTestSuiteStarted({
100
95
  testSuiteName: spec.name,
101
96
  testSuitelocation: spec.absolute
102
97
  });
@@ -106,33 +101,33 @@ async function setupNodeEvents(on, config) {
106
101
  on("after:spec", async (spec, results) => {
107
102
  await (0, cypress_cucumber_preprocessor_1.afterSpecHandler)(config, spec, results);
108
103
  results?.tests?.forEach(test => {
109
- runner_commons_1.UUVEventEmitter.getInstance().emitTestStarted({
104
+ event_1.UUVEventEmitter.getInstance().emitTestStarted({
110
105
  testName: test.title[1],
111
106
  testSuiteName: spec.name,
112
107
  testSuitelocation: spec.absolute
113
108
  });
114
109
  if (test.state === "passed") {
115
- runner_commons_1.UUVEventEmitter.getInstance().emitTestFinished({
110
+ event_1.UUVEventEmitter.getInstance().emitTestFinished({
116
111
  testName: test.title[1],
117
112
  testSuiteName: spec.name,
118
113
  duration: test.duration
119
114
  });
120
115
  }
121
116
  else if (test.state === "failed") {
122
- runner_commons_1.UUVEventEmitter.getInstance().emitTestFailed({
117
+ event_1.UUVEventEmitter.getInstance().emitTestFailed({
123
118
  testName: test.title[1],
124
119
  testSuiteName: spec.name,
125
120
  duration: test.duration
126
121
  });
127
122
  }
128
123
  else {
129
- runner_commons_1.UUVEventEmitter.getInstance().emitTestIgnored({
124
+ event_1.UUVEventEmitter.getInstance().emitTestIgnored({
130
125
  testName: test.title[1],
131
126
  testSuiteName: spec.name
132
127
  });
133
128
  }
134
129
  });
135
- runner_commons_1.UUVEventEmitter.getInstance().emitTestSuiteFinished({
130
+ event_1.UUVEventEmitter.getInstance().emitTestSuiteFinished({
136
131
  testSuiteName: spec.name
137
132
  });
138
133
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/cypress",
3
- "version": "2.23.0",
3
+ "version": "2.23.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",
@@ -36,7 +36,8 @@
36
36
  "generate:step-definitions": "ts-node generate-step-definitions.ts",
37
37
  "package": "npm pack --pack-destination=\"../../dist/packages\"",
38
38
  "postinstall": "node postinstall.js",
39
- "unit-tests": "jest --runInBand --coverage --config=./jest.config.ts",
39
+ "unit-tests": "jest --runInBand --coverage --config=./jest.config.ts --testPathIgnorePatterns=src/tests/report",
40
+ "verify-report": "jest --runInBand --coverage --config=./jest.config.ts --testPathPattern=src/tests/report",
40
41
  "e2e-test:run": "ts-node test.ts e2e",
41
42
  "e2e-test:open": "ts-node test.ts open --",
42
43
  "test": "npm run unit-test && npm run e2e-test:run",
@@ -46,8 +47,8 @@
46
47
  "@badeball/cypress-cucumber-preprocessor": "20.0.7",
47
48
  "@cypress/webpack-preprocessor": "6.0.2",
48
49
  "@testing-library/cypress": "10.0.2",
49
- "@uuv/a11y": "1.0.0-beta.33",
50
- "@uuv/runner-commons": "2.18.0",
50
+ "@uuv/a11y": "1.0.0-beta.34",
51
+ "@uuv/runner-commons": "2.18.1",
51
52
  "axe-core": "4.9.1",
52
53
  "chai-subset": "^1.6.0",
53
54
  "cypress": "13.13.0",