codeceptjs 3.6.10-beta.1 → 3.7.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.
Files changed (105) hide show
  1. package/README.md +81 -110
  2. package/bin/codecept.js +2 -2
  3. package/docs/webapi/clearCookie.mustache +1 -1
  4. package/lib/actor.js +46 -36
  5. package/lib/assert/empty.js +3 -5
  6. package/lib/assert/equal.js +4 -7
  7. package/lib/assert/include.js +4 -6
  8. package/lib/assert/throws.js +2 -4
  9. package/lib/assert/truth.js +2 -2
  10. package/lib/codecept.js +87 -83
  11. package/lib/command/configMigrate.js +2 -4
  12. package/lib/command/definitions.js +5 -25
  13. package/lib/command/generate.js +10 -14
  14. package/lib/command/gherkin/snippets.js +10 -8
  15. package/lib/command/gherkin/steps.js +1 -1
  16. package/lib/command/info.js +1 -3
  17. package/lib/command/init.js +8 -12
  18. package/lib/command/interactive.js +1 -1
  19. package/lib/command/list.js +1 -1
  20. package/lib/command/run-multiple.js +12 -35
  21. package/lib/command/run-workers.js +10 -10
  22. package/lib/command/utils.js +5 -6
  23. package/lib/command/workers/runTests.js +14 -17
  24. package/lib/container.js +327 -237
  25. package/lib/data/context.js +10 -13
  26. package/lib/data/dataScenarioConfig.js +8 -8
  27. package/lib/data/dataTableArgument.js +6 -6
  28. package/lib/data/table.js +5 -11
  29. package/lib/els.js +177 -0
  30. package/lib/event.js +1 -0
  31. package/lib/heal.js +78 -80
  32. package/lib/helper/ApiDataFactory.js +3 -6
  33. package/lib/helper/Appium.js +15 -30
  34. package/lib/helper/FileSystem.js +3 -3
  35. package/lib/helper/GraphQLDataFactory.js +3 -3
  36. package/lib/helper/JSONResponse.js +57 -37
  37. package/lib/helper/Nightmare.js +35 -53
  38. package/lib/helper/Playwright.js +189 -251
  39. package/lib/helper/Protractor.js +54 -77
  40. package/lib/helper/Puppeteer.js +134 -232
  41. package/lib/helper/REST.js +5 -17
  42. package/lib/helper/TestCafe.js +21 -44
  43. package/lib/helper/WebDriver.js +103 -162
  44. package/lib/helper/testcafe/testcafe-utils.js +26 -27
  45. package/lib/listener/artifacts.js +2 -2
  46. package/lib/listener/emptyRun.js +58 -0
  47. package/lib/listener/exit.js +4 -4
  48. package/lib/listener/{retry.js → globalRetry.js} +5 -5
  49. package/lib/listener/{timeout.js → globalTimeout.js} +8 -8
  50. package/lib/listener/helpers.js +15 -15
  51. package/lib/listener/mocha.js +1 -1
  52. package/lib/listener/steps.js +17 -12
  53. package/lib/listener/store.js +12 -0
  54. package/lib/mocha/asyncWrapper.js +204 -0
  55. package/lib/{interfaces → mocha}/bdd.js +3 -3
  56. package/lib/mocha/cli.js +257 -0
  57. package/lib/mocha/factory.js +104 -0
  58. package/lib/{interfaces → mocha}/featureConfig.js +11 -12
  59. package/lib/{interfaces → mocha}/gherkin.js +26 -28
  60. package/lib/mocha/hooks.js +83 -0
  61. package/lib/mocha/index.js +12 -0
  62. package/lib/mocha/inject.js +24 -0
  63. package/lib/{interfaces → mocha}/scenarioConfig.js +10 -6
  64. package/lib/mocha/suite.js +55 -0
  65. package/lib/mocha/test.js +60 -0
  66. package/lib/mocha/types.d.ts +31 -0
  67. package/lib/mocha/ui.js +219 -0
  68. package/lib/output.js +28 -10
  69. package/lib/pause.js +159 -135
  70. package/lib/plugin/autoDelay.js +4 -4
  71. package/lib/plugin/autoLogin.js +6 -7
  72. package/lib/plugin/commentStep.js +1 -1
  73. package/lib/plugin/coverage.js +10 -19
  74. package/lib/plugin/customLocator.js +3 -3
  75. package/lib/plugin/debugErrors.js +2 -2
  76. package/lib/plugin/eachElement.js +1 -1
  77. package/lib/plugin/fakerTransform.js +1 -1
  78. package/lib/plugin/heal.js +6 -9
  79. package/lib/plugin/retryFailedStep.js +4 -4
  80. package/lib/plugin/retryTo.js +2 -2
  81. package/lib/plugin/screenshotOnFail.js +9 -36
  82. package/lib/plugin/selenoid.js +15 -35
  83. package/lib/plugin/stepByStepReport.js +51 -13
  84. package/lib/plugin/stepTimeout.js +4 -11
  85. package/lib/plugin/subtitles.js +4 -4
  86. package/lib/plugin/tryTo.js +1 -1
  87. package/lib/plugin/wdio.js +8 -10
  88. package/lib/recorder.js +142 -121
  89. package/lib/secret.js +1 -1
  90. package/lib/step.js +160 -144
  91. package/lib/store.js +6 -2
  92. package/lib/template/heal.js +2 -11
  93. package/lib/utils.js +224 -216
  94. package/lib/within.js +73 -55
  95. package/lib/workers.js +265 -261
  96. package/package.json +45 -46
  97. package/typings/index.d.ts +172 -184
  98. package/typings/promiseBasedTypes.d.ts +53 -516
  99. package/typings/types.d.ts +127 -587
  100. package/lib/cli.js +0 -256
  101. package/lib/helper/ExpectHelper.js +0 -391
  102. package/lib/helper/SoftExpectHelper.js +0 -381
  103. package/lib/mochaFactory.js +0 -113
  104. package/lib/scenario.js +0 -224
  105. package/lib/ui.js +0 -236
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.6.10-beta.1",
3
+ "version": "3.7.0-beta.1",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -29,6 +29,10 @@
29
29
  "docs/webapi/**"
