@uuv/cypress 2.21.3 → 2.22.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 +14 -0
- package/dist/cypress/cypress.config.js +36 -33
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [2.22.0](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.21.4...runner-cypress-v2.22.0) (2024-07-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* 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))
|
|
7
|
+
|
|
8
|
+
## [2.21.4](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.21.3...runner-cypress-v2.21.4) (2024-06-27)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **runner-cypress:** update testing-library monorepo ([bcedb57](https://github.com/Orange-OpenSource/uuv/commit/bcedb5749fd5f062cfb283bedabfe8ad87668c67))
|
|
14
|
+
|
|
1
15
|
## [2.21.3](https://github.com/Orange-OpenSource/uuv/compare/runner-cypress-v2.21.2...runner-cypress-v2.21.3) (2024-06-16)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
101
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
|
|
129
|
+
runner_commons_1.UUVEventEmitter.getInstance().emitTestIgnored({
|
|
130
|
+
testName: test.title[1],
|
|
131
|
+
testSuiteName: spec.name
|
|
132
|
+
});
|
|
111
133
|
}
|
|
112
134
|
});
|
|
113
|
-
|
|
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.
|
|
3
|
+
"version": "2.22.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,17 +37,17 @@
|
|
|
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.
|
|
41
|
-
"e2e-test:open": "node test.
|
|
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
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@badeball/cypress-cucumber-preprocessor": "20.0.7",
|
|
47
47
|
"@cypress/webpack-preprocessor": "6.0.2",
|
|
48
|
-
"@testing-library/cypress": "10.0.
|
|
49
|
-
"@uuv/a11y": "1.0.0-beta.
|
|
50
|
-
"@uuv/runner-commons": "2.
|
|
48
|
+
"@testing-library/cypress": "10.0.2",
|
|
49
|
+
"@uuv/a11y": "1.0.0-beta.32",
|
|
50
|
+
"@uuv/runner-commons": "2.17.0",
|
|
51
51
|
"axe-core": "4.9.1",
|
|
52
52
|
"chai-subset": "^1.6.0",
|
|
53
53
|
"cypress": "13.10.0",
|