codeceptjs 4.0.0-beta.4 → 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.
Files changed (188) hide show
  1. package/README.md +89 -119
  2. package/bin/codecept.js +53 -54
  3. package/docs/webapi/clearCookie.mustache +1 -1
  4. package/lib/actor.js +70 -102
  5. package/lib/ai.js +131 -121
  6. package/lib/assert/empty.js +11 -12
  7. package/lib/assert/equal.js +16 -21
  8. package/lib/assert/error.js +2 -2
  9. package/lib/assert/include.js +11 -15
  10. package/lib/assert/throws.js +3 -5
  11. package/lib/assert/truth.js +10 -7
  12. package/lib/assert.js +18 -18
  13. package/lib/codecept.js +112 -101
  14. package/lib/colorUtils.js +48 -50
  15. package/lib/command/check.js +206 -0
  16. package/lib/command/configMigrate.js +13 -14
  17. package/lib/command/definitions.js +24 -36
  18. package/lib/command/dryRun.js +16 -16
  19. package/lib/command/generate.js +38 -39
  20. package/lib/command/gherkin/init.js +36 -38
  21. package/lib/command/gherkin/snippets.js +76 -74
  22. package/lib/command/gherkin/steps.js +21 -18
  23. package/lib/command/info.js +49 -15
  24. package/lib/command/init.js +41 -37
  25. package/lib/command/interactive.js +22 -13
  26. package/lib/command/list.js +11 -10
  27. package/lib/command/run-multiple/chunk.js +50 -47
  28. package/lib/command/run-multiple/collection.js +5 -5
  29. package/lib/command/run-multiple/run.js +3 -3
  30. package/lib/command/run-multiple.js +27 -47
  31. package/lib/command/run-rerun.js +6 -7
  32. package/lib/command/run-workers.js +15 -66
  33. package/lib/command/run.js +8 -8
  34. package/lib/command/utils.js +22 -21
  35. package/lib/command/workers/runTests.js +131 -241
  36. package/lib/config.js +111 -49
  37. package/lib/container.js +589 -244
  38. package/lib/data/context.js +16 -18
  39. package/lib/data/dataScenarioConfig.js +9 -9
  40. package/lib/data/dataTableArgument.js +7 -7
  41. package/lib/data/table.js +6 -12
  42. package/lib/effects.js +307 -0
  43. package/lib/els.js +160 -0
  44. package/lib/event.js +24 -19
  45. package/lib/globals.js +141 -0
  46. package/lib/heal.js +89 -81
  47. package/lib/helper/AI.js +3 -2
  48. package/lib/helper/ApiDataFactory.js +19 -19
  49. package/lib/helper/Appium.js +47 -51
  50. package/lib/helper/FileSystem.js +35 -15
  51. package/lib/helper/GraphQL.js +1 -1
  52. package/lib/helper/GraphQLDataFactory.js +4 -4
  53. package/lib/helper/JSONResponse.js +72 -45
  54. package/lib/helper/Mochawesome.js +14 -11
  55. package/lib/helper/Playwright.js +832 -434
  56. package/lib/helper/Puppeteer.js +393 -292
  57. package/lib/helper/REST.js +32 -27
  58. package/lib/helper/WebDriver.js +320 -219
  59. package/lib/helper/errors/ConnectionRefused.js +6 -6
  60. package/lib/helper/errors/ElementAssertion.js +11 -16
  61. package/lib/helper/errors/ElementNotFound.js +5 -9
  62. package/lib/helper/errors/RemoteBrowserConnectionRefused.js +5 -5
  63. package/lib/helper/extras/Console.js +11 -11
  64. package/lib/helper/extras/PlaywrightLocator.js +110 -0
  65. package/lib/helper/extras/PlaywrightPropEngine.js +18 -18
  66. package/lib/helper/extras/PlaywrightRestartOpts.js +23 -23
  67. package/lib/helper/extras/Popup.js +22 -22
  68. package/lib/helper/extras/React.js +29 -30
  69. package/lib/helper/network/actions.js +33 -48
  70. package/lib/helper/network/utils.js +76 -83
  71. package/lib/helper/scripts/blurElement.js +6 -6
  72. package/lib/helper/scripts/focusElement.js +6 -6
  73. package/lib/helper/scripts/highlightElement.js +9 -9
  74. package/lib/helper/scripts/isElementClickable.js +34 -34
  75. package/lib/helper.js +2 -1
  76. package/lib/history.js +23 -20
  77. package/lib/hooks.js +10 -10
  78. package/lib/html.js +90 -100
  79. package/lib/index.js +48 -21
  80. package/lib/listener/config.js +8 -9
  81. package/lib/listener/emptyRun.js +54 -0
  82. package/lib/listener/exit.js +10 -12
  83. package/lib/listener/{retry.js → globalRetry.js} +10 -10
  84. package/lib/listener/globalTimeout.js +166 -0
  85. package/lib/listener/helpers.js +43 -24
  86. package/lib/listener/mocha.js +4 -5
  87. package/lib/listener/result.js +11 -0
  88. package/lib/listener/steps.js +26 -23
  89. package/lib/listener/store.js +20 -0
  90. package/lib/locator.js +213 -192
  91. package/lib/mocha/asyncWrapper.js +264 -0
  92. package/lib/mocha/bdd.js +167 -0
  93. package/lib/mocha/cli.js +341 -0
  94. package/lib/mocha/factory.js +160 -0
  95. package/lib/{interfaces → mocha}/featureConfig.js +33 -13
  96. package/lib/{interfaces → mocha}/gherkin.js +75 -45
  97. package/lib/mocha/hooks.js +121 -0
  98. package/lib/mocha/index.js +21 -0
  99. package/lib/mocha/inject.js +46 -0
  100. package/lib/{interfaces → mocha}/scenarioConfig.js +32 -8
  101. package/lib/mocha/suite.js +89 -0
  102. package/lib/mocha/test.js +178 -0
  103. package/lib/mocha/types.d.ts +42 -0
  104. package/lib/mocha/ui.js +229 -0
  105. package/lib/output.js +86 -64
  106. package/lib/parser.js +44 -44
  107. package/lib/pause.js +160 -139
  108. package/lib/plugin/analyze.js +403 -0
  109. package/lib/plugin/{autoLogin.js → auth.js} +137 -43
  110. package/lib/plugin/autoDelay.js +19 -15
  111. package/lib/plugin/coverage.js +22 -27
  112. package/lib/plugin/customLocator.js +5 -5
  113. package/lib/plugin/customReporter.js +53 -0
  114. package/lib/plugin/heal.js +49 -17
  115. package/lib/plugin/pageInfo.js +140 -0
  116. package/lib/plugin/pauseOnFail.js +4 -3
  117. package/lib/plugin/retryFailedStep.js +60 -19
  118. package/lib/plugin/screenshotOnFail.js +80 -83
  119. package/lib/plugin/stepByStepReport.js +70 -31
  120. package/lib/plugin/stepTimeout.js +7 -13
  121. package/lib/plugin/subtitles.js +10 -9
  122. package/lib/recorder.js +167 -126
  123. package/lib/rerun.js +94 -50
  124. package/lib/result.js +161 -0
  125. package/lib/secret.js +18 -17
  126. package/lib/session.js +95 -89
  127. package/lib/step/base.js +239 -0
  128. package/lib/step/comment.js +10 -0
  129. package/lib/step/config.js +50 -0
  130. package/lib/step/func.js +46 -0
  131. package/lib/step/helper.js +50 -0
  132. package/lib/step/meta.js +99 -0
  133. package/lib/step/record.js +74 -0
  134. package/lib/step/retry.js +11 -0
  135. package/lib/step/section.js +55 -0
  136. package/lib/step.js +18 -332
  137. package/lib/steps.js +54 -0
  138. package/lib/store.js +37 -5
  139. package/lib/template/heal.js +2 -11
  140. package/lib/timeout.js +60 -0
  141. package/lib/transform.js +8 -8
  142. package/lib/translation.js +32 -18
  143. package/lib/utils.js +354 -250
  144. package/lib/workerStorage.js +16 -16
  145. package/lib/workers.js +366 -282
  146. package/package.json +107 -95
  147. package/translations/de-DE.js +5 -4
  148. package/translations/fr-FR.js +5 -4
  149. package/translations/index.js +23 -9
  150. package/translations/it-IT.js +5 -4
  151. package/translations/ja-JP.js +5 -4
  152. package/translations/nl-NL.js +76 -0
  153. package/translations/pl-PL.js +5 -4
  154. package/translations/pt-BR.js +5 -4
  155. package/translations/ru-RU.js +5 -4
  156. package/translations/utils.js +18 -0
  157. package/translations/zh-CN.js +5 -4
  158. package/translations/zh-TW.js +5 -4
  159. package/typings/index.d.ts +177 -186
  160. package/typings/promiseBasedTypes.d.ts +3573 -5941
  161. package/typings/types.d.ts +4042 -6370
  162. package/lib/cli.js +0 -256
  163. package/lib/helper/ExpectHelper.js +0 -391
  164. package/lib/helper/Nightmare.js +0 -1504
  165. package/lib/helper/Protractor.js +0 -1863
  166. package/lib/helper/SoftExpectHelper.js +0 -381
  167. package/lib/helper/TestCafe.js +0 -1414
  168. package/lib/helper/clientscripts/nightmare.js +0 -213
  169. package/lib/helper/extras/PlaywrightReactVueLocator.js +0 -43
  170. package/lib/helper/testcafe/testControllerHolder.js +0 -42
  171. package/lib/helper/testcafe/testcafe-utils.js +0 -62
  172. package/lib/interfaces/bdd.js +0 -81
  173. package/lib/listener/artifacts.js +0 -19
  174. package/lib/listener/timeout.js +0 -109
  175. package/lib/mochaFactory.js +0 -113
  176. package/lib/plugin/allure.js +0 -15
  177. package/lib/plugin/commentStep.js +0 -136
  178. package/lib/plugin/debugErrors.js +0 -67
  179. package/lib/plugin/eachElement.js +0 -127
  180. package/lib/plugin/fakerTransform.js +0 -49
  181. package/lib/plugin/retryTo.js +0 -127
  182. package/lib/plugin/selenoid.js +0 -384
  183. package/lib/plugin/standardActingHelpers.js +0 -3
  184. package/lib/plugin/tryTo.js +0 -115
  185. package/lib/plugin/wdio.js +0 -249
  186. package/lib/scenario.js +0 -224
  187. package/lib/ui.js +0 -236
  188. package/lib/within.js +0 -70
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "4.0.0-beta.4",
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",
@@ -29,147 +29,159 @@
29
29
  "docs/webapi/**"
30
30
  ],
31
31
  "main": "lib/index.js",
32
+ "exports": {
33
+ ".": "./lib/index.js",
34
+ "./lib/*": "./lib/*.js",
35
+ "./els": "./lib/els.js",
36
+ "./effects": "./lib/effects.js",
37
+ "./steps": "./lib/steps.js",
38
+ "./store": "./lib/store.js"
39
+ },
32
40
  "types": "typings/index.d.ts",
33
41
  "bin": {
34
- "codeceptjs": "./bin/codecept.js"
42
+ "codeceptjs": "bin/codecept.js"
43
+ },
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/Codeception/codeceptjs.git"
35
47
  },
36
- "repository": "Codeception/codeceptjs",
37
48
  "scripts": {
38
- "json-server": "json-server test/data/rest/db.json --host 0.0.0.0 -p 8010 --watch -m test/data/rest/headers.js",
49
+ "json-server": "json-server test/data/rest/db.json --host 0.0.0.0 -p 8010 --watch -m test/data/rest/headers.cjs",
39
50
  "json-server:graphql": "node test/data/graphql/index.js",
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",
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",
46
57
  "test": "npm run test:unit && npm run test:runner",
47
- "test:appium-quick": "mocha test/helper/AppiumV2_test.js --grep 'quick'",
48
- "test:appium-other": "mocha test/helper/AppiumV2_test.js --grep 'second'",
49
- "test:ios:appium-quick": "mocha test/helper/AppiumV2_ios_test.js --grep 'quick'",
50
- "test:ios:appium-other": "mocha test/helper/AppiumV2_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",
51
62
  "test-app:start": "php -S 127.0.0.1:8000 -t test/data/app",
52
63
  "test-app:stop": "kill -9 $(lsof -t -i:8000)",
53
- "test:unit:webbapi:playwright": "mocha test/helper/Playwright_test.js",
54
- "test:unit:webbapi:puppeteer": "mocha test/helper/Puppeteer_test.js",
55
- "test:unit:webbapi:webDriver": "mocha test/helper/WebDriver_test.js",
56
- "test:unit:webbapi:webDriver:noSeleniumServer": "mocha test/helper/WebDriver.noSeleniumServer_test.js",
57
- "test:unit:webbapi:testCafe": "mocha test/helper/TestCafe_test.js",
58
- "test:unit:expect": "mocha test/helper/Expect_test.js",
59
- "test:plugin": "mocha test/plugin/plugin_test.js",
60
- "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",
61
71
  "dev:graphql": "node test/data/graphql/index.js",
62
- "publish:site": "./runok.js publish:site",
63
- "update-contributor-faces": "./runok.js contributor:faces",
72
+ "publish:site": "./runok.cjs publish:site",
73
+ "update-contributor-faces": "./runok.cjs contributor:faces",
64
74
  "types-fix": "node typings/fixDefFiles.js",
65
75
  "dtslint": "npm run types-fix && tsd",
66
76
  "prepare": "husky install",
67
- "prepare-release": "./runok.js versioning && ./runok.js get:commit-log",
68
- "publish-beta": "./runok.js publish:next-beta-version"
77
+ "prepare-release": "./runok.cjs versioning && ./runok.cjs get:commit-log",
78
+ "publish-beta": "./runok.cjs publish:next-beta-version"
69
79
  },