30
30
  ],
31
31
  "main": "lib/index.js",
32
+ "exports": {
33
+ ".": "./lib/index.js",
34
+ "./els": "./lib/els.js"
35
+ },
32
36
  "types": "typings/index.d.ts",
33
37
  "bin": {
34
38
  "codeceptjs": "./bin/codecept.js"
@@ -52,8 +56,8 @@
52
56
  "test-app:stop": "kill -9 $(lsof -t -i:8000)",
53
57
  "test:unit:webbapi:playwright": "mocha test/helper/Playwright_test.js",
54
58
  "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",
59
+ "test:unit:webbapi:webDriver": "mocha test/helper/WebDriver_test.js --timeout 10000",
60
+ "test:unit:webbapi:webDriver:noSeleniumServer": "mocha test/helper/WebDriver.noSeleniumServer_test.js --timeout 10000",
57
61
  "test:unit:webbapi:testCafe": "mocha test/helper/TestCafe_test.js",
58
62
  "test:unit:expect": "mocha test/helper/Expect_test.js",
59
63
  "test:plugin": "mocha test/plugin/plugin_test.js",
@@ -72,21 +76,15 @@
72
76
  "@codeceptjs/helper": "2.0.4",
73
77
  "@cucumber/cucumber-expressions": "18",
74
78
  "@cucumber/gherkin": "30",
75
- "@cucumber/messages": "27.0.0",
76
- "@xmldom/xmldom": "0.9.5",
79
+ "@cucumber/messages": "27.0.2",
80
+ "@xmldom/xmldom": "0.9.6",
77
81
  "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",
82
+ "arrify": "3.0.0",
83
+ "axios": "1.7.9",
87
84
  "chalk": "4.1.2",
85
+ "cheerio": "^1.0.0",
88
86
  "commander": "11.1.0",
89
- "cross-spawn": "7.0.5",
87
+ "cross-spawn": "7.0.6",
90
88
  "css-to-xpath": "0.1.0",
91
89
  "csstoxpath": "1.6.0",
92
90
  "envinfo": "7.14.0",
@@ -94,82 +92,83 @@
94
92
  "figures": "3.2.0",
95
93
  "fn-args": "4.0.0",
96
94
  "fs-extra": "11.2.0",
97
- "glob": "6.0.1",
95
+ "glob": "^11.0.0",
96
+ "fuse.js": "^7.0.0",
98
97
  "html-minifier-terser": "7.2.0",
99
- "invisi-data": "^1.0.0",
100
98
  "inquirer": "6.5.2",
99
+ "invisi-data": "^1.0.0",
101
100
  "joi": "17.13.3",
102
101
  "js-beautify": "1.15.1",
103
102
  "lodash.clonedeep": "4.5.0",
104
103
  "lodash.merge": "4.6.2",
105
- "mkdirp": "1.0.4",
106
- "mocha": "10.8.2",
107
- "monocart-coverage-reports": "2.11.3",
104
+ "mkdirp": "3.0.1",
105
+ "mocha": "11.1.0",
106
+ "monocart-coverage-reports": "2.11.5",
108
107
  "ms": "2.1.3",
109
108
  "ora-classic": "5.4.2",
110
109
  "parse-function": "5.6.10",
111
110
  "parse5": "7.2.1",
112
111
  "promise-retry": "1.1.1",
113
112
  "resq": "1.11.0",
114
- "sprintf-js": "1.1.1",
115
- "uuid": "11.0"
113
+ "sprintf-js": "1.1.3",
114
+ "uuid": "11.0.4"
116
115
  },
