codeceptjs 3.7.6-beta.4 → 3.7.6
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/lib/codecept.js +15 -2
- package/lib/helper/Playwright.js +5 -1
- package/lib/listener/globalTimeout.js +19 -4
- package/lib/mocha/test.js +4 -2
- package/lib/output.js +2 -2
- package/lib/plugin/htmlReporter.js +741 -88
- package/lib/plugin/retryFailedStep.js +1 -0
- package/lib/result.js +8 -3
- package/lib/step/base.js +1 -1
- package/lib/step/meta.js +1 -1
- package/package.json +17 -17
- package/typings/types.d.ts +14 -3
|
@@ -108,6 +108,7 @@ module.exports = config => {
|
|
|
108
108
|
event.dispatcher.on(event.test.before, test => {
|
|
109
109
|
// pass disableRetryFailedStep is a preferred way to disable retries
|
|
110
110
|
// test.disableRetryFailedStep is used for backward compatibility
|
|
111
|
+
if (!test.opts) test.opts = {}
|
|
111
112
|
if (test.opts.disableRetryFailedStep || test.disableRetryFailedStep) {
|
|
112
113
|
store.autoRetries = false
|
|
113
114
|
return // disable retry when a test is not active
|
package/lib/result.js
CHANGED
|
@@ -14,6 +14,11 @@ const { serializeTest } = require('./mocha/test')
|
|
|
14
14
|
* @property {number} duration Duration of the test run, in milliseconds.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @typedef {Array<string|number>} Failure
|
|
19
|
+
* A detailed formatted report for a failed test.
|
|
20
|
+
*/
|
|
21
|
+
|
|
17
22
|
/**
|
|
18
23
|
* Result of a test run. Will be emitted for example in "event.all.result" events.
|
|
19
24
|
*/
|
|
@@ -48,7 +53,7 @@ class Result {
|
|
|
48
53
|
this._tests = []
|
|
49
54
|
|
|
50
55
|
/**
|
|
51
|
-
* @type {
|
|
56
|
+
* @type {Failure[]}
|
|
52
57
|
* @private
|
|
53
58
|
*/
|
|
54
59
|
this._failures = []
|
|
@@ -91,7 +96,7 @@ class Result {
|
|
|
91
96
|
/**
|
|
92
97
|
* The failure reports (array of strings per failed test).
|
|
93
98
|
*
|
|
94
|
-
* @type {
|
|
99
|
+
* @type {Failure[]}
|
|
95
100
|
* @readonly
|
|
96
101
|
*/
|
|
97
102
|
get failures() {
|
|
@@ -136,7 +141,7 @@ class Result {
|
|
|
136
141
|
/**
|
|
137
142
|
* Adds failure reports to this result.
|
|
138
143
|
*
|
|
139
|
-
* @param {
|
|
144
|
+
* @param {Failure[]} newFailures
|
|
140
145
|
*/
|
|
141
146
|
addFailures(newFailures) {
|
|
142
147
|
this._failures.push(...newFailures)
|
package/lib/step/base.js
CHANGED
|
@@ -225,7 +225,7 @@ class Step {
|
|
|
225
225
|
processingStep = this
|
|
226
226
|
|
|
227
227
|
while (processingStep.metaStep) {
|
|
228
|
-
if (processingStep.metaStep.actor?.match(/^(Given|When|Then|And)/)) {
|
|
228
|
+
if (processingStep.metaStep.actor?.match(/^(Given|When|Then|And|But)/)) {
|
|
229
229
|
hasBDD = true
|
|
230
230
|
break
|
|
231
231
|
} else {
|
package/lib/step/meta.js
CHANGED
|
@@ -15,7 +15,7 @@ class MetaStep extends Step {
|
|
|
15
15
|
|
|
16
16
|
/** @return {boolean} */
|
|
17
17
|
isBDD() {
|
|
18
|
-
if (this.actor && this.actor.match && this.actor.match(/^(Given|When|Then|And)/)) {
|
|
18
|
+
if (this.actor && this.actor.match && this.actor.match(/^(Given|When|Then|And|But)/)) {
|
|
19
19
|
return true
|
|
20
20
|
}
|
|
21
21
|
return false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.7.6
|
|
3
|
+
"version": "3.7.6",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@xmldom/xmldom": "0.9.8",
|
|
92
92
|
"acorn": "8.15.0",
|
|
93
93
|
"arrify": "3.0.0",
|
|
94
|
-
"axios": "1.
|
|
94
|
+
"axios": "1.13.2",
|
|
95
95
|
"chalk": "4.1.2",
|
|
96
96
|
"cheerio": "^1.0.0",
|
|
97
97
|
"chokidar": "^4.0.3",
|
|
@@ -103,19 +103,18 @@
|
|
|
103
103
|
"escape-string-regexp": "4.0.0",
|
|
104
104
|
"figures": "3.2.0",
|
|
105
105
|
"fn-args": "4.0.0",
|
|
106
|
-
"fs-extra": "11.3.
|
|
106
|
+
"fs-extra": "11.3.3",
|
|
107
107
|
"fuse.js": "^7.0.0",
|
|
108
108
|
"glob": ">=9.0.0 <12",
|
|
109
109
|
"html-minifier-terser": "7.2.0",
|
|
110
110
|
"inquirer": "^8.2.7",
|
|
111
111
|
"invisi-data": "^1.0.0",
|
|
112
|
-
"joi": "18.0.
|
|
112
|
+
"joi": "18.0.2",
|
|
113
113
|
"js-beautify": "1.15.4",
|
|
114
114
|
"lodash.clonedeep": "4.5.0",
|
|
115
115
|
"lodash.merge": "4.6.2",
|
|
116
|
-
"lodash.shuffle": "4.2.0",
|
|
117
116
|
"mkdirp": "3.0.1",
|
|
118
|
-
"mocha": "11.7.
|
|
117
|
+
"mocha": "11.7.5",
|
|
119
118
|
"monocart-coverage-reports": "2.12.9",
|
|
120
119
|
"ms": "2.1.3",
|
|
121
120
|
"multer": "^2.0.2",
|
|
@@ -128,18 +127,18 @@
|
|
|
128
127
|
"uuid": "11.1.0"
|
|
129
128
|
},
|
|
130
129
|
"optionalDependencies": {
|
|
131
|
-
"@codeceptjs/detox-helper": "1.1.
|
|
130
|
+
"@codeceptjs/detox-helper": "1.1.14"
|
|
132
131
|
},
|
|
133
132
|
"devDependencies": {
|
|
134
133
|
"@apollo/server": "^5",
|
|
135
134
|
"@codeceptjs/expect-helper": "^1.0.2",
|
|
136
135
|
"@codeceptjs/mock-request": "0.3.1",
|
|
137
|
-
"@eslint/eslintrc": "3.3.
|
|
138
|
-
"@eslint/js": "9.
|
|
136
|
+
"@eslint/eslintrc": "3.3.3",
|
|
137
|
+
"@eslint/js": "9.39.2",
|
|
139
138
|
"@faker-js/faker": "9.8.0",
|
|
140
139
|
"@pollyjs/adapter-puppeteer": "6.0.6",
|
|
141
140
|
"@pollyjs/core": "6.0.6",
|
|
142
|
-
"@types/chai": "5.2.
|
|
141
|
+
"@types/chai": "5.2.3",
|
|
143
142
|
"@types/inquirer": "9.0.9",
|
|
144
143
|
"@types/node": "^24.6.2",
|
|
145
144
|
"@wdio/sauce-service": "9.12.5",
|
|
@@ -153,11 +152,11 @@
|
|
|
153
152
|
"electron": "38.2.0",
|
|
154
153
|
"eslint": "^9.36.0",
|
|
155
154
|
"eslint-plugin-import": "2.32.0",
|
|
156
|
-
"eslint-plugin-mocha": "11.
|
|
155
|
+
"eslint-plugin-mocha": "11.2.0",
|
|
157
156
|
"expect": "30.2.0",
|
|
158
157
|
"express": "^5.1.0",
|
|
159
158
|
"globals": "16.4.0",
|
|
160
|
-
"graphql": "16.
|
|
159
|
+
"graphql": "16.12.0",
|
|
161
160
|
"graphql-tag": "^2.12.6",
|
|
162
161
|
"husky": "9.1.7",
|
|
163
162
|
"inquirer-test": "2.0.1",
|
|
@@ -171,15 +170,15 @@
|
|
|
171
170
|
"qrcode-terminal": "0.12.0",
|
|
172
171
|
"rosie": "2.1.1",
|
|
173
172
|
"runok": "0.9.3",
|
|
174
|
-
"semver": "7.7.
|
|
175
|
-
"sinon": "21.0.
|
|
173
|
+
"semver": "7.7.3",
|
|
174
|
+
"sinon": "21.0.1",
|
|
176
175
|
"sinon-chai": "3.7.0",
|
|
177
|
-
"testcafe": "3.7.
|
|
176
|
+
"testcafe": "3.7.3",
|
|
178
177
|
"ts-morph": "26.0.0",
|
|
179
178
|
"ts-node": "10.9.2",
|
|
180
179
|
"tsd": "^0.33.0",
|
|
181
180
|
"tsd-jsdoc": "2.5.0",
|
|
182
|
-
"typedoc": "0.28.
|
|
181
|
+
"typedoc": "0.28.16",
|
|
183
182
|
"typedoc-plugin-markdown": "4.9.0",
|
|
184
183
|
"typescript": "5.8.3",
|
|
185
184
|
"wdio-docker-service": "3.2.1",
|
|
@@ -199,6 +198,7 @@
|
|
|
199
198
|
}
|
|
200
199
|
},
|
|
201
200
|
"overrides": {
|
|
202
|
-
"tmp": "0.2.5"
|
|
201
|
+
"tmp": "0.2.5",
|
|
202
|
+
"js-yaml": "^4.1.1"
|
|
203
203
|
}
|
|
204
204
|
}
|
package/typings/types.d.ts
CHANGED
|
@@ -11601,6 +11601,10 @@ declare namespace CodeceptJS {
|
|
|
11601
11601
|
* Loads tests by pattern or by config.tests
|
|
11602
11602
|
*/
|
|
11603
11603
|
loadTests(pattern?: string): void;
|
|
11604
|
+
/**
|
|
11605
|
+
* Fisher–Yates shuffle (non-mutating)
|
|
11606
|
+
*/
|
|
11607
|
+
shuffle(): void;
|
|
11604
11608
|
/**
|
|
11605
11609
|
* Apply sharding to test files based on shard configuration
|
|
11606
11610
|
* @param testFiles - Array of test file paths
|
|
@@ -11679,6 +11683,10 @@ declare namespace CodeceptJS {
|
|
|
11679
11683
|
end: Date;
|
|
11680
11684
|
duration: number;
|
|
11681
11685
|
};
|
|
11686
|
+
/**
|
|
11687
|
+
* A detailed formatted report for a failed test.
|
|
11688
|
+
*/
|
|
11689
|
+
type Failure = (string | number)[];
|
|
11682
11690
|
/**
|
|
11683
11691
|
* Result of a test run. Will be emitted for example in "event.all.result" events.
|
|
11684
11692
|
*/
|
|
@@ -11706,7 +11714,7 @@ declare namespace CodeceptJS {
|
|
|
11706
11714
|
/**
|
|
11707
11715
|
* The failure reports (array of strings per failed test).
|
|
11708
11716
|
*/
|
|
11709
|
-
readonly failures:
|
|
11717
|
+
readonly failures: Failure[];
|
|
11710
11718
|
/**
|
|
11711
11719
|
* The test statistics.
|
|
11712
11720
|
*/
|
|
@@ -11722,7 +11730,7 @@ declare namespace CodeceptJS {
|
|
|
11722
11730
|
/**
|
|
11723
11731
|
* Adds failure reports to this result.
|
|
11724
11732
|
*/
|
|
11725
|
-
addFailures(newFailures:
|
|
11733
|
+
addFailures(newFailures: Failure[]): void;
|
|
11726
11734
|
/**
|
|
11727
11735
|
* Whether this result contains any failed tests.
|
|
11728
11736
|
*/
|
|
@@ -12117,7 +12125,10 @@ declare namespace CodeceptJS {
|
|
|
12117
12125
|
* Print a text in console log
|
|
12118
12126
|
*/
|
|
12119
12127
|
function say(message: string, color?: string): void;
|
|
12120
|
-
|
|
12128
|
+
/**
|
|
12129
|
+
* Prints the stats of a test run to the console.
|
|
12130
|
+
*/
|
|
12131
|
+
function result(passed: number, failed: number, skipped: number, duration: number | string, failedHooks?: number): void;
|
|
12121
12132
|
}
|
|
12122
12133
|
/**
|
|
12123
12134
|
* Pauses test execution and starts interactive shell
|