codeceptjs 4.0.0-beta.3 → 4.0.0-beta.5

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 (155) hide show
  1. package/README.md +134 -119
  2. package/bin/codecept.js +12 -2
  3. package/bin/test-server.js +53 -0
  4. package/docs/webapi/clearCookie.mustache +1 -1
  5. package/lib/actor.js +66 -102
  6. package/lib/ai.js +130 -121
  7. package/lib/assert/empty.js +3 -5
  8. package/lib/assert/equal.js +4 -7
  9. package/lib/assert/include.js +4 -6
  10. package/lib/assert/throws.js +2 -4
  11. package/lib/assert/truth.js +2 -2
  12. package/lib/codecept.js +141 -86
  13. package/lib/command/check.js +201 -0
  14. package/lib/command/configMigrate.js +2 -4
  15. package/lib/command/definitions.js +8 -26
  16. package/lib/command/dryRun.js +30 -35
  17. package/lib/command/generate.js +10 -14
  18. package/lib/command/gherkin/snippets.js +75 -73
  19. package/lib/command/gherkin/steps.js +1 -1
  20. package/lib/command/info.js +42 -8
  21. package/lib/command/init.js +13 -12
  22. package/lib/command/interactive.js +10 -2
  23. package/lib/command/list.js +1 -1
  24. package/lib/command/run-multiple/chunk.js +48 -45
  25. package/lib/command/run-multiple.js +12 -35
  26. package/lib/command/run-workers.js +21 -58
  27. package/lib/command/utils.js +5 -6
  28. package/lib/command/workers/runTests.js +263 -222
  29. package/lib/container.js +386 -238
  30. package/lib/data/context.js +10 -13
  31. package/lib/data/dataScenarioConfig.js +8 -8
  32. package/lib/data/dataTableArgument.js +6 -6
  33. package/lib/data/table.js +5 -11
  34. package/lib/effects.js +223 -0
  35. package/lib/element/WebElement.js +327 -0
  36. package/lib/els.js +158 -0
  37. package/lib/event.js +21 -17
  38. package/lib/heal.js +88 -80
  39. package/lib/helper/AI.js +2 -1
  40. package/lib/helper/ApiDataFactory.js +4 -7
  41. package/lib/helper/Appium.js +50 -57
  42. package/lib/helper/FileSystem.js +3 -3
  43. package/lib/helper/GraphQLDataFactory.js +4 -4
  44. package/lib/helper/JSONResponse.js +75 -37
  45. package/lib/helper/Mochawesome.js +31 -9
  46. package/lib/helper/Nightmare.js +37 -58
  47. package/lib/helper/Playwright.js +267 -272
  48. package/lib/helper/Protractor.js +56 -87
  49. package/lib/helper/Puppeteer.js +247 -264
  50. package/lib/helper/REST.js +29 -17
  51. package/lib/helper/TestCafe.js +22 -47
  52. package/lib/helper/WebDriver.js +157 -368
  53. package/lib/helper/extras/PlaywrightPropEngine.js +2 -2
  54. package/lib/helper/extras/Popup.js +22 -22
  55. package/lib/helper/network/utils.js +1 -1
  56. package/lib/helper/testcafe/testcafe-utils.js +27 -28
  57. package/lib/listener/emptyRun.js +55 -0
  58. package/lib/listener/exit.js +7 -10
  59. package/lib/listener/{retry.js → globalRetry.js} +5 -5
  60. package/lib/listener/globalTimeout.js +165 -0
  61. package/lib/listener/helpers.js +15 -15
  62. package/lib/listener/mocha.js +1 -1
  63. package/lib/listener/result.js +12 -0
  64. package/lib/listener/retryEnhancer.js +85 -0
  65. package/lib/listener/steps.js +32 -18
  66. package/lib/listener/store.js +20 -0
  67. package/lib/locator.js +1 -1
  68. package/lib/mocha/asyncWrapper.js +231 -0
  69. package/lib/{interfaces → mocha}/bdd.js +3 -3
  70. package/lib/mocha/cli.js +308 -0
  71. package/lib/mocha/factory.js +104 -0
  72. package/lib/{interfaces → mocha}/featureConfig.js +32 -12
  73. package/lib/{interfaces → mocha}/gherkin.js +26 -28
  74. package/lib/mocha/hooks.js +112 -0
  75. package/lib/mocha/index.js +12 -0
  76. package/lib/mocha/inject.js +29 -0
  77. package/lib/{interfaces → mocha}/scenarioConfig.js +31 -7
  78. package/lib/mocha/suite.js +82 -0
  79. package/lib/mocha/test.js +181 -0
  80. package/lib/mocha/types.d.ts +42 -0
  81. package/lib/mocha/ui.js +232 -0
  82. package/lib/output.js +93 -65
  83. package/lib/pause.js +160 -138
  84. package/lib/plugin/analyze.js +396 -0
  85. package/lib/plugin/auth.js +435 -0
  86. package/lib/plugin/autoDelay.js +8 -8
  87. package/lib/plugin/autoLogin.js +3 -338
  88. package/lib/plugin/commentStep.js +6 -1
  89. package/lib/plugin/coverage.js +10 -22
  90. package/lib/plugin/customLocator.js +3 -3
  91. package/lib/plugin/customReporter.js +52 -0
  92. package/lib/plugin/eachElement.js +1 -1
  93. package/lib/plugin/fakerTransform.js +1 -1
  94. package/lib/plugin/heal.js +36 -9
  95. package/lib/plugin/htmlReporter.js +1947 -0
  96. package/lib/plugin/pageInfo.js +140 -0
  97. package/lib/plugin/retryFailedStep.js +17 -18
  98. package/lib/plugin/retryTo.js +2 -113
  99. package/lib/plugin/screenshotOnFail.js +17 -58
  100. package/lib/plugin/selenoid.js +15 -35
  101. package/lib/plugin/standardActingHelpers.js +4 -1
  102. package/lib/plugin/stepByStepReport.js +56 -17
  103. package/lib/plugin/stepTimeout.js +5 -12
  104. package/lib/plugin/subtitles.js +4 -4
  105. package/lib/plugin/tryTo.js +3 -102
  106. package/lib/plugin/wdio.js +8 -10
  107. package/lib/recorder.js +155 -124
  108. package/lib/rerun.js +43 -42
  109. package/lib/result.js +161 -0
  110. package/lib/secret.js +1 -2
  111. package/lib/step/base.js +239 -0
  112. package/lib/step/comment.js +10 -0
  113. package/lib/step/config.js +50 -0
  114. package/lib/step/func.js +46 -0
  115. package/lib/step/helper.js +50 -0
  116. package/lib/step/meta.js +99 -0
  117. package/lib/step/record.js +74 -0
  118. package/lib/step/retry.js +11 -0
  119. package/lib/step/section.js +55 -0
  120. package/lib/step.js +21 -332
  121. package/lib/steps.js +50 -0
  122. package/lib/store.js +37 -5
  123. package/lib/template/heal.js +2 -11
  124. package/lib/test-server.js +323 -0
  125. package/lib/timeout.js +66 -0
  126. package/lib/utils.js +351 -218
  127. package/lib/within.js +75 -55
  128. package/lib/workerStorage.js +2 -1
  129. package/lib/workers.js +386 -277
  130. package/package.json +81 -75
  131. package/translations/de-DE.js +5 -3
  132. package/translations/fr-FR.js +5 -4
  133. package/translations/index.js +1 -0
  134. package/translations/it-IT.js +4 -3
  135. package/translations/ja-JP.js +4 -3
  136. package/translations/nl-NL.js +76 -0
  137. package/translations/pl-PL.js +4 -3
  138. package/translations/pt-BR.js +4 -3
  139. package/translations/ru-RU.js +4 -3
  140. package/translations/utils.js +9 -0
  141. package/translations/zh-CN.js +4 -3
  142. package/translations/zh-TW.js +4 -3
  143. package/typings/index.d.ts +197 -187
  144. package/typings/promiseBasedTypes.d.ts +53 -903
  145. package/typings/types.d.ts +372 -1042
  146. package/lib/cli.js +0 -257
  147. package/lib/helper/ExpectHelper.js +0 -391
  148. package/lib/helper/MockServer.js +0 -221
  149. package/lib/helper/SoftExpectHelper.js +0 -381
  150. package/lib/listener/artifacts.js +0 -19
  151. package/lib/listener/timeout.js +0 -109
  152. package/lib/mochaFactory.js +0 -113
  153. package/lib/plugin/debugErrors.js +0 -67
  154. package/lib/scenario.js +0 -224
  155. package/lib/ui.js +0 -236
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "4.0.0-beta.3",
3
+ "version": "4.0.0-beta.5",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -29,13 +29,20 @@
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
+ },
32
39
  "types": "typings/index.d.ts",