117
116
  "optionalDependencies": {
118
- "@codeceptjs/detox-helper": "1.1.2"
117
+ "@codeceptjs/detox-helper": "1.1.4"
119
118
  },
120
119
  "devDependencies": {
120
+ "@apollo/server": "^4",
121
+ "@codeceptjs/expect-helper": "^0.2.2",
121
122
  "@codeceptjs/mock-request": "0.3.1",
122
123
  "@eslint/eslintrc": "3.2.0",
123
- "@eslint/js": "9.16.0",
124
+ "@eslint/js": "9.17.0",
124
125
  "@faker-js/faker": "9.3.0",
125
126
  "@pollyjs/adapter-puppeteer": "6.0.6",
126
127
  "@pollyjs/core": "5.1.0",
127
128
  "@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",
129
+ "@types/inquirer": "9.0.7",
130
+ "@types/node": "22.10.5",
131
+ "@wdio/sauce-service": "9.5.1",
132
+ "@wdio/selenium-standalone-service": "8.15.0",
133
+ "@wdio/utils": "9.5.0",
134
+ "@xmldom/xmldom": "0.9.6",
135
+ "chai": "^4.0.0",
135
136
  "chai-as-promised": "7.1.2",
136
137
  "chai-subset": "1.6.0",
137
- "cheerio": "^1.0.0",
138
- "contributor-faces": "1.1.0",
139
138
  "documentation": "14.0.3",
140
139
  "electron": "33.2.1",
141
- "eslint": "9.16.0",
142
- "eslint-config-airbnb-base": "15.0.0",
140
+ "eslint": "^9.17.0",
143
141
  "eslint-plugin-import": "2.31.0",
144
142
  "eslint-plugin-mocha": "10.5.0",
145
143
  "expect": "29.7.0",
146
- "express": "4.21.1",
147
- "globals": "15.12.0",
148
- "graphql": "16.9.0",
144
+ "express": "4.21.2",
145
+ "globals": "15.14.0",
146
+ "graphql": "16.10.0",
147
+ "graphql-tag": "^2.12.6",
149
148
  "husky": "9.1.7",
150
149
  "inquirer-test": "2.0.1",
151
- "jsdoc": "4.0.4",
150
+ "jsdoc": "^3.6.11",
152
151
  "jsdoc-typeof-plugin": "1.0.0",
153
152
  "json-server": "0.17.4",
154
- "playwright": "1.49.0",
153
+ "playwright": "1.49.1",
155
154
  "prettier": "^3.3.2",
156
- "puppeteer": "23.8.0",
155
+ "puppeteer": "23.11.1",
157
156
  "qrcode-terminal": "0.12.0",
158
157
  "rosie": "2.1.1",
159
158
  "runok": "0.9.3",
160
159
  "semver": "7.6.3",
161
160
  "sinon": "19.0.2",
162
161
  "sinon-chai": "3.7.0",
163
- "testcafe": "3.7.0",
164
- "ts-morph": "24.0.0",
162
+ "testcafe": "3.7.1",
163
+ "ts-morph": "25.0.0",
165
164
  "ts-node": "10.9.2",
166
165
  "tsd": "^0.31.0",
167
166
  "tsd-jsdoc": "2.5.0",
168
- "typedoc": "0.26.11",
169
- "typedoc-plugin-markdown": "4.2.10",
167
+ "typedoc": "0.27.6",
168
+ "typedoc-plugin-markdown": "4.4.1",
170
169
  "typescript": "5.7.2",
171
170
  "wdio-docker-service": "1.5.0",
172
- "webdriverio": "8.40.6",
171
+ "webdriverio": "^9.5.1",
173
172
  "xml2js": "0.6.2",
174
173
  "xpath": "0.0.34"
175
174
  },