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