codeceptjs 4.0.0-beta.5 → 4.0.0-beta.6.esm-aria
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 +0 -45
- package/bin/codecept.js +46 -57
- package/lib/actor.js +15 -11
- package/lib/ai.js +6 -5
- package/lib/assert/empty.js +9 -8
- package/lib/assert/equal.js +15 -17
- package/lib/assert/error.js +2 -2
- package/lib/assert/include.js +9 -11
- package/lib/assert/throws.js +1 -1
- package/lib/assert/truth.js +8 -5
- package/lib/assert.js +18 -18
- package/lib/codecept.js +66 -107
- package/lib/colorUtils.js +48 -50
- package/lib/command/check.js +32 -27
- package/lib/command/configMigrate.js +11 -10
- package/lib/command/definitions.js +16 -10
- package/lib/command/dryRun.js +16 -16
- package/lib/command/generate.js +29 -26
- package/lib/command/gherkin/init.js +36 -38
- package/lib/command/gherkin/snippets.js +14 -14
- package/lib/command/gherkin/steps.js +21 -18
- package/lib/command/info.js +8 -8
- package/lib/command/init.js +34 -31
- package/lib/command/interactive.js +11 -10
- package/lib/command/list.js +10 -9
- package/lib/command/run-multiple/chunk.js +5 -5
- package/lib/command/run-multiple/collection.js +5 -5
- package/lib/command/run-multiple/run.js +3 -3
- package/lib/command/run-multiple.js +16 -13
- package/lib/command/run-rerun.js +6 -7
- package/lib/command/run-workers.js +10 -24
- package/lib/command/run.js +8 -8
- package/lib/command/utils.js +20 -18
- package/lib/command/workers/runTests.js +117 -269
- package/lib/config.js +111 -49
- package/lib/container.js +299 -102
- package/lib/data/context.js +6 -5
- package/lib/data/dataScenarioConfig.js +1 -1
- package/lib/data/dataTableArgument.js +1 -1
- package/lib/data/table.js +1 -1
- package/lib/effects.js +94 -10
- package/lib/els.js +11 -9
- package/lib/event.js +11 -10
- package/lib/globals.js +141 -0
- package/lib/heal.js +12 -12
- package/lib/helper/AI.js +1 -1
- package/lib/helper/ApiDataFactory.js +16 -13
- package/lib/helper/FileSystem.js +32 -12
- package/lib/helper/GraphQL.js +1 -1
- package/lib/helper/GraphQLDataFactory.js +1 -1
- package/lib/helper/JSONResponse.js +19 -30
- package/lib/helper/Mochawesome.js +9 -28
- package/lib/helper/Playwright.js +668 -265
- package/lib/helper/Puppeteer.js +284 -169
- package/lib/helper/REST.js +29 -12
- package/lib/helper/WebDriver.js +191 -71
- package/lib/helper/errors/ConnectionRefused.js +6 -6
- package/lib/helper/errors/ElementAssertion.js +11 -16
- package/lib/helper/errors/ElementNotFound.js +5 -9
- package/lib/helper/errors/RemoteBrowserConnectionRefused.js +5 -5
- package/lib/helper/extras/Console.js +11 -11
- package/lib/helper/extras/PlaywrightLocator.js +110 -0
- package/lib/helper/extras/PlaywrightPropEngine.js +18 -18
- package/lib/helper/extras/PlaywrightRestartOpts.js +23 -23
- package/lib/helper/extras/Popup.js +1 -1
- package/lib/helper/extras/React.js +29 -30
- package/lib/helper/network/actions.js +33 -48
- package/lib/helper/network/utils.js +76 -83
- package/lib/helper/scripts/blurElement.js +6 -6
- package/lib/helper/scripts/focusElement.js +6 -6
- package/lib/helper/scripts/highlightElement.js +9 -9
- package/lib/helper/scripts/isElementClickable.js +34 -34
- package/lib/helper.js +2 -1
- package/lib/history.js +23 -20
- package/lib/hooks.js +10 -10
- package/lib/html.js +90 -100
- package/lib/index.js +48 -21
- package/lib/listener/config.js +8 -9
- package/lib/listener/emptyRun.js +6 -7
- package/lib/listener/exit.js +4 -3
- package/lib/listener/globalRetry.js +5 -5
- package/lib/listener/globalTimeout.js +11 -10
- package/lib/listener/helpers.js +33 -14
- package/lib/listener/mocha.js +3 -4
- package/lib/listener/result.js +4 -5
- package/lib/listener/steps.js +7 -18
- package/lib/listener/store.js +3 -3
- package/lib/locator.js +213 -192
- package/lib/mocha/asyncWrapper.js +108 -75
- package/lib/mocha/bdd.js +99 -13
- package/lib/mocha/cli.js +60 -27
- package/lib/mocha/factory.js +75 -19
- package/lib/mocha/featureConfig.js +1 -1
- package/lib/mocha/gherkin.js +57 -25
- package/lib/mocha/hooks.js +12 -3
- package/lib/mocha/index.js +13 -4
- package/lib/mocha/inject.js +22 -5
- package/lib/mocha/scenarioConfig.js +2 -2
- package/lib/mocha/suite.js +9 -2
- package/lib/mocha/test.js +10 -13
- package/lib/mocha/ui.js +28 -31
- package/lib/output.js +11 -9
- package/lib/parser.js +44 -44
- package/lib/pause.js +15 -16
- package/lib/plugin/analyze.js +19 -12
- package/lib/plugin/auth.js +20 -21
- package/lib/plugin/autoDelay.js +12 -8
- package/lib/plugin/coverage.js +12 -8
- package/lib/plugin/customLocator.js +3 -3
- package/lib/plugin/customReporter.js +3 -2
- package/lib/plugin/heal.js +14 -9
- package/lib/plugin/pageInfo.js +10 -10
- package/lib/plugin/pauseOnFail.js +4 -3
- package/lib/plugin/retryFailedStep.js +47 -5
- package/lib/plugin/screenshotOnFail.js +75 -37
- package/lib/plugin/stepByStepReport.js +14 -14
- package/lib/plugin/stepTimeout.js +4 -3
- package/lib/plugin/subtitles.js +6 -5
- package/lib/recorder.js +33 -23
- package/lib/rerun.js +69 -26
- package/lib/result.js +4 -4
- package/lib/secret.js +18 -17
- package/lib/session.js +95 -89
- package/lib/step/base.js +6 -6
- package/lib/step/config.js +1 -1
- package/lib/step/func.js +3 -3
- package/lib/step/helper.js +3 -3
- package/lib/step/meta.js +4 -4
- package/lib/step/record.js +11 -11
- package/lib/step/retry.js +3 -3
- package/lib/step/section.js +3 -3
- package/lib/step.js +7 -10
- package/lib/steps.js +9 -5
- package/lib/store.js +1 -1
- package/lib/timeout.js +1 -7
- package/lib/transform.js +8 -8
- package/lib/translation.js +32 -18
- package/lib/utils.js +68 -97
- package/lib/workerStorage.js +16 -17
- package/lib/workers.js +145 -171
- package/package.json +63 -57
- package/translations/de-DE.js +2 -2
- package/translations/fr-FR.js +2 -2
- package/translations/index.js +23 -10
- package/translations/it-IT.js +2 -2
- package/translations/ja-JP.js +2 -2
- package/translations/nl-NL.js +2 -2
- package/translations/pl-PL.js +2 -2
- package/translations/pt-BR.js +2 -2
- package/translations/ru-RU.js +2 -2
- package/translations/utils.js +11 -2
- package/translations/zh-CN.js +2 -2
- package/translations/zh-TW.js +2 -2
- package/typings/index.d.ts +7 -18
- package/typings/promiseBasedTypes.d.ts +3769 -5450
- package/typings/types.d.ts +3953 -5778
- package/bin/test-server.js +0 -53
- package/lib/element/WebElement.js +0 -327
- package/lib/helper/Nightmare.js +0 -1486
- package/lib/helper/Protractor.js +0 -1840
- package/lib/helper/TestCafe.js +0 -1391
- package/lib/helper/clientscripts/nightmare.js +0 -213
- package/lib/helper/extras/PlaywrightReactVueLocator.js +0 -43
- package/lib/helper/testcafe/testControllerHolder.js +0 -42
- package/lib/helper/testcafe/testcafe-utils.js +0 -61
- package/lib/listener/retryEnhancer.js +0 -85
- package/lib/plugin/allure.js +0 -15
- package/lib/plugin/autoLogin.js +0 -5
- package/lib/plugin/commentStep.js +0 -141
- package/lib/plugin/eachElement.js +0 -127
- package/lib/plugin/fakerTransform.js +0 -49
- package/lib/plugin/htmlReporter.js +0 -1947
- package/lib/plugin/retryTo.js +0 -16
- package/lib/plugin/selenoid.js +0 -364
- package/lib/plugin/standardActingHelpers.js +0 -6
- package/lib/plugin/tryTo.js +0 -16
- package/lib/plugin/wdio.js +0 -247
- package/lib/test-server.js +0 -323
- package/lib/within.js +0 -90
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeceptjs",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.6.esm-aria",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Supercharged End 2 End Testing Framework for NodeJS",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"acceptance",
|
|
@@ -8,7 +9,6 @@
|
|
|
8
9
|
"end 2 end",
|
|
9
10
|
"puppeteer",
|
|
10
11
|
"webdriver",
|
|
11
|
-
"testcafe",
|
|
12
12
|
"playwright",
|
|
13
13
|
"bdd",
|
|
14
14
|
"tdd",
|
|
@@ -34,59 +34,66 @@
|
|
|
34
34
|
"./lib/*": "./lib/*.js",
|
|
35
35
|
"./els": "./lib/els.js",
|
|
36
36
|
"./effects": "./lib/effects.js",
|
|
37
|
-
"./steps": "./lib/steps.js"
|
|
37
|
+
"./steps": "./lib/steps.js",
|
|
38
|
+
"./store": "./lib/store.js"
|
|
38
39
|
},
|
|
39
40
|
"types": "typings/index.d.ts",
|
|
40
41
|
"bin": {
|
|
41
|
-
"codeceptjs": "
|
|
42
|
+
"codeceptjs": "bin/codecept.js"
|
|
43
|
+
},
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/Codeception/codeceptjs.git"
|
|
42
47
|
},
|
|
43
|
-
"repository": "Codeception/codeceptjs",
|
|
44
48
|
"scripts": {
|
|
45
|
-
"
|
|
49
|
+
"json-server": "json-server test/data/rest/db.json --host 0.0.0.0 -p 8010 --watch -m test/data/rest/headers.cjs",
|
|
46
50
|
"json-server:graphql": "node test/data/graphql/index.js",
|
|
47
|
-
"lint": "eslint bin/ examples/ lib/ test/ translations/ runok.
|
|
48
|
-
"lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.
|
|
49
|
-
"prettier": "prettier --config prettier.config.js --write bin/**/*.js lib/**/*.js test/**/*.js translations/**/*.js runok.
|
|
50
|
-
"docs": "./runok.
|
|
51
|
-
"test:unit": "mocha test/unit --recursive --timeout 10000",
|
|
52
|
-
"test:runner": "mocha test/runner --recursive --timeout 10000",
|
|
51
|
+
"lint": "eslint bin/ examples/ lib/ test/ translations/ runok.cjs",
|
|
52
|
+
"lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.cjs --fix",
|
|
53
|
+
"prettier": "prettier --config prettier.config.js --write bin/**/*.js lib/**/*.js test/**/*.js translations/**/*.js runok.cjs",
|
|
54
|
+
"docs": "./runok.cjs docs",
|
|
55
|
+
"test:unit": "mocha test/unit --recursive --timeout 10000 --reporter @testomatio/reporter/mocha",
|
|
56
|
+
"test:runner": "mocha test/runner --recursive --timeout 10000 --reporter @testomatio/reporter/mocha",
|
|
53
57
|
"test": "npm run test:unit && npm run test:runner",
|
|
54
|
-
"test:appium-quick": "mocha test/helper/Appium_test.js --grep 'quick'",
|
|
55
|
-
"test:appium-other": "mocha test/helper/Appium_test.js --grep 'second'",
|
|
56
|
-
"test:ios:appium-quick": "mocha test/helper/Appium_ios_test.js --grep 'quick'",
|
|
57
|
-
"test:ios:appium-other": "mocha test/helper/Appium_ios_test.js --grep 'second'",
|
|
58
|
+
"test:appium-quick": "mocha test/helper/Appium_test.js --grep 'quick' --reporter @testomatio/reporter/mocha",
|
|
59
|
+
"test:appium-other": "mocha test/helper/Appium_test.js --grep 'second' --reporter @testomatio/reporter/mocha",
|
|
60
|
+
"test:ios:appium-quick": "mocha test/helper/Appium_ios_test.js --grep 'quick' --reporter @testomatio/reporter/mocha",
|
|
61
|
+
"test:ios:appium-other": "mocha test/helper/Appium_ios_test.js --grep 'second' --reporter @testomatio/reporter/mocha",
|
|
58
62
|
"test-app:start": "php -S 127.0.0.1:8000 -t test/data/app",
|
|
59
63
|
"test-app:stop": "kill -9 $(lsof -t -i:8000)",
|
|
60
|
-
"test:unit:webbapi:playwright": "mocha test/helper/Playwright_test.js",
|
|
61
|
-
"test:unit:webbapi:puppeteer": "mocha test/helper/Puppeteer_test.js",
|
|
62
|
-
"test:unit:webbapi:webDriver": "mocha test/helper/WebDriver_test.js --timeout 10000",
|
|
63
|
-
"test:unit:webbapi:webDriver:noSeleniumServer": "mocha test/helper/WebDriver.noSeleniumServer_test.js --timeout 10000",
|
|
64
|
-
"test:unit:
|
|
65
|
-
"test:
|
|
66
|
-
"
|
|
67
|
-
"def": "./runok.js def",
|
|
64
|
+
"test:unit:webbapi:playwright": "mocha test/helper/Playwright_test.js --reporter @testomatio/reporter/mocha",
|
|
65
|
+
"test:unit:webbapi:puppeteer": "mocha test/helper/Puppeteer_test.js --reporter @testomatio/reporter/mocha",
|
|
66
|
+
"test:unit:webbapi:webDriver": "mocha test/helper/WebDriver_test.js --timeout 10000 --reporter @testomatio/reporter/mocha",
|
|
67
|
+
"test:unit:webbapi:webDriver:noSeleniumServer": "mocha test/helper/WebDriver.noSeleniumServer_test.js --timeout 10000 --reporter @testomatio/reporter/mocha",
|
|
68
|
+
"test:unit:expect": "mocha test/helper/Expect_test.js --reporter @testomatio/reporter/mocha",
|
|
69
|
+
"test:plugin": "mocha test/plugin/plugin_test.js --reporter @testomatio/reporter/mocha",
|
|
70
|
+
"def": "./runok.cjs def",
|
|
68
71
|
"dev:graphql": "node test/data/graphql/index.js",
|
|
69
|
-
"publish:site": "./runok.
|
|
70
|
-
"update-contributor-faces": "./runok.
|
|
72
|
+
"publish:site": "./runok.cjs publish:site",
|
|
73
|
+
"update-contributor-faces": "./runok.cjs contributor:faces",
|
|
71
74
|
"types-fix": "node typings/fixDefFiles.js",
|
|
72
75
|
"dtslint": "npm run types-fix && tsd",
|
|
73
76
|
"prepare": "husky install",
|
|
74
|
-
"prepare-release": "./runok.
|
|
75
|
-
"publish-beta": "./runok.
|
|
77
|
+
"prepare-release": "./runok.cjs versioning && ./runok.cjs get:commit-log",
|
|
78
|
+
"publish-beta": "./runok.cjs publish:next-beta-version"
|
|
76
79
|
},
|
|
77
80
|
"dependencies": {
|
|
78
81
|
"@codeceptjs/configure": "1.0.6",
|
|
79
|
-
"@codeceptjs/helper": "
|
|
80
|
-
"@cucumber/cucumber-expressions": "18",
|
|
82
|
+
"@codeceptjs/helper": "^4.0.0-beta.1",
|
|
83
|
+
"@cucumber/cucumber-expressions": "^18.0.1",
|
|
81
84
|
"@cucumber/gherkin": "32.1.2",
|
|
82
85
|
"@cucumber/messages": "27.2.0",
|
|
86
|
+
"@inquirer/confirm": "^5.1.14",
|
|
87
|
+
"@inquirer/core": "^10.1.15",
|
|
88
|
+
"@inquirer/input": "^4.2.1",
|
|
89
|
+
"@inquirer/prompts": "^7.8.2",
|
|
90
|
+
"@inquirer/select": "^4.3.1",
|
|
83
91
|
"@xmldom/xmldom": "0.9.8",
|
|
84
92
|
"acorn": "8.14.1",
|
|
85
93
|
"arrify": "3.0.0",
|
|
86
|
-
"axios": "1.
|
|
94
|
+
"axios": "1.8.4",
|
|
87
95
|
"chalk": "4.1.2",
|
|
88
|
-
"cheerio": "^1.
|
|
89
|
-
"chokidar": "^4.0.3",
|
|
96
|
+
"cheerio": "^1.1.0",
|
|
90
97
|
"commander": "11.1.0",
|
|
91
98
|
"cross-spawn": "7.0.6",
|
|
92
99
|
"css-to-xpath": "0.1.0",
|
|
@@ -96,22 +103,20 @@
|
|
|
96
103
|
"figures": "3.2.0",
|
|
97
104
|
"fn-args": "4.0.0",
|
|
98
105
|
"fs-extra": "11.3.0",
|
|
99
|
-
"fuse.js": "^7.
|
|
100
|
-
"glob": "
|
|
106
|
+
"fuse.js": "^7.1.0",
|
|
107
|
+
"glob": "^11.0.3",
|
|
101
108
|
"html-minifier-terser": "7.2.0",
|
|
102
|
-
"inquirer": "
|
|
103
|
-
"invisi-data": "^1.
|
|
109
|
+
"inquirer": "12.9.2",
|
|
110
|
+
"invisi-data": "^1.1.2",
|
|
104
111
|
"joi": "17.13.3",
|
|
105
112
|
"js-beautify": "1.15.4",
|
|
106
113
|
"lodash.clonedeep": "4.5.0",
|
|
107
114
|
"lodash.merge": "4.6.2",
|
|
108
|
-
"lodash.shuffle": "4.2.0",
|
|
109
115
|
"mkdirp": "3.0.1",
|
|
110
116
|
"mocha": "11.6.0",
|
|
111
117
|
"monocart-coverage-reports": "2.12.6",
|
|
112
118
|
"ms": "2.1.3",
|
|
113
|
-
"
|
|
114
|
-
"ora-classic": "5.4.2",
|
|
119
|
+
"ora": "^8.0.0",
|
|
115
120
|
"parse-function": "5.6.10",
|
|
116
121
|
"parse5": "7.3.0",
|
|
117
122
|
"promise-retry": "1.1.1",
|
|
@@ -123,14 +128,16 @@
|
|
|
123
128
|
"@codeceptjs/detox-helper": "1.1.8"
|
|
124
129
|
},
|
|
125
130
|
"devDependencies": {
|
|
126
|
-
"@apollo/server": "^4",
|
|
131
|
+
"@apollo/server": "^4.12.2",
|
|
127
132
|
"@codeceptjs/expect-helper": "^1.0.2",
|
|
128
133
|
"@codeceptjs/mock-request": "0.3.1",
|
|
129
134
|
"@eslint/eslintrc": "3.3.1",
|
|
130
|
-
"@eslint/js": "9.
|
|
135
|
+
"@eslint/js": "9.30.0",
|
|
131
136
|
"@faker-js/faker": "9.8.0",
|
|
137
|
+
"@inquirer/testing": "^2.1.49",
|
|
132
138
|
"@pollyjs/adapter-puppeteer": "6.0.6",
|
|
133
139
|
"@pollyjs/core": "6.0.6",
|
|
140
|
+
"@testomatio/reporter": "^2.3.1",
|
|
134
141
|
"@types/chai": "5.2.2",
|
|
135
142
|
"@types/inquirer": "9.0.7",
|
|
136
143
|
"@types/node": "24.0.10",
|
|
@@ -138,41 +145,40 @@
|
|
|
138
145
|
"@wdio/selenium-standalone-service": "8.15.0",
|
|
139
146
|
"@wdio/utils": "9.15.0",
|
|
140
147
|
"@xmldom/xmldom": "0.9.8",
|
|
141
|
-
"
|
|
148
|
+
"bunosh": "latest",
|
|
149
|
+
"chai": "^4.5.0",
|
|
142
150
|
"chai-as-promised": "7.1.2",
|
|
143
151
|
"chai-subset": "1.6.0",
|
|
144
152
|
"documentation": "14.0.3",
|
|
145
|
-
"electron": "37.
|
|
146
|
-
"eslint": "^9.
|
|
153
|
+
"electron": "37.1.0",
|
|
154
|
+
"eslint": "^9.31.0",
|
|
147
155
|
"eslint-plugin-import": "2.32.0",
|
|
148
156
|
"eslint-plugin-mocha": "11.1.0",
|
|
149
|
-
"expect": "
|
|
150
|
-
"express": "
|
|
157
|
+
"expect": "29.7.0",
|
|
158
|
+
"express": "5.1.0",
|
|
151
159
|
"globals": "16.2.0",
|
|
152
|
-
"graphql": "16.
|
|
160
|
+
"graphql": "16.10.0",
|
|
153
161
|
"graphql-tag": "^2.12.6",
|
|
154
162
|
"husky": "9.1.7",
|
|
155
|
-
"inquirer-test": "2.0.1",
|
|
156
163
|
"jsdoc": "^3.6.11",
|
|
157
164
|
"jsdoc-typeof-plugin": "1.0.0",
|
|
158
165
|
"json-server": "0.17.4",
|
|
159
166
|
"mochawesome": "^7.1.3",
|
|
160
|
-
"playwright": "1.
|
|
161
|
-
"prettier": "^3.
|
|
162
|
-
"puppeteer": "24.
|
|
167
|
+
"playwright": "1.53.0",
|
|
168
|
+
"prettier": "^3.6.2",
|
|
169
|
+
"puppeteer": "24.8.0",
|
|
163
170
|
"qrcode-terminal": "0.12.0",
|
|
164
171
|
"rosie": "2.1.1",
|
|
165
|
-
"runok": "0.9.3",
|
|
172
|
+
"runok": "^0.9.3",
|
|
166
173
|
"semver": "7.7.2",
|
|
167
174
|
"sinon": "21.0.0",
|
|
168
175
|
"sinon-chai": "3.7.0",
|
|
169
|
-
"testcafe": "3.7.2",
|
|
170
176
|
"ts-morph": "26.0.0",
|
|
171
177
|
"ts-node": "10.9.2",
|
|
172
|
-
"tsd": "^0.
|
|
178
|
+
"tsd": "^0.32.0",
|
|
173
179
|
"tsd-jsdoc": "2.5.0",
|
|
174
|
-
"typedoc": "0.28.
|
|
175
|
-
"typedoc-plugin-markdown": "4.
|
|
180
|
+
"typedoc": "0.28.7",
|
|
181
|
+
"typedoc-plugin-markdown": "4.7.0",
|
|
176
182
|
"typescript": "5.8.3",
|
|
177
183
|
"wdio-docker-service": "3.2.1",
|
|
178
184
|
"webdriverio": "9.12.5",
|
package/translations/de-DE.js
CHANGED
package/translations/fr-FR.js
CHANGED
package/translations/index.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import deDE from './de-DE.js'
|
|
2
|
+
import itIT from './it-IT.js'
|
|
3
|
+
import frFR from './fr-FR.js'
|
|
4
|
+
import jaJP from './ja-JP.js'
|
|
5
|
+
import plPL from './pl-PL.js'
|
|
6
|
+
import ptBR from './pt-BR.js'
|
|
7
|
+
import ruRU from './ru-RU.js'
|
|
8
|
+
import zhCN from './zh-CN.js'
|
|
9
|
+
import zhTW from './zh-TW.js'
|
|
10
|
+
import nlNL from './nl-NL.js'
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
'de-DE': deDE,
|
|
14
|
+
'it-IT': itIT,
|
|
15
|
+
'fr-FR': frFR,
|
|
16
|
+
'ja-JP': jaJP,
|
|
17
|
+
'pl-PL': plPL,
|
|
18
|
+
'pt-BR': ptBR,
|
|
19
|
+
'ru-RU': ruRU,
|
|
20
|
+
'zh-CN': zhCN,
|
|
21
|
+
'zh-TW': zhTW,
|
|
22
|
+
'nl-NL': nlNL
|
|
23
|
+
}
|
package/translations/it-IT.js
CHANGED
package/translations/ja-JP.js
CHANGED
package/translations/nl-NL.js
CHANGED
package/translations/pl-PL.js
CHANGED
package/translations/pt-BR.js
CHANGED
package/translations/ru-RU.js
CHANGED
package/translations/utils.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { readFileSync } from 'fs'
|
|
2
|
+
import { fileURLToPath } from 'url'
|
|
3
|
+
import { dirname, join } from 'path'
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
6
|
+
const __dirname = dirname(__filename)
|
|
7
|
+
|
|
8
|
+
export function gherkinTranslations(langCode) {
|
|
9
|
+
// Load gherkin languages JSON file
|
|
10
|
+
const gherkinLanguagesPath = join(__dirname, '../node_modules/@cucumber/gherkin/src/gherkin-languages.json')
|
|
11
|
+
const gherkinLanguages = JSON.parse(readFileSync(gherkinLanguagesPath, 'utf8'))
|
|
3
12
|
const { feature, scenario, scenarioOutline } = gherkinLanguages[langCode]
|
|
4
13
|
return {
|
|
5
14
|
Feature: feature[0],
|
package/translations/zh-CN.js
CHANGED
package/translations/zh-TW.js
CHANGED
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
|
|
443
|
+
(title: string): FeatureConfig
|
|
444
444
|
}
|
|
445
445
|
interface CallbackOrder extends Array<any> {}
|
|
446
446
|
interface SupportObject {
|
|
@@ -486,7 +486,6 @@ declare namespace CodeceptJS {
|
|
|
486
486
|
todo: IScenario
|
|
487
487
|
}
|
|
488
488
|
interface Feature extends IFeature {
|
|
489
|
-
only: IFeature
|
|
490
489
|
skip: IFeature
|
|
491
490
|
}
|
|
492
491
|
interface IData {
|
|
@@ -518,19 +517,15 @@ declare namespace CodeceptJS {
|
|
|
518
517
|
interface HookConfig {
|
|
519
518
|
retry(retries?: number): HookConfig
|
|
520
519
|
}
|
|
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
520
|
|
|
521
|
+
function addStep(step: string, fn: Function): Promise<void>
|
|
522
|
+
}
|
|
527
523
|
|
|
528
524
|
// Globals
|
|
529
525
|
declare const codecept_dir: string
|
|
530
526
|
declare const output_dir: string
|
|
531
|
-
declare
|
|
532
|
-
declare
|
|
533
|
-
declare const hopeThat: HopeThat;
|
|
527
|
+
declare function tryTo(...fn): Promise<boolean>
|
|
528
|
+
declare function retryTo(...fn): Promise<null>
|
|
534
529
|
|
|
535
530
|
declare const actor: CodeceptJS.actor
|
|
536
531
|
declare const codecept_actor: CodeceptJS.actor
|
|
@@ -541,7 +536,7 @@ declare const within: typeof CodeceptJS.within
|
|
|
541
536
|
declare const session: typeof CodeceptJS.session
|
|
542
537
|
declare const DataTable: typeof CodeceptJS.DataTable
|
|
543
538
|
declare const DataTableArgument: typeof CodeceptJS.DataTableArgument
|
|
544
|
-
declare const codeceptjs: typeof CodeceptJS
|
|
539
|
+
declare const codeceptjs: typeof CodeceptJS
|
|
545
540
|
declare const locate: typeof CodeceptJS.Locator.build
|
|
546
541
|
declare function inject(): CodeceptJS.SupportObject
|
|
547
542
|
declare function inject<T extends keyof CodeceptJS.SupportObject>(name: T): CodeceptJS.SupportObject[T]
|
|
@@ -552,7 +547,7 @@ declare const Given: typeof CodeceptJS.addStep
|
|
|
552
547
|
declare const When: typeof CodeceptJS.addStep
|
|
553
548
|
declare const Then: typeof CodeceptJS.addStep
|
|
554
549
|
|
|
555
|
-
declare const Feature: CodeceptJS.Feature
|
|
550
|
+
declare const Feature: typeof CodeceptJS.Feature
|
|
556
551
|
declare const Scenario: CodeceptJS.Scenario
|
|
557
552
|
declare const xScenario: CodeceptJS.IScenario
|
|
558
553
|
declare const xFeature: CodeceptJS.IFeature
|
|
@@ -641,9 +636,3 @@ declare module 'codeceptjs' {
|
|
|
641
636
|
declare module '@codeceptjs/helper' {
|
|
642
637
|
export = CodeceptJS.Helper
|
|
643
638
|
}
|
|
644
|
-
|
|
645
|
-
declare module 'codeceptjs/effects' {
|
|
646
|
-
export const tryTo: TryTo;
|
|
647
|
-
export const retryTo: RetryTo;
|
|
648
|
-
export const hopeThat: HopeThat;
|
|
649
|
-
}
|