codeceptjs 3.7.3 → 3.7.5-beta.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/README.md +45 -0
- package/bin/codecept.js +3 -0
- package/bin/test-server.js +53 -0
- package/lib/codecept.js +46 -0
- package/lib/command/init.js +5 -0
- package/lib/command/run-workers.js +16 -1
- package/lib/command/workers/runTests.js +220 -14
- package/lib/container.js +16 -3
- package/lib/element/WebElement.js +327 -0
- package/lib/helper/JSONResponse.js +23 -4
- package/lib/helper/Mochawesome.js +30 -9
- package/lib/helper/Playwright.js +74 -38
- package/lib/helper/Puppeteer.js +107 -28
- package/lib/helper/WebDriver.js +18 -4
- package/lib/listener/retryEnhancer.js +85 -0
- package/lib/listener/steps.js +12 -0
- package/lib/mocha/asyncWrapper.js +13 -3
- package/lib/mocha/cli.js +1 -1
- package/lib/mocha/gherkin.js +1 -1
- package/lib/mocha/test.js +18 -1
- package/lib/mocha/ui.js +13 -0
- package/lib/output.js +8 -10
- package/lib/pause.js +6 -1
- package/lib/plugin/commentStep.js +1 -1
- package/lib/plugin/htmlReporter.js +2955 -0
- package/lib/plugin/screenshotOnFail.js +1 -9
- package/lib/recorder.js +9 -0
- package/lib/test-server.js +323 -0
- package/lib/utils/mask_data.js +53 -0
- package/lib/utils.js +34 -2
- package/lib/workerStorage.js +2 -1
- package/lib/workers.js +135 -9
- package/package.json +41 -37
- package/typings/index.d.ts +17 -4
- package/typings/promiseBasedTypes.d.ts +53 -688
- package/typings/types.d.ts +125 -691
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.5-beta.1",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"repository": "Codeception/codeceptjs",
|
|
44
44
|
"scripts": {
|
|
45
|
-
"
|
|
45
|
+
"test-server": "node bin/test-server.js test/data/rest/db.json --host 0.0.0.0 -p 8010",
|
|
46
46
|
"json-server:graphql": "node test/data/graphql/index.js",
|
|
47
47
|
"lint": "eslint bin/ examples/ lib/ test/ translations/ runok.js",
|
|
48
48
|
"lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.js --fix",
|
|
@@ -75,17 +75,18 @@
|
|
|
75
75
|
"publish-beta": "./runok.js publish:next-beta-version"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@codeceptjs/configure": "1.0.
|
|
78
|
+
"@codeceptjs/configure": "1.0.6",
|
|
79
79
|
"@codeceptjs/helper": "2.0.4",
|
|
80
80
|
"@cucumber/cucumber-expressions": "18",
|
|
81
|
-
"@cucumber/gherkin": "32",
|
|
81
|
+
"@cucumber/gherkin": "32.1.2",
|
|
82
82
|
"@cucumber/messages": "27.2.0",
|
|
83
83
|
"@xmldom/xmldom": "0.9.8",
|
|
84
84
|
"acorn": "8.14.1",
|
|
85
85
|
"arrify": "3.0.0",
|
|
86
|
-
"axios": "1.
|
|
86
|
+
"axios": "1.11.0",
|
|
87
87
|
"chalk": "4.1.2",
|
|
88
88
|
"cheerio": "^1.0.0",
|
|
89
|
+
"chokidar": "^4.0.3",
|
|
89
90
|
"commander": "11.1.0",
|
|
90
91
|
"cross-spawn": "7.0.6",
|
|
91
92
|
"css-to-xpath": "0.1.0",
|
|
@@ -95,83 +96,86 @@
|
|
|
95
96
|
"figures": "3.2.0",
|
|
96
97
|
"fn-args": "4.0.0",
|
|
97
98
|
"fs-extra": "11.3.0",
|
|
98
|
-
"glob": ">=9.0.0 <12",
|
|
99
99
|
"fuse.js": "^7.0.0",
|
|
100
|
+
"glob": ">=9.0.0 <12",
|
|
100
101
|
"html-minifier-terser": "7.2.0",
|
|
101
|
-
"inquirer": "8.2.
|
|
102
|
+
"inquirer": "^8.2.7",
|
|
102
103
|
"invisi-data": "^1.0.0",
|
|
103
104
|
"joi": "17.13.3",
|
|
104
105
|
"js-beautify": "1.15.4",
|
|
105
106
|
"lodash.clonedeep": "4.5.0",
|
|
106
107
|
"lodash.merge": "4.6.2",
|
|
108
|
+
"lodash.shuffle": "4.2.0",
|
|
107
109
|
"mkdirp": "3.0.1",
|
|
108
|
-
"mocha": "11.
|
|
109
|
-
"monocart-coverage-reports": "2.12.
|
|
110
|
+
"mocha": "11.6.0",
|
|
111
|
+
"monocart-coverage-reports": "2.12.6",
|
|
110
112
|
"ms": "2.1.3",
|
|
113
|
+
"multer": "^2.0.2",
|
|
111
114
|
"ora-classic": "5.4.2",
|
|
112
115
|
"parse-function": "5.6.10",
|
|
113
|
-
"parse5": "7.
|
|
116
|
+
"parse5": "7.3.0",
|
|
114
117
|
"promise-retry": "1.1.1",
|
|
115
118
|
"resq": "1.11.0",
|
|
116
119
|
"sprintf-js": "1.1.3",
|
|
117
120
|
"uuid": "11.1.0"
|
|
118
121
|
},
|
|
119
122
|
"optionalDependencies": {
|
|
120
|
-
"@codeceptjs/detox-helper": "1.1.
|
|
123
|
+
"@codeceptjs/detox-helper": "1.1.8"
|
|
121
124
|
},
|
|
122
125
|
"devDependencies": {
|
|
123
126
|
"@apollo/server": "^4",
|
|
124
|
-
"@codeceptjs/expect-helper": "^1.0.
|
|
127
|
+
"@codeceptjs/expect-helper": "^1.0.2",
|
|
125
128
|
"@codeceptjs/mock-request": "0.3.1",
|
|
126
|
-
"@eslint/eslintrc": "3.3.
|
|
127
|
-
"@eslint/js": "9.
|
|
128
|
-
"@faker-js/faker": "9.
|
|
129
|
+
"@eslint/eslintrc": "3.3.1",
|
|
130
|
+
"@eslint/js": "9.34.0",
|
|
131
|
+
"@faker-js/faker": "9.8.0",
|
|
129
132
|
"@pollyjs/adapter-puppeteer": "6.0.6",
|
|
130
133
|
"@pollyjs/core": "6.0.6",
|
|
131
|
-
"@types/chai": "5.2.
|
|
134
|
+
"@types/chai": "5.2.2",
|
|
132
135
|
"@types/inquirer": "9.0.7",
|
|
133
|
-
"@types/node": "
|
|
134
|
-
"@wdio/sauce-service": "9.12.
|
|
136
|
+
"@types/node": "24.0.10",
|
|
137
|
+
"@wdio/sauce-service": "9.12.5",
|
|
135
138
|
"@wdio/selenium-standalone-service": "8.15.0",
|
|
136
|
-
"@wdio/utils": "9.
|
|
139
|
+
"@wdio/utils": "9.15.0",
|
|
137
140
|
"@xmldom/xmldom": "0.9.8",
|
|
138
141
|
"chai": "^4.0.0",
|
|
139
142
|
"chai-as-promised": "7.1.2",
|
|
140
143
|
"chai-subset": "1.6.0",
|
|
141
144
|
"documentation": "14.0.3",
|
|
142
|
-
"electron": "
|
|
143
|
-
"eslint": "^9.
|
|
144
|
-
"eslint-plugin-import": "2.
|
|
145
|
-
"eslint-plugin-mocha": "
|
|
146
|
-
"expect": "
|
|
147
|
-
"express": "
|
|
148
|
-
"globals": "16.
|
|
149
|
-
"graphql": "16.
|
|
145
|
+
"electron": "37.2.3",
|
|
146
|
+
"eslint": "^9.24.0",
|
|
147
|
+
"eslint-plugin-import": "2.32.0",
|
|
148
|
+
"eslint-plugin-mocha": "11.1.0",
|
|
149
|
+
"expect": "30.0.5",
|
|
150
|
+
"express": "^5.1.0",
|
|
151
|
+
"globals": "16.2.0",
|
|
152
|
+
"graphql": "16.11.0",
|
|
150
153
|
"graphql-tag": "^2.12.6",
|
|
151
154
|
"husky": "9.1.7",
|
|
152
155
|
"inquirer-test": "2.0.1",
|
|
153
156
|
"jsdoc": "^3.6.11",
|
|
154
157
|
"jsdoc-typeof-plugin": "1.0.0",
|
|
155
158
|
"json-server": "0.17.4",
|
|
156
|
-
"
|
|
159
|
+
"mochawesome": "^7.1.3",
|
|
160
|
+
"playwright": "1.54.1",
|
|
157
161
|
"prettier": "^3.3.2",
|
|
158
|
-
"puppeteer": "24.
|
|
162
|
+
"puppeteer": "24.15.0",
|
|
159
163
|
"qrcode-terminal": "0.12.0",
|
|
160
164
|
"rosie": "2.1.1",
|
|
161
165
|
"runok": "0.9.3",
|
|
162
|
-
"semver": "7.7.
|
|
163
|
-
"sinon": "
|
|
166
|
+
"semver": "7.7.2",
|
|
167
|
+
"sinon": "21.0.0",
|
|
164
168
|
"sinon-chai": "3.7.0",
|
|
165
169
|
"testcafe": "3.7.2",
|
|
166
|
-
"ts-morph": "
|
|
170
|
+
"ts-morph": "26.0.0",
|
|
167
171
|
"ts-node": "10.9.2",
|
|
168
|
-
"tsd": "^0.
|
|
172
|
+
"tsd": "^0.33.0",
|
|
169
173
|
"tsd-jsdoc": "2.5.0",
|
|
170
|
-
"typedoc": "0.28.
|
|
171
|
-
"typedoc-plugin-markdown": "4.
|
|
172
|
-
"typescript": "5.8.
|
|
174
|
+
"typedoc": "0.28.10",
|
|
175
|
+
"typedoc-plugin-markdown": "4.8.1",
|
|
176
|
+
"typescript": "5.8.3",
|
|
173
177
|
"wdio-docker-service": "3.2.1",
|
|
174
|
-
"webdriverio": "9.12.
|
|
178
|
+
"webdriverio": "9.12.5",
|
|
175
179
|
"xml2js": "0.6.2",
|
|
176
180
|
"xpath": "0.0.34"
|
|
177
181
|
},
|
package/typings/index.d.ts
CHANGED
|
@@ -440,7 +440,7 @@ declare namespace CodeceptJS {
|
|
|
440
440
|
interface IHook {}
|
|
441
441
|
interface IScenario {}
|
|
442
442
|
interface IFeature {
|
|
443
|
-
(title: string): FeatureConfig
|
|
443
|
+
(title: string, opts?: { [key: string]: any }): FeatureConfig
|
|
444
444
|
}
|
|
445
445
|
interface CallbackOrder extends Array<any> {}
|
|
446
446
|
interface SupportObject {
|
|
@@ -486,6 +486,7 @@ declare namespace CodeceptJS {
|
|
|
486
486
|
todo: IScenario
|
|
487
487
|
}
|
|
488
488
|
interface Feature extends IFeature {
|
|
489
|
+
only: IFeature
|
|
489
490
|
skip: IFeature
|
|
490
491
|
}
|
|
491
492
|
interface IData {
|
|
@@ -519,11 +520,17 @@ declare namespace CodeceptJS {
|
|
|
519
520
|
}
|
|
520
521
|
}
|
|
521
522
|
|
|
523
|
+
type TryTo = <T>(fn: () => Promise<T> | T) => Promise<T | false>;
|
|
524
|
+
type HopeThat = <T>(fn: () => Promise<T> | T) => Promise<T | false>;
|
|
525
|
+
type RetryTo = <T>(fn: () => Promise<T> | T, retries?: number) => Promise<T>;
|
|
526
|
+
|
|
527
|
+
|
|
522
528
|
// Globals
|
|
523
529
|
declare const codecept_dir: string
|
|
524
530
|
declare const output_dir: string
|
|
525
|
-
declare
|
|
526
|
-
declare
|
|
531
|
+
declare const tryTo: TryTo;
|
|
532
|
+
declare const retryTo: RetryTo;
|
|
533
|
+
declare const hopeThat: HopeThat;
|
|
527
534
|
|
|
528
535
|
declare const actor: CodeceptJS.actor
|
|
529
536
|
declare const codecept_actor: CodeceptJS.actor
|
|
@@ -545,7 +552,7 @@ declare const Given: typeof CodeceptJS.addStep
|
|
|
545
552
|
declare const When: typeof CodeceptJS.addStep
|
|
546
553
|
declare const Then: typeof CodeceptJS.addStep
|
|
547
554
|
|
|
548
|
-
declare const Feature:
|
|
555
|
+
declare const Feature: CodeceptJS.Feature
|
|
549
556
|
declare const Scenario: CodeceptJS.Scenario
|
|
550
557
|
declare const xScenario: CodeceptJS.IScenario
|
|
551
558
|
declare const xFeature: CodeceptJS.IFeature
|
|
@@ -634,3 +641,9 @@ declare module 'codeceptjs' {
|
|
|
634
641
|
declare module '@codeceptjs/helper' {
|
|
635
642
|
export = CodeceptJS.Helper
|
|
636
643
|
}
|
|
644
|
+
|
|
645
|
+
declare module 'codeceptjs/effects' {
|
|
646
|
+
export const tryTo: TryTo;
|
|
647
|
+
export const retryTo: RetryTo;
|
|
648
|
+
export const hopeThat: HopeThat;
|
|
649
|
+
}
|