70
80
  "dependencies": {
71
- "@codeceptjs/configure": "1.0.1",
72
- "@codeceptjs/helper": "2.0.4",
73
- "@cucumber/cucumber-expressions": "18",
74
- "@cucumber/gherkin": "30",
75
- "@cucumber/messages": "27.0.0",
76
- "@xmldom/xmldom": "0.9.5",
77
- "acorn": "8.14.0",
78
- "arrify": "2.0.1",
79
- "axios": "1.7.7",
80
- "chai": "5.1.1",
81
- "chai-deep-match": "1.2.1",
82
- "chai-exclude": "2.1.1",
83
- "chai-json-schema": "1.5.1",
84
- "chai-json-schema-ajv": "5.2.4",
85
- "chai-match-pattern": "1.3.0",
86
- "chai-string": "1.5.0",
81
+ "@codeceptjs/configure": "1.0.6",
82
+ "@codeceptjs/helper": "^4.0.0-beta.1",
83
+ "@cucumber/cucumber-expressions": "^18.0.1",
84
+ "@cucumber/gherkin": "32.1.2",
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",
91
+ "@xmldom/xmldom": "0.9.8",
92
+ "acorn": "8.14.1",
93
+ "arrify": "3.0.0",
94
+ "axios": "1.8.4",
87
95
  "chalk": "4.1.2",
96
+ "cheerio": "^1.1.0",
88
97
  "commander": "11.1.0",
89
- "cross-spawn": "7.0.5",
98
+ "cross-spawn": "7.0.6",
90
99
  "css-to-xpath": "0.1.0",
91
100
  "csstoxpath": "1.6.0",
92
101
  "envinfo": "7.14.0",
93
102
  "escape-string-regexp": "4.0.0",
94
103
  "figures": "3.2.0",
95
104
  "fn-args": "4.0.0",
96
- "fs-extra": "11.2.0",
97
- "glob": "6.0.1",
105
+ "fs-extra": "11.3.0",
106
+ "fuse.js": "^7.1.0",
107
+ "glob": "^11.0.3",
98
108
  "html-minifier-terser": "7.2.0",
99
- "invisi-data": "^1.0.0",
100
- "inquirer": "6.5.2",
109
+ "inquirer": "12.9.2",
110
+ "invisi-data": "^1.1.2",
101
111
  "joi": "17.13.3",
102
- "js-beautify": "1.15.1",
112
+ "js-beautify": "1.15.4",
103
113
  "lodash.clonedeep": "4.5.0",
104
114
  "lodash.merge": "4.6.2",
105
- "mkdirp": "1.0.4",
106
- "mocha": "10.8.2",
107
- "monocart-coverage-reports": "2.11.3",
115
+ "mkdirp": "3.0.1",
116
+ "mocha": "11.6.0",
117
+ "monocart-coverage-reports": "2.12.6",
108
118
  "ms": "2.1.3",
109
- "ora-classic": "5.4.2",
119
+ "ora": "^8.0.0",
110
120
  "parse-function": "5.6.10",
111
- "parse5": "7.2.1",
121
+ "parse5": "7.3.0",
112
122
  "promise-retry": "1.1.1",
113
123
  "resq": "1.11.0",
114
- "sprintf-js": "1.1.1",
115
- "uuid": "11.0"
124
+ "sprintf-js": "1.1.3",
125
+ "uuid": "11.1.0"
116
126
  },
117
127
  "optionalDependencies": {
118
- "@codeceptjs/detox-helper": "1.1.2"
128
+ "@codeceptjs/detox-helper": "1.1.8"
119
129
  },
120
130
  "devDependencies": {
131
+ "@apollo/server": "^4.12.2",
132
+ "@codeceptjs/expect-helper": "^1.0.2",
121
133
  "@codeceptjs/mock-request": "0.3.1",
122
- "@eslint/eslintrc": "3.2.0",
123
- "@eslint/js": "9.16.0",
124
- "@faker-js/faker": "9.3.0",
134
+ "@eslint/eslintrc": "3.3.1",
135
+ "@eslint/js": "9.30.0",
136
+ "@faker-js/faker": "9.8.0",
137
+ "@inquirer/testing": "^2.1.49",
125
138
  "@pollyjs/adapter-puppeteer": "6.0.6",
126
- "@pollyjs/core": "5.1.0",
127
- "@types/chai": "4.3.19",
128
- "@types/inquirer": "9.0.3",
129
- "@types/node": "22.10.1",
130
- "@wdio/sauce-service": "9.2.13",
131
- "@wdio/selenium-standalone-service": "8.3.2",
132
- "@wdio/utils": "9.2.8",
133
- "@xmldom/xmldom": "0.9.5",
134
- "apollo-server-express": "3.13.0",
139
+ "@pollyjs/core": "6.0.6",
140
+ "@testomatio/reporter": "^2.3.1",
141
+ "@types/chai": "5.2.2",
142
+ "@types/inquirer": "9.0.7",
143
+ "@types/node": "24.0.10",
144
+ "@wdio/sauce-service": "9.12.5",
145
+ "@wdio/selenium-standalone-service": "8.15.0",
146
+ "@wdio/utils": "9.15.0",
147
+ "@xmldom/xmldom": "0.9.8",
148
+ "bunosh": "latest",
149
+ "chai": "^4.5.0",
135
150
  "chai-as-promised": "7.1.2",
136
151
  "chai-subset": "1.6.0",
137
- "cheerio": "^1.0.0",
138
- "contributor-faces": "1.1.0",
139
152
  "documentation": "14.0.3",
140
- "electron": "33.2.1",
141
- "eslint": "9.16.0",
142
- "eslint-config-airbnb-base": "15.0.0",
143
- "eslint-plugin-import": "2.31.0",
144
- "eslint-plugin-mocha": "10.5.0",
153
+ "electron": "37.1.0",
154
+ "eslint": "^9.31.0",
155
+ "eslint-plugin-import": "2.32.0",
156
+ "eslint-plugin-mocha": "11.1.0",
145
157
  "expect": "29.7.0",
146
- "express": "4.21.1",
147
- "globals": "15.12.0",
148
- "graphql": "16.9.0",
158
+ "express": "5.1.0",
159
+ "globals": "16.2.0",
160
+ "graphql": "16.10.0",
161
+ "graphql-tag": "^2.12.6",
149
162
  "husky": "9.1.7",
150
- "inquirer-test": "2.0.1",
151
- "jsdoc": "4.0.4",
163
+ "jsdoc": "^3.6.11",
152
164
  "jsdoc-typeof-plugin": "1.0.0",
153
165
  "json-server": "0.17.4",
154
- "playwright": "1.49.0",
155
- "prettier": "^3.3.2",
156
- "puppeteer": "23.8.0",
166
+ "mochawesome": "^7.1.3",
167
+ "playwright": "1.53.0",
168
+ "prettier": "^3.6.2",
169
+ "puppeteer": "24.8.0",
157
170
  "qrcode-terminal": "0.12.0",
158
171
  "rosie": "2.1.1",
159
- "runok": "0.9.3",
160
- "semver": "7.6.3",
161
- "sinon": "19.0.2",
172
+ "runok": "^0.9.3",
173
+ "semver": "7.7.2",
174
+ "sinon": "21.0.0",
162
175
  "sinon-chai": "3.7.0",
163
- "testcafe": "3.7.0",
164
- "ts-morph": "24.0.0",
176
+ "ts-morph": "26.0.0",
165
177
  "ts-node": "10.9.2",
166
- "tsd": "^0.31.0",
178
+ "tsd": "^0.32.0",
167
179
  "tsd-jsdoc": "2.5.0",
168
- "typedoc": "0.26.11",
169
- "typedoc-plugin-markdown": "4.2.10",
170
- "typescript": "5.7.2",
171
- "wdio-docker-service": "1.5.0",
172
- "webdriverio": "8.40.6",
180
+ "typedoc": "0.28.7",
181
+ "typedoc-plugin-markdown": "4.7.0",
182
+ "typescript": "5.8.3",
183
+ "wdio-docker-service": "3.2.1",
184
+ "webdriverio": "9.12.5",
173
185
  "xml2js": "0.6.2",
174
186
  "xpath": "0.0.34"
175
187
  },
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'de'
3
+
4
+ export default {
2
5
  I: 'Ich',
3
6
  contexts: {
4
- Feature: 'Funktionalität',
5
- Scenario: 'Szenario',
6
- ScenarioOutline: 'Szenariogrundriss',
7
+ ...gherkinTranslations(langCode),
7
8
  },
8
9
  actions: {
9
10
  amOutsideAngularApp: 'befinde_mich_außerhalb_der_angular_app',
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'fr'
3
+
4
+ export default {
2
5
  I: 'Je',
3
6
  contexts: {
4
- Feature: 'Fonctionnalité',
5
- Scenario: 'Scénario',
6
- ScenarioOutline: 'Plan du scénario',
7
+ ...gherkinTranslations(langCode),
7
8
  Before: 'Avant',
8
9
  After: 'Après',
9
10
  BeforeSuite: 'AvantLaSuite',
@@ -1,9 +1,23 @@
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')
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
+ }
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'it'
3
+
4
+ export default {
2
5
  I: 'io',
3
6
  contexts: {
4
- Feature: 'Caratteristica',
5
- Scenario: 'lo_scenario',
6
- ScenarioOutline: 'Schema dello scenario',
7
+ ...gherkinTranslations(langCode),
7
8
  Before: 'Prima',
8
9
  After: 'Dopo',
9
10
  BeforeSuite: 'Prima_della_suite',
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'ja'
3
+
4
+ export default {
2
5
  I: '私は',
3
6
  contexts: {
4
- Feature: 'フィーチャ',
5
- Scenario: 'シナリオ',
6
- ScenarioOutline: 'シナリオアウトライン',
7
+ ...gherkinTranslations(langCode),
7
8
  },
8
9
  actions: {
9
10
  amOutsideAngularApp: 'Angularの外に出る',
@@ -0,0 +1,76 @@
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'nl'
3
+
4
+ export default {
5
+ I: 'Ik',
6
+ contexts: {
7
+ ...gherkinTranslations(langCode),
8
+ },
9
+ actions: {
10
+ amOutsideAngularApp: 'ben_buiten_angular_app',
11
+ amInsideAngularApp: 'ben_binnen_angular_app',
12
+ waitForElement: 'wacht_op_element',
13
+ waitForClickable: 'wacht_tot_klikbaar',
14
+ waitForVisible: 'wacht_tot_zichtbaar',
15
+ waitForEnabled: 'wacht_tot_ingeschakeld',
16
+ waitForInvisible: 'wacht_tot_onzichtbaar',
17
+ waitInUrl: 'wacht_in_url',
18
+ waitForText: 'wacht_op_tekst',
19
+ moveTo: 'beweeg_de_cursor_naar',
20
+ refresh: 'vernieuw_pagina',
21
+ refreshPage: 'vernieuw_pagina',
22
+ haveModule: 'heb_module',
23
+ resetModule: 'reset_module',
24
+ amOnPage: 'ben_op_pagina',
25
+ click: 'klik',
26
+ doubleClick: 'dubbelklik',
27
+ see: 'zie',
28
+ dontSee: 'zie_niet',
29
+ selectOption: 'selecteer_optie',
30
+ fillField: 'vul_veld_in',
31
+ pressKey: 'druk_op_toets',
32
+ triggerMouseEvent: 'trigger_een_muis_event',
33
+ attachFile: 'voeg_bestand_toe',
34
+ seeInField: 'zie_in_veld',
35
+ dontSeeInField: 'zie_niet_in_veld',
36
+ appendField: 'voeg_toe_aan_veld',
37
+ checkOption: 'vink_optie_aan',
38
+ seeCheckboxIsChecked: 'zie_dat_checkbox_aangevinkt_is',
39
+ dontSeeCheckboxIsChecked: 'zie_niet_dat_checkbox_aangevinkt_is',
40
+ grabTextFrom: 'pak_tekst_van',
41
+ grabValueFrom: 'pak_waarde_van',
42
+ grabAttributeFrom: 'pak_attribuut_van',
43
+ seeInTitle: 'zie_in_titel',
44
+ dontSeeInTitle: 'zie_niet_in_titel',
45
+ grabTitle: 'pak_titel',
46
+ seeElement: 'zie_element',
47
+ dontSeeElement: 'zie_element_niet',
48
+ seeInSource: 'zie_in_broncode',
49
+ dontSeeInSource: 'zie_niet_in_broncode',
50
+ executeScript: 'voer_script_uit',
51
+ executeAsyncScript: 'voer_asynchroon_script_uit',
52
+ seeInCurrentUrl: 'zie_in_huidige_url',
53
+ dontSeeInCurrentUrl: 'zie_niet_in_huidige_url',
54
+ seeCurrentUrlEquals: 'zie_dat_url_gelijk_is',
55
+ dontSeeCurrentUrlEquals: 'zie_dat_url_niet_gelijk_is',
56
+ saveScreenshot: 'sla_screenshot_op',
57
+ setCookie: 'stel_cookie_in',
58
+ clearCookie: 'verwijder_cookie',
59
+ seeCookie: 'zie_cookie',
60
+ dontSeeCookie: 'zie_cookie_niet',
61
+ grabCookie: 'pak_cookie',
62
+ resizeWindow: 'verander_venstergrootte',
63
+ wait: 'wacht',
64
+ haveHeader: 'gebruik_http_header',
65
+ clearField: 'wis_veld',
66
+ dontSeeElementInDOM: 'zie_element_niet_in_DOM',
67
+ moveCursorTo: 'beweeg_de_cursor_naar',
68
+ scrollTo: 'scroll_naar',
69
+ sendGetRequest: 'doe_een_get_verzoek',
70
+ sendPutRequest: 'doe_een_put_verzoek',
71
+ sendDeleteRequest: 'doe_een_delete_verzoek',
72
+ sendDeleteRequestWithPayload: 'doe_een_delete_verzoek_met_payload',
73
+ sendPostRequest: 'doe_een_post_verzoek',
74
+ switchTo: 'wissel_naar_iframe',
75
+ },
76
+ }
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'pl'
3
+
4
+ export default {
2
5
  I: 'Ja',
3
6
  contexts: {
4
- Feature: 'Funkcja',
5
- Scenario: 'Scenariusz',
6
- ScenarioOutline: 'Szablon scenariusza',
7
+ ...gherkinTranslations(langCode),
7
8
  },
8
9
  actions: {
9
10
  amOutsideAngularApp: 'jestem_poza_aplikacją_angular',
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'pt'
3
+
4
+ export default {
2
5
  I: 'Eu',
3
6
  contexts: {
4
- Feature: 'Funcionalidade',
5
- Scenario: 'Cenário',
6
- ScenarioOutline: 'Esquema do Cenário',
7
+ ...gherkinTranslations(langCode),
7
8
  Before: 'Antes',
8
9
  After: 'Depois',
9
10
  BeforeSuite: 'AntesDaSuite',
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'ru'
3
+
4
+ export default {
2
5
  I: 'Я',
3
6
  contexts: {
4
- Feature: 'Цель',
5
- Scenario: 'Сценарий',
6
- ScenarioOutline: 'Структура сценария',
7
+ ...gherkinTranslations(langCode),
7
8
  Before: 'Начало',
8
9
  After: 'Конец',
9
10
  BeforeSuite: 'Перед_всем',
@@ -0,0 +1,18 @@
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'))
12
+ const { feature, scenario, scenarioOutline } = gherkinLanguages[langCode]
13
+ return {
14
+ Feature: feature[0],
15
+ Scenario: scenario[0],
16
+ ScenarioOutline: scenarioOutline[0],
17
+ }
18
+ }
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'zh-CN'
3
+
4
+ export default {
2
5
  I: '我',
3
6
  contexts: {
4
- Feature: '功能',
5
- Scenario: '场景',
6
- ScenarioOutline: '场景大纲',
7
+ ...gherkinTranslations(langCode),
7
8
  },
8
9
  actions: {
9
10
  amOutsideAngularApp: '在Angular应用外',
@@ -1,9 +1,10 @@
1
- module.exports = {
1
+ import { gherkinTranslations } from './utils.js'
2
+ const langCode = 'zh-TW'
3
+
4
+ export default {
2
5
  I: '我',
3
6
  contexts: {
4
- Feature: '功能',
5
- Scenario: '場景',
6
- ScenarioOutline: '場景大綱',
7
+ ...gherkinTranslations(langCode),
7
8
  },
8
9
  actions: {
9
10
  amOutsideAngularApp: '在Angular應用外',