codeceptjs 4.0.0-beta.1 → 4.0.0-beta.3
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/bin/codecept.js +84 -81
- package/lib/actor.js +13 -13
- package/lib/ai.js +10 -13
- package/lib/assert/empty.js +20 -21
- package/lib/assert/equal.js +37 -39
- package/lib/assert/error.js +14 -14
- package/lib/assert/include.js +46 -47
- package/lib/assert/throws.js +13 -11
- package/lib/assert/truth.js +19 -22
- package/lib/assert.js +4 -2
- package/lib/cli.js +57 -49
- package/lib/codecept.js +142 -155
- package/lib/colorUtils.js +3 -3
- package/lib/command/configMigrate.js +58 -52
- package/lib/command/definitions.js +88 -89
- package/lib/command/dryRun.js +71 -68
- package/lib/command/generate.js +197 -188
- package/lib/command/gherkin/init.js +27 -16
- package/lib/command/gherkin/snippets.js +20 -20
- package/lib/command/gherkin/steps.js +8 -8
- package/lib/command/info.js +40 -38
- package/lib/command/init.js +290 -288
- package/lib/command/interactive.js +32 -32
- package/lib/command/list.js +26 -26
- package/lib/command/run-multiple/chunk.js +5 -5
- package/lib/command/run-multiple/collection.js +3 -3
- package/lib/command/run-multiple/run.js +6 -2
- package/lib/command/run-multiple.js +113 -93
- package/lib/command/run-rerun.js +20 -25
- package/lib/command/run-workers.js +64 -66
- package/lib/command/run.js +26 -29
- package/lib/command/utils.js +80 -65
- package/lib/command/workers/runTests.js +10 -10
- package/lib/config.js +10 -9
- package/lib/container.js +40 -48
- package/lib/data/context.js +60 -59
- package/lib/data/dataScenarioConfig.js +47 -47
- package/lib/data/dataTableArgument.js +29 -29
- package/lib/data/table.js +26 -20
- package/lib/event.js +163 -167
- package/lib/heal.js +13 -17
- package/lib/helper/AI.js +130 -41
- package/lib/helper/ApiDataFactory.js +73 -69
- package/lib/helper/Appium.js +413 -382
- package/lib/helper/ExpectHelper.js +40 -48
- package/lib/helper/FileSystem.js +80 -79
- package/lib/helper/GraphQL.js +44 -43
- package/lib/helper/GraphQLDataFactory.js +50 -50
- package/lib/helper/JSONResponse.js +65 -62
- package/lib/helper/Mochawesome.js +28 -28
- package/lib/helper/MockServer.js +12 -14
- package/lib/helper/Nightmare.js +662 -566
- package/lib/helper/Playwright.js +1361 -1216
- package/lib/helper/Protractor.js +663 -627
- package/lib/helper/Puppeteer.js +1231 -1128
- package/lib/helper/REST.js +159 -68
- package/lib/helper/SoftExpectHelper.js +2 -2
- package/lib/helper/TestCafe.js +490 -484
- package/lib/helper/WebDriver.js +1297 -1156
- package/lib/helper/clientscripts/PollyWebDriverExt.js +1 -1
- package/lib/helper/errors/ConnectionRefused.js +1 -1
- package/lib/helper/errors/ElementAssertion.js +2 -2
- package/lib/helper/errors/ElementNotFound.js +2 -2
- package/lib/helper/errors/RemoteBrowserConnectionRefused.js +1 -1
- package/lib/helper/extras/Console.js +1 -1
- package/lib/helper/extras/PlaywrightPropEngine.js +2 -2
- package/lib/helper/extras/PlaywrightReactVueLocator.js +1 -1
- package/lib/helper/extras/PlaywrightRestartOpts.js +21 -18
- package/lib/helper/extras/Popup.js +1 -1
- package/lib/helper/extras/React.js +3 -3
- package/lib/helper/network/actions.js +14 -7
- package/lib/helper/network/utils.js +3 -2
- package/lib/helper/scripts/blurElement.js +1 -1
- package/lib/helper/scripts/focusElement.js +1 -1
- package/lib/helper/scripts/highlightElement.js +1 -1
- package/lib/helper/scripts/isElementClickable.js +1 -1
- package/lib/helper/testcafe/testControllerHolder.js +1 -1
- package/lib/helper/testcafe/testcafe-utils.js +6 -7
- package/lib/helper.js +1 -3
- package/lib/history.js +6 -5
- package/lib/hooks.js +6 -6
- package/lib/html.js +7 -7
- package/lib/index.js +25 -41
- package/lib/interfaces/bdd.js +47 -64
- package/lib/interfaces/featureConfig.js +19 -19
- package/lib/interfaces/gherkin.js +124 -118
- package/lib/interfaces/scenarioConfig.js +29 -29
- package/lib/listener/artifacts.js +9 -9
- package/lib/listener/config.js +24 -24
- package/lib/listener/exit.js +12 -12
- package/lib/listener/helpers.js +42 -42
- package/lib/listener/mocha.js +11 -11
- package/lib/listener/retry.js +32 -30
- package/lib/listener/steps.js +50 -53
- package/lib/listener/timeout.js +54 -54
- package/lib/locator.js +6 -10
- package/lib/mochaFactory.js +18 -15
- package/lib/output.js +6 -10
- package/lib/parser.js +15 -12
- package/lib/pause.js +40 -33
- package/lib/plugin/allure.js +15 -15
- package/lib/plugin/autoDelay.js +29 -37
- package/lib/plugin/autoLogin.js +70 -65
- package/lib/plugin/commentStep.js +18 -18
- package/lib/plugin/coverage.js +115 -67
- package/lib/plugin/customLocator.js +21 -20
- package/lib/plugin/debugErrors.js +24 -24
- package/lib/plugin/eachElement.js +38 -38
- package/lib/plugin/fakerTransform.js +6 -6
- package/lib/plugin/heal.js +67 -108
- package/lib/plugin/pauseOnFail.js +11 -11
- package/lib/plugin/retryFailedStep.js +32 -39
- package/lib/plugin/retryTo.js +46 -40
- package/lib/plugin/screenshotOnFail.js +109 -87
- package/lib/plugin/selenoid.js +131 -118
- package/lib/plugin/standardActingHelpers.js +2 -8
- package/lib/plugin/stepByStepReport.js +110 -91
- package/lib/plugin/stepTimeout.js +24 -23
- package/lib/plugin/subtitles.js +34 -35
- package/lib/plugin/tryTo.js +40 -30
- package/lib/plugin/wdio.js +78 -75
- package/lib/recorder.js +14 -17
- package/lib/rerun.js +11 -10
- package/lib/scenario.js +25 -23
- package/lib/secret.js +4 -2
- package/lib/session.js +10 -10
- package/lib/step.js +12 -9
- package/lib/store.js +2 -3
- package/lib/transform.js +1 -1
- package/lib/translation.js +7 -8
- package/lib/ui.js +12 -14
- package/lib/utils.js +70 -72
- package/lib/within.js +10 -10
- package/lib/workerStorage.js +27 -25
- package/lib/workers.js +29 -32
- package/package.json +56 -57
- package/translations/de-DE.js +1 -1
- package/translations/fr-FR.js +1 -1
- package/translations/index.js +9 -13
- package/translations/it-IT.js +1 -1
- package/translations/ja-JP.js +1 -1
- package/translations/pl-PL.js +1 -1
- package/translations/pt-BR.js +1 -1
- package/translations/ru-RU.js +1 -1
- package/translations/zh-CN.js +1 -1
- package/translations/zh-TW.js +1 -1
- package/typings/index.d.ts +415 -65
- package/typings/promiseBasedTypes.d.ts +32 -0
- package/typings/types.d.ts +32 -0
- package/lib/dirname.js +0 -5
- package/lib/helper/Expect.js +0 -425
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.3",
|
|
4
4
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acceptance",
|
|
@@ -37,11 +37,12 @@
|
|
|
37
37
|
"scripts": {
|
|
38
38
|
"json-server": "./node_modules/json-server/bin/index.js test/data/rest/db.json -p 8010 --watch -m test/data/rest/headers.js",
|
|
39
39
|
"json-server:graphql": "node test/data/graphql/index.js",
|
|
40
|
-
"lint": "eslint bin/ examples/ lib/ test/ translations/ runok.
|
|
41
|
-
"lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"test:
|
|
40
|
+
"lint": "eslint bin/ examples/ lib/ test/ translations/ runok.js",
|
|
41
|
+
"lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.js --fix",
|
|
42
|
+
"prettier": "prettier --config prettier.config.js --write bin/**/*.js lib/**/*.js test/**/*.js translations/**/*.js runok.js",
|
|
43
|
+
"docs": "./runok.js docs",
|
|
44
|
+
"test:unit": "mocha test/unit --recursive --timeout 10000",
|
|
45
|
+
"test:runner": "mocha test/runner --recursive --timeout 10000",
|
|
45
46
|
"test": "npm run test:unit && npm run test:runner",
|
|
46
47
|
"test:appium-quick": "mocha test/helper/AppiumV2_test.js --grep 'quick'",
|
|
47
48
|
"test:appium-other": "mocha test/helper/AppiumV2_test.js --grep 'second'",
|
|
@@ -55,34 +56,32 @@
|
|
|
55
56
|
"test:unit:webbapi:webDriver:noSeleniumServer": "mocha test/helper/WebDriver.noSeleniumServer_test.js",
|
|
56
57
|
"test:unit:webbapi:webDriver:devtools": "mocha test/helper/WebDriver_devtools_test.js --exit",
|
|
57
58
|
"test:unit:webbapi:testCafe": "mocha test/helper/TestCafe_test.js",
|
|
58
|
-
"test:unit:expect": "mocha test/helper/Expect_test.js
|
|
59
|
+
"test:unit:expect": "mocha test/helper/Expect_test.js",
|
|
59
60
|
"test:unit:mockServer": "mocha test/helper/MockServer_test.js",
|
|
60
61
|
"test:plugin": "mocha test/plugin/plugin_test.js",
|
|
61
|
-
"def": "./runok.
|
|
62
|
+
"def": "./runok.js def",
|
|
62
63
|
"dev:graphql": "node test/data/graphql/index.js",
|
|
63
|
-
"publish:site": "./runok.
|
|
64
|
-
"update-contributor-faces": "./runok.
|
|
64
|
+
"publish:site": "./runok.js publish:site",
|
|
65
|
+
"update-contributor-faces": "./runok.js contributor:faces",
|
|
65
66
|
"types-fix": "node typings/fixDefFiles.js",
|
|
66
67
|
"dtslint": "npm run types-fix && tsd",
|
|
67
68
|
"prepare": "husky install",
|
|
68
|
-
"prepare-release": "./runok.
|
|
69
|
+
"prepare-release": "./runok.js versioning && ./runok.js get:commit-log",
|
|
70
|
+
"publish-beta": "./runok.js publish:next-beta-version"
|
|
69
71
|
},
|
|
70
72
|
"dependencies": {
|
|
71
|
-
"@
|
|
72
|
-
"@codeceptjs/
|
|
73
|
-
"@codeceptjs/helper": "^2.0.3",
|
|
73
|
+
"@codeceptjs/configure": "1.0.1",
|
|
74
|
+
"@codeceptjs/helper": "2.0.4",
|
|
74
75
|
"@cucumber/cucumber-expressions": "17",
|
|
75
|
-
"@cucumber/gherkin": "
|
|
76
|
-
"@cucumber/messages": "
|
|
77
|
-
"@
|
|
78
|
-
"
|
|
79
|
-
"acorn": "8.11.3",
|
|
76
|
+
"@cucumber/gherkin": "29",
|
|
77
|
+
"@cucumber/messages": "25.0.1",
|
|
78
|
+
"@xmldom/xmldom": "0.9.4",
|
|
79
|
+
"acorn": "8.12.1",
|
|
80
80
|
"arrify": "2.0.1",
|
|
81
|
-
"axios": "1.
|
|
82
|
-
"
|
|
83
|
-
"chai": "5.0.3",
|
|
81
|
+
"axios": "1.7.7",
|
|
82
|
+
"chai": "5.1.1",
|
|
84
83
|
"chai-deep-match": "1.2.1",
|
|
85
|
-
"chai-exclude": "2.1.
|
|
84
|
+
"chai-exclude": "2.1.1",
|
|
86
85
|
"chai-json-schema": "1.5.1",
|
|
87
86
|
"chai-json-schema-ajv": "5.2.4",
|
|
88
87
|
"chai-match-pattern": "1.3.0",
|
|
@@ -92,84 +91,85 @@
|
|
|
92
91
|
"cross-spawn": "7.0.3",
|
|
93
92
|
"css-to-xpath": "0.1.0",
|
|
94
93
|
"csstoxpath": "1.6.0",
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"envinfo": "7.11.1",
|
|
94
|
+
"devtools": "8.40.2",
|
|
95
|
+
"envinfo": "7.14.0",
|
|
98
96
|
"escape-string-regexp": "4.0.0",
|
|
99
97
|
"figures": "3.2.0",
|
|
100
98
|
"fn-args": "4.0.0",
|
|
101
99
|
"fs-extra": "11.2.0",
|
|
102
100
|
"glob": "6.0.1",
|
|
103
101
|
"html-minifier-terser": "7.2.0",
|
|
104
|
-
"import-sync": "2.2.0",
|
|
105
102
|
"inquirer": "6.5.2",
|
|
106
|
-
"joi": "17.
|
|
103
|
+
"joi": "17.13.3",
|
|
107
104
|
"js-beautify": "1.15.1",
|
|
108
105
|
"lodash.clonedeep": "4.5.0",
|
|
109
106
|
"lodash.merge": "4.6.2",
|
|
110
107
|
"mkdirp": "1.0.4",
|
|
111
|
-
"mocha": "10.3
|
|
112
|
-
"monocart-coverage-reports": "2.
|
|
108
|
+
"mocha": "10.7.3",
|
|
109
|
+
"monocart-coverage-reports": "2.10.3",
|
|
113
110
|
"ms": "2.1.3",
|
|
114
111
|
"ora-classic": "5.4.2",
|
|
115
|
-
"pactum": "3.
|
|
112
|
+
"pactum": "3.7.1",
|
|
116
113
|
"parse-function": "5.6.10",
|
|
117
114
|
"parse5": "7.1.2",
|
|
118
115
|
"promise-retry": "1.1.1",
|
|
119
116
|
"resq": "1.11.0",
|
|
120
117
|
"sprintf-js": "1.1.1",
|
|
121
|
-
"uuid": "
|
|
118
|
+
"uuid": "10.0"
|
|
122
119
|
},
|
|
123
120
|
"optionalDependencies": {
|
|
124
|
-
"@codeceptjs/detox-helper": "1.
|
|
121
|
+
"@codeceptjs/detox-helper": "1.1.2"
|
|
125
122
|
},
|
|
126
123
|
"devDependencies": {
|
|
127
124
|
"@codeceptjs/mock-request": "0.3.1",
|
|
128
|
-
"@faker-js/faker": "
|
|
125
|
+
"@faker-js/faker": "9.0.3",
|
|
129
126
|
"@pollyjs/adapter-puppeteer": "6.0.6",
|
|
130
127
|
"@pollyjs/core": "5.1.0",
|
|
131
|
-
"@types/chai": "4.3.
|
|
128
|
+
"@types/chai": "4.3.19",
|
|
132
129
|
"@types/inquirer": "9.0.3",
|
|
133
|
-
"@types/node": "
|
|
134
|
-
"@wdio/sauce-service": "
|
|
130
|
+
"@types/node": "22.5.5",
|
|
131
|
+
"@wdio/sauce-service": "9.0.9",
|
|
135
132
|
"@wdio/selenium-standalone-service": "8.3.2",
|
|
136
|
-
"@wdio/utils": "
|
|
137
|
-
"@xmldom/xmldom": "0.
|
|
133
|
+
"@wdio/utils": "9.1.2",
|
|
134
|
+
"@xmldom/xmldom": "0.9.4",
|
|
138
135
|
"apollo-server-express": "2.25.3",
|
|
139
|
-
"chai-as-promised": "7.1.
|
|
136
|
+
"chai-as-promised": "7.1.2",
|
|
140
137
|
"chai-subset": "1.6.0",
|
|
138
|
+
"cheerio": "^1.0.0",
|
|
141
139
|
"contributor-faces": "1.1.0",
|
|
142
140
|
"documentation": "12.3.0",
|
|
143
|
-
"electron": "
|
|
144
|
-
"eslint": "8.
|
|
141
|
+
"electron": "31.3.1",
|
|
142
|
+
"eslint": "8.57.0",
|
|
145
143
|
"eslint-config-airbnb-base": "15.0.0",
|
|
146
|
-
"eslint-plugin-import": "2.
|
|
147
|
-
"eslint-plugin-mocha": "
|
|
144
|
+
"eslint-plugin-import": "2.30.0",
|
|
145
|
+
"eslint-plugin-mocha": "10.5.0",
|
|
148
146
|
"expect": "29.7.0",
|
|
149
147
|
"express": "4.19.2",
|
|
150
|
-
"graphql": "
|
|
151
|
-
"husky": "
|
|
148
|
+
"graphql": "16.9.0",
|
|
149
|
+
"husky": "9.1.6",
|
|
152
150
|
"inquirer-test": "2.0.1",
|
|
153
|
-
"jsdoc": "
|
|
151
|
+
"jsdoc": "4.0.3",
|
|
154
152
|
"jsdoc-typeof-plugin": "1.0.0",
|
|
155
153
|
"json-server": "0.10.1",
|
|
156
|
-
"playwright": "1.
|
|
157
|
-
"
|
|
154
|
+
"playwright": "1.45.3",
|
|
155
|
+
"prettier": "^3.3.2",
|
|
156
|
+
"puppeteer": "23.3.0",
|
|
158
157
|
"qrcode-terminal": "0.12.0",
|
|
159
158
|
"rosie": "2.1.1",
|
|
160
159
|
"runok": "0.9.3",
|
|
161
|
-
"
|
|
160
|
+
"semver": "7.6.3",
|
|
161
|
+
"sinon": "18.0.0",
|
|
162
162
|
"sinon-chai": "3.7.0",
|
|
163
163
|
"testcafe": "3.5.0",
|
|
164
|
-
"ts-morph": "
|
|
164
|
+
"ts-morph": "23.0.0",
|
|
165
165
|
"ts-node": "10.9.2",
|
|
166
|
-
"tsd": "^0.
|
|
166
|
+
"tsd": "^0.31.0",
|
|
167
167
|
"tsd-jsdoc": "2.5.0",
|
|
168
|
-
"typedoc": "0.
|
|
169
|
-
"typedoc-plugin-markdown": "
|
|
170
|
-
"typescript": "5.
|
|
168
|
+
"typedoc": "0.26.7",
|
|
169
|
+
"typedoc-plugin-markdown": "4.2.9",
|
|
170
|
+
"typescript": "5.6.3",
|
|
171
171
|
"wdio-docker-service": "1.5.0",
|
|
172
|
-
"webdriverio": "8.
|
|
172
|
+
"webdriverio": "8.39.1",
|
|
173
173
|
"xml2js": "0.6.2",
|
|
174
174
|
"xpath": "0.0.34"
|
|
175
175
|
},
|
|
@@ -177,7 +177,6 @@
|
|
|
177
177
|
"node": ">=16.0",
|
|
178
178
|
"npm": ">=5.6.0"
|
|
179
179
|
},
|
|
180
|
-
"type": "module",
|
|
181
180
|
"es6": true,
|
|
182
181
|
"tsd": {
|
|
183
182
|
"directory": "typings",
|
package/translations/de-DE.js
CHANGED
package/translations/fr-FR.js
CHANGED
package/translations/index.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
de_DE, it_IT, ja_JP, pl_PL, pt_BR, ru_RU, zh_CN, zh_TW, fr_FR,
|
|
13
|
-
};
|
|
1
|
+
exports['de-DE'] = require('./de-DE')
|
|
2
|
+
exports['it-IT'] = require('./it-IT')
|
|
3
|
+
exports['fr-FR'] = require('./fr-FR')
|
|
4
|
+
exports['ja-JP'] = require('./ja-JP')
|
|
5
|
+
exports['pl-PL'] = require('./pl-PL')
|
|
6
|
+
exports['pt-BR'] = require('./pt-BR')
|
|
7
|
+
exports['ru-RU'] = require('./ru-RU')
|
|
8
|
+
exports['zh-CN'] = require('./zh-CN')
|
|
9
|
+
exports['zh-TW'] = require('./zh-TW')
|
package/translations/it-IT.js
CHANGED
package/translations/ja-JP.js
CHANGED
package/translations/pl-PL.js
CHANGED
package/translations/pt-BR.js
CHANGED
package/translations/ru-RU.js
CHANGED
package/translations/zh-CN.js
CHANGED
package/translations/zh-TW.js
CHANGED