33
40
  "bin": {
34
41
  "codeceptjs": "./bin/codecept.js"
35
42
  },
36
43
  "repository": "Codeception/codeceptjs",
37
44
  "scripts": {
38
- "json-server": "./node_modules/json-server/bin/index.js test/data/rest/db.json -p 8010 --watch -m test/data/rest/headers.js",
45
+ "test-server": "node bin/test-server.js test/data/rest/db.json --host 0.0.0.0 -p 8010",
39
46
  "json-server:graphql": "node test/data/graphql/index.js",
40
47
  "lint": "eslint bin/ examples/ lib/ test/ translations/ runok.js",
41
48
  "lint-fix": "eslint bin/ examples/ lib/ test/ translations/ runok.js --fix",
@@ -44,20 +51,18 @@
44
51
  "test:unit": "mocha test/unit --recursive --timeout 10000",
45
52
  "test:runner": "mocha test/runner --recursive --timeout 10000",
46
53
  "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'",
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'",
51
58
  "test-app:start": "php -S 127.0.0.1:8000 -t test/data/app",
52
59
  "test-app:stop": "kill -9 $(lsof -t -i:8000)",
53
60
  "test:unit:webbapi:playwright": "mocha test/helper/Playwright_test.js",
54
61
  "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:webDriver:devtools": "mocha test/helper/WebDriver_devtools_test.js --exit",
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",
58
64
  "test:unit:webbapi:testCafe": "mocha test/helper/TestCafe_test.js",
59
65
  "test:unit:expect": "mocha test/helper/Expect_test.js",
60
- "test:unit:mockServer": "mocha test/helper/MockServer_test.js",
61
66
  "test:plugin": "mocha test/plugin/plugin_test.js",
62
67
  "def": "./runok.js def",
63
68
  "dev:graphql": "node test/data/graphql/index.js",
@@ -70,106 +75,107 @@
70
75
  "publish-beta": "./runok.js publish:next-beta-version"
71
76
  },
72
77
  "dependencies": {
73
- "@codeceptjs/configure": "1.0.1",
78
+ "@codeceptjs/configure": "1.0.6",
74
79
  "@codeceptjs/helper": "2.0.4",
75
- "@cucumber/cucumber-expressions": "17",
76
- "@cucumber/gherkin": "29",
77
- "@cucumber/messages": "25.0.1",
78
- "@xmldom/xmldom": "0.9.4",
79
- "acorn": "8.12.1",
80
- "arrify": "2.0.1",
81
- "axios": "1.7.7",
82
- "chai": "5.1.1",
83
- "chai-deep-match": "1.2.1",
84
- "chai-exclude": "2.1.1",
85
- "chai-json-schema": "1.5.1",
86
- "chai-json-schema-ajv": "5.2.4",
87
- "chai-match-pattern": "1.3.0",
88
- "chai-string": "1.5.0",
80
+ "@cucumber/cucumber-expressions": "18",
81
+ "@cucumber/gherkin": "32.1.2",
82
+ "@cucumber/messages": "27.2.0",
83
+ "@xmldom/xmldom": "0.9.8",
84
+ "acorn": "8.14.1",
85
+ "arrify": "3.0.0",
86
+ "axios": "1.11.0",
89
87
  "chalk": "4.1.2",
88
+ "cheerio": "^1.0.0",
89
+ "chokidar": "^4.0.3",
90
90
  "commander": "11.1.0",
91
- "cross-spawn": "7.0.3",
91
+ "cross-spawn": "7.0.6",
92
92
  "css-to-xpath": "0.1.0",
93
93
  "csstoxpath": "1.6.0",
94
- "devtools": "8.40.2",
95
94
  "envinfo": "7.14.0",
96
95
  "escape-string-regexp": "4.0.0",
97
96
  "figures": "3.2.0",
98
97
  "fn-args": "4.0.0",
99
- "fs-extra": "11.2.0",
100
- "glob": "6.0.1",
98
+ "fs-extra": "11.3.0",
99
+ "fuse.js": "^7.0.0",
100
+ "glob": ">=9.0.0 <12",
101
101
  "html-minifier-terser": "7.2.0",
102
- "inquirer": "6.5.2",
102
+ "inquirer": "^8.2.7",
103
+ "invisi-data": "^1.0.0",
103
104
  "joi": "17.13.3",
104
- "js-beautify": "1.15.1",
105
+ "js-beautify": "1.15.4",
105
106
  "lodash.clonedeep": "4.5.0",
106
107
  "lodash.merge": "4.6.2",
107
- "mkdirp": "1.0.4",
108
- "mocha": "10.7.3",
109
- "monocart-coverage-reports": "2.10.3",
108
+ "lodash.shuffle": "4.2.0",
109
+ "mkdirp": "3.0.1",
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
- "pactum": "3.7.1",
113
115
  "parse-function": "5.6.10",
114
- "parse5": "7.1.2",
116
+ "parse5": "7.3.0",
115
117
  "promise-retry": "1.1.1",
116
118
  "resq": "1.11.0",
117
- "sprintf-js": "1.1.1",
118
- "uuid": "10.0"
119
+ "sprintf-js": "1.1.3",
120
+ "uuid": "11.1.0"
119
121
  },
120
122
  "optionalDependencies": {
121
- "@codeceptjs/detox-helper": "1.1.2"
123
+ "@codeceptjs/detox-helper": "1.1.8"
122
124
  },
123
125
  "devDependencies": {
126
+ "@apollo/server": "^4",
127
+ "@codeceptjs/expect-helper": "^1.0.2",
124
128
  "@codeceptjs/mock-request": "0.3.1",
125
- "@faker-js/faker": "9.0.3",
129
+ "@eslint/eslintrc": "3.3.1",
130
+ "@eslint/js": "9.31.0",
131
+ "@faker-js/faker": "9.8.0",
126
132
  "@pollyjs/adapter-puppeteer": "6.0.6",
127
- "@pollyjs/core": "5.1.0",
128
- "@types/chai": "4.3.19",
129
- "@types/inquirer": "9.0.3",
130
- "@types/node": "22.5.5",
131
- "@wdio/sauce-service": "9.0.9",
132
- "@wdio/selenium-standalone-service": "8.3.2",
133
- "@wdio/utils": "9.1.2",
134
- "@xmldom/xmldom": "0.9.4",
135
- "apollo-server-express": "2.25.3",
133
+ "@pollyjs/core": "6.0.6",
134
+ "@types/chai": "5.2.2",
135
+ "@types/inquirer": "9.0.7",
136
+ "@types/node": "24.0.10",
137
+ "@wdio/sauce-service": "9.12.5",
138
+ "@wdio/selenium-standalone-service": "8.15.0",
139
+ "@wdio/utils": "9.15.0",
140
+ "@xmldom/xmldom": "0.9.8",
141
+ "chai": "^4.0.0",
136
142
  "chai-as-promised": "7.1.2",
137
143
  "chai-subset": "1.6.0",
138
- "cheerio": "^1.0.0",
139
- "contributor-faces": "1.1.0",
140
- "documentation": "12.3.0",
141
- "electron": "31.3.1",
142
- "eslint": "8.57.0",
143
- "eslint-config-airbnb-base": "15.0.0",
144
- "eslint-plugin-import": "2.30.0",
145
- "eslint-plugin-mocha": "10.5.0",
146
- "expect": "29.7.0",
147
- "express": "4.19.2",
148
- "graphql": "16.9.0",
149
- "husky": "9.1.6",
144
+ "documentation": "14.0.3",
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",
153
+ "graphql-tag": "^2.12.6",
154
+ "husky": "9.1.7",
150
155
  "inquirer-test": "2.0.1",
151
- "jsdoc": "4.0.3",
156
+ "jsdoc": "^3.6.11",
152
157
  "jsdoc-typeof-plugin": "1.0.0",
153
- "json-server": "0.10.1",
154
- "playwright": "1.45.3",
158
+ "json-server": "0.17.4",
159
+ "mochawesome": "^7.1.3",
160
+ "playwright": "1.54.1",
155
161
  "prettier": "^3.3.2",
156
- "puppeteer": "23.3.0",
162
+ "puppeteer": "24.15.0",
157
163
  "qrcode-terminal": "0.12.0",
158
164
  "rosie": "2.1.1",
159
165
  "runok": "0.9.3",
160
- "semver": "7.6.3",
161
- "sinon": "18.0.0",
166
+ "semver": "7.7.2",
167
+ "sinon": "21.0.0",
162
168
  "sinon-chai": "3.7.0",
163
- "testcafe": "3.5.0",
164
- "ts-morph": "23.0.0",
169
+ "testcafe": "3.7.2",
170
+ "ts-morph": "26.0.0",
165
171
  "ts-node": "10.9.2",
166
- "tsd": "^0.31.0",
172
+ "tsd": "^0.33.0",
167
173
  "tsd-jsdoc": "2.5.0",
168
- "typedoc": "0.26.7",
169
- "typedoc-plugin-markdown": "4.2.9",
170
- "typescript": "5.6.3",
171
- "wdio-docker-service": "1.5.0",
172
- "webdriverio": "8.39.1",
174
+ "typedoc": "0.28.10",
175
+ "typedoc-plugin-markdown": "4.8.1",
176
+ "typescript": "5.8.3",
177
+ "wdio-docker-service": "3.2.1",
178
+ "webdriverio": "9.12.5",
173
179
  "xml2js": "0.6.2",
174
180
  "xpath": "0.0.34"
175
181
  },
@@ -1,9 +1,10 @@
1
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'de'
3
+
1
4
  module.exports = {
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',
@@ -68,6 +69,7 @@ module.exports = {
68
69
  sendGetRequest: 'mache_einen_get_request',
69
70
  sendPutRequest: 'mache_einen_put_request',
70
71
  sendDeleteRequest: 'mache_einen_delete_request',
72
+ sendDeleteRequestWithPayload: 'mache_einen_delete_request_mit_payload',
71
73
  sendPostRequest: 'mache_einen_post_request',
72
74
  switchTo: 'wechlse_in_iframe',
73
75
  },
@@ -1,9 +1,10 @@
1
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'fr'
3
+
1
4
  module.exports = {
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',
@@ -70,7 +71,7 @@ module.exports = {
70
71
  scrollTo: 'défileVers',
71
72
  sendGetRequest: 'envoieLaRequêteGet',
72
73
  sendPutRequest: 'envoieLaRequêtePut',
73
- sendDeleteRequest: 'envoieLaRequêteDelete',
74
+ sendDeleteRequest: 'envoieLaRequêteDeleteAvecPayload',
74
75
  sendPostRequest: 'envoieLaRequêtePost',
75
76
  },
76
77
  }
@@ -7,3 +7,4 @@ exports['pt-BR'] = require('./pt-BR')
7
7
  exports['ru-RU'] = require('./ru-RU')
8
8
  exports['zh-CN'] = require('./zh-CN')
9
9
  exports['zh-TW'] = require('./zh-TW')
10
+ exports['nl-NL'] = require('./nl-NL')
@@ -1,9 +1,10 @@
1
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'it'
3
+
1
4
  module.exports = {
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
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'ja'
3
+
1
4
  module.exports = {
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
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'nl'
3
+
4
+ module.exports = {
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
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'pl'
3
+
1
4
  module.exports = {
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
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'pt'
3
+
1
4
  module.exports = {
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
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'ru'
3
+
1
4
  module.exports = {
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,9 @@
1
+ module.exports.gherkinTranslations = function (langCode) {
2
+ const gherkinLanguages = require('@cucumber/gherkin/src/gherkin-languages.json')
3
+ const { feature, scenario, scenarioOutline } = gherkinLanguages[langCode]
4
+ return {
5
+ Feature: feature[0],
6
+ Scenario: scenario[0],
7
+ ScenarioOutline: scenarioOutline[0],
8
+ }
9
+ }
@@ -1,9 +1,10 @@
1
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'zh-CN'
3
+
1
4
  module.exports = {
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
+ const { gherkinTranslations } = require('./utils')
2
+ const langCode = 'zh-TW'
3
+
1
4
  module.exports = {
2
5
  I: '我',
3
6
  contexts: {
4
- Feature: '功能',
5
- Scenario: '場景',
6
- ScenarioOutline: '場景大綱',
7
+ ...gherkinTranslations(langCode),
7
8
  },
8
9
  actions: {
9
10
  amOutsideAngularApp: '在Angular應用外',