codeceptjs 3.5.15 → 3.6.0-beta.1.ai-healers

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 (139) hide show
  1. package/README.md +2 -2
  2. package/bin/codecept.js +66 -30
  3. package/docs/advanced.md +351 -0
  4. package/docs/ai.md +365 -0
  5. package/docs/api.md +323 -0
  6. package/docs/basics.md +979 -0
  7. package/docs/bdd.md +539 -0
  8. package/docs/best.md +237 -0
  9. package/docs/books.md +37 -0
  10. package/docs/bootstrap.md +135 -0
  11. package/docs/build/AI.js +124 -0
  12. package/docs/build/ApiDataFactory.js +410 -0
  13. package/docs/build/Appium.js +2027 -0
  14. package/docs/build/Expect.js +422 -0
  15. package/docs/build/FileSystem.js +228 -0
  16. package/docs/build/GraphQL.js +229 -0
  17. package/docs/build/GraphQLDataFactory.js +309 -0
  18. package/docs/build/JSONResponse.js +338 -0
  19. package/docs/build/Mochawesome.js +71 -0
  20. package/docs/build/Nightmare.js +2152 -0
  21. package/docs/build/Playwright.js +5110 -0
  22. package/docs/build/Protractor.js +2706 -0
  23. package/docs/build/Puppeteer.js +3905 -0
  24. package/docs/build/REST.js +344 -0
  25. package/docs/build/TestCafe.js +2125 -0
  26. package/docs/build/WebDriver.js +4240 -0
  27. package/docs/changelog.md +2572 -0
  28. package/docs/commands.md +266 -0
  29. package/docs/community-helpers.md +58 -0
  30. package/docs/configuration.md +157 -0
  31. package/docs/continuous-integration.md +22 -0
  32. package/docs/custom-helpers.md +306 -0
  33. package/docs/data.md +379 -0
  34. package/docs/detox.md +235 -0
  35. package/docs/docker.md +136 -0
  36. package/docs/email.md +183 -0
  37. package/docs/examples.md +149 -0
  38. package/docs/heal.md +186 -0
  39. package/docs/helpers/ApiDataFactory.md +266 -0
  40. package/docs/helpers/Appium.md +1374 -0
  41. package/docs/helpers/Detox.md +586 -0
  42. package/docs/helpers/Expect.md +275 -0
  43. package/docs/helpers/FileSystem.md +152 -0
  44. package/docs/helpers/GraphQL.md +151 -0
  45. package/docs/helpers/GraphQLDataFactory.md +226 -0
  46. package/docs/helpers/JSONResponse.md +254 -0
  47. package/docs/helpers/Mochawesome.md +8 -0
  48. package/docs/helpers/MockRequest.md +377 -0
  49. package/docs/helpers/Nightmare.md +1305 -0
  50. package/docs/helpers/OpenAI.md +70 -0
  51. package/docs/helpers/Playwright.md +2759 -0
  52. package/docs/helpers/Polly.md +44 -0
  53. package/docs/helpers/Protractor.md +1769 -0
  54. package/docs/helpers/Puppeteer-firefox.md +86 -0
  55. package/docs/helpers/Puppeteer.md +2317 -0
  56. package/docs/helpers/REST.md +218 -0
  57. package/docs/helpers/TestCafe.md +1321 -0
  58. package/docs/helpers/WebDriver.md +2547 -0
  59. package/docs/hooks.md +340 -0
  60. package/docs/index.md +111 -0
  61. package/docs/installation.md +75 -0
  62. package/docs/internal-api.md +266 -0
  63. package/docs/locators.md +339 -0
  64. package/docs/mobile-react-native-locators.md +67 -0
  65. package/docs/mobile.md +338 -0
  66. package/docs/pageobjects.md +291 -0
  67. package/docs/parallel.md +400 -0
  68. package/docs/playwright.md +632 -0
  69. package/docs/plugins.md +1247 -0
  70. package/docs/puppeteer.md +316 -0
  71. package/docs/quickstart.md +162 -0
  72. package/docs/react.md +70 -0
  73. package/docs/reports.md +392 -0
  74. package/docs/secrets.md +36 -0
  75. package/docs/shadow.md +68 -0
  76. package/docs/shared/keys.mustache +31 -0
  77. package/docs/shared/react.mustache +1 -0
  78. package/docs/testcafe.md +174 -0
  79. package/docs/translation.md +247 -0
  80. package/docs/tutorial.md +271 -0
  81. package/docs/typescript.md +180 -0
  82. package/docs/ui.md +59 -0
  83. package/docs/videos.md +28 -0
  84. package/docs/visual.md +202 -0
  85. package/docs/vue.md +143 -0
  86. package/docs/webdriver.md +701 -0
  87. package/docs/wiki/Books-&-Posts.md +27 -0
  88. package/docs/wiki/Community-Helpers-&-Plugins.md +53 -0
  89. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +61 -0
  90. package/docs/wiki/Examples.md +145 -0
  91. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +68 -0
  92. package/docs/wiki/Home.md +16 -0
  93. package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +83 -0
  94. package/docs/wiki/Release-Process.md +24 -0
  95. package/docs/wiki/Roadmap.md +23 -0
  96. package/docs/wiki/Tests.md +1393 -0
  97. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +153 -0
  98. package/docs/wiki/Videos.md +19 -0
  99. package/lib/actor.js +3 -6
  100. package/lib/ai.js +152 -80
  101. package/lib/cli.js +1 -0
  102. package/lib/command/dryRun.js +13 -44
  103. package/lib/command/generate.js +34 -0
  104. package/lib/command/run-workers.js +3 -0
  105. package/lib/command/run.js +3 -0
  106. package/lib/container.js +2 -0
  107. package/lib/heal.js +172 -0
  108. package/lib/helper/AI.js +124 -0
  109. package/lib/helper/Appium.js +12 -36
  110. package/lib/helper/Expect.js +8 -11
  111. package/lib/helper/JSONResponse.js +8 -8
  112. package/lib/helper/Playwright.js +240 -100
  113. package/lib/helper/Puppeteer.js +68 -182
  114. package/lib/helper/REST.js +1 -4
  115. package/lib/helper/WebDriver.js +10 -324
  116. package/lib/index.js +3 -0
  117. package/lib/listener/steps.js +0 -2
  118. package/lib/locator.js +4 -13
  119. package/lib/plugin/coverage.js +99 -112
  120. package/lib/plugin/heal.js +26 -117
  121. package/lib/recorder.js +11 -5
  122. package/lib/step.js +1 -3
  123. package/lib/store.js +2 -0
  124. package/lib/template/heal.js +39 -0
  125. package/package.json +35 -47
  126. package/typings/index.d.ts +0 -17
  127. package/typings/promiseBasedTypes.d.ts +57 -340
  128. package/typings/types.d.ts +73 -433
  129. package/docs/webapi/dontSeeTraffic.mustache +0 -13
  130. package/docs/webapi/flushNetworkTraffics.mustache +0 -5
  131. package/docs/webapi/grabRecordedNetworkTraffics.mustache +0 -10
  132. package/docs/webapi/seeTraffic.mustache +0 -36
  133. package/docs/webapi/startRecordingTraffic.mustache +0 -8
  134. package/docs/webapi/stopRecordingTraffic.mustache +0 -5
  135. package/docs/webapi/waitForCookie.mustache +0 -9
  136. package/lib/helper/MockServer.js +0 -221
  137. package/lib/helper/errors/ElementAssertion.js +0 -38
  138. package/lib/helper/networkTraffics/utils.js +0 -137
  139. /package/{lib/helper → docs/build}/OpenAI.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.5.15",
3
+ "version": "3.6.0-beta.1.ai-healers",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",
@@ -23,13 +23,13 @@
23
23
  },
24
24
  "files": [
25
25
  "bin",
26
+ "docs",
26
27
  "lib",
27
28
  "translations",
28
- "typings/**/*.d.ts",
29
- "docs/webapi/**"
29
+ "typings/**/*.d.ts"
30
30
  ],
31
31
  "main": "lib/index.js",
32
- "types": "typings/index.d.ts",
32
+ "typings": "typings/index.d.ts",
33
33
  "bin": {
34
34
  "codeceptjs": "./bin/codecept.js"
35
35
  },
@@ -56,60 +56,54 @@
56
56
  "test:unit:webbapi:webDriver:devtools": "mocha test/helper/WebDriver_devtools_test.js --exit",
57
57
  "test:unit:webbapi:testCafe": "mocha test/helper/TestCafe_test.js",
58
58
  "test:unit:expect": "mocha test/helper/Expect_test.js",
59
- "test:unit:mockServer": "mocha test/helper/MockServer_test.js",
60
59
  "test:plugin": "mocha test/plugin/plugin_test.js",
61
60
  "def": "./runok.js def",
62
61
  "dev:graphql": "node test/data/graphql/index.js",
63
62
  "publish:site": "./runok.js publish:site",
64
63
  "update-contributor-faces": "./runok.js contributor:faces",
65
- "types-fix": "node typings/fixDefFiles.js",
66
- "dtslint": "npm run types-fix && tsd",
64
+ "dtslint": "dtslint typings --localTs './node_modules/typescript/lib'",
67
65
  "prepare": "husky install",
68
66
  "prepare-release": "./runok.js versioning && ./runok.js get:commit-log"
69
67
  },
70
68
  "dependencies": {
71
- "@codeceptjs/configure": "1.0.1",
69
+ "@codeceptjs/configure": "0.10.0",
72
70
  "@codeceptjs/helper": "2.0.1",
73
71
  "@cucumber/cucumber-expressions": "17",
74
72
  "@cucumber/gherkin": "26",
75
73
  "@cucumber/messages": "24.0.1",
76
74
  "@xmldom/xmldom": "0.8.10",
77
- "acorn": "8.11.3",
75
+ "acorn": "8.11.2",
78
76
  "arrify": "2.0.1",
79
- "axios": "1.6.7",
80
- "chai": "5.1.0",
77
+ "axios": "1.6.3",
78
+ "chai": "4.3.8",
81
79
  "chai-deep-match": "1.2.1",
82
- "chai-exclude": "2.1.0",
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",
80
+ "chai-exclude": "^2.1.0",
81
+ "chai-json-schema": "^1.5.1",
82
+ "chai-json-schema-ajv": "^5.2.4",
83
+ "chai-match-pattern": "^1.3.0",
84
+ "chai-string": "^1.5.0",
87
85
  "chalk": "4.1.2",
88
86
  "commander": "11.1.0",
89
87
  "cross-spawn": "7.0.3",
90
- "css-to-xpath": "0.1.0",
91
88
  "csstoxpath": "1.6.0",
92
- "devtools": "8.33.1",
89
+ "devtools": "8.27.2",
93
90
  "envinfo": "7.11.0",
94
91
  "escape-string-regexp": "4.0.0",
95
92
  "figures": "3.2.0",
96
93
  "fn-args": "4.0.0",
97
94
  "fs-extra": "11.2.0",
98
95
  "glob": "6.0.1",
99
- "html-minifier-terser": "7.2.0",
96
+ "html-minifier-terser": "^7.2.0",
100
97
  "inquirer": "6.5.2",
101
- "joi": "17.12.2",
102
- "js-beautify": "1.15.1",
98
+ "joi": "17.11.0",
99
+ "js-beautify": "1.14.11",
103
100
  "lodash.clonedeep": "4.5.0",
104
101
  "lodash.merge": "4.6.2",
105
102
  "mkdirp": "1.0.4",
106
- "mocha": "10.3.0",
107
- "monocart-coverage-reports": "2.7.1",
103
+ "mocha": "10.2.0",
108
104
  "ms": "2.1.3",
109
- "openai": "3.2.1",
110
105
  "ora-classic": "5.4.2",
111
- "pactum": "3.6.1",
112
- "parse-function": "5.6.10",
106
+ "parse-function": "5.6.4",
113
107
  "parse5": "7.1.2",
114
108
  "promise-retry": "1.1.1",
115
109
  "resq": "1.11.0",
@@ -117,55 +111,55 @@
117
111
  "uuid": "9.0"
118
112
  },
119
113
  "optionalDependencies": {
120
- "@codeceptjs/detox-helper": "1.0.5"
114
+ "@codeceptjs/detox-helper": "1.0.2"
121
115
  },
122
116
  "devDependencies": {
123
117
  "@codeceptjs/mock-request": "0.3.1",
124
118
  "@faker-js/faker": "7.6.0",
125
119
  "@pollyjs/adapter-puppeteer": "6.0.6",
126
120
  "@pollyjs/core": "5.1.0",
127
- "@types/chai": "4.3.11",
121
+ "@types/chai": "^4.3.7",
128
122
  "@types/inquirer": "9.0.3",
129
- "@types/node": "20.11.16",
130
- "@wdio/sauce-service": "8.32.3",
123
+ "@types/node": "20.10.7",
124
+ "@wdio/sauce-service": "8.27.0",
131
125
  "@wdio/selenium-standalone-service": "8.3.2",
132
- "@wdio/utils": "8.28.8",
126
+ "@wdio/utils": "8.27.2",
133
127
  "@xmldom/xmldom": "0.8.10",
134
128
  "apollo-server-express": "2.25.3",
135
129
  "chai-as-promised": "7.1.1",
136
130
  "chai-subset": "1.6.0",
137
131
  "contributor-faces": "1.1.0",
138
132
  "documentation": "12.3.0",
139
- "electron": "28.2.1",
133
+ "dtslint": "4.2.1",
134
+ "electron": "28.0.0",
140
135
  "eslint": "8.56.0",
141
136
  "eslint-config-airbnb-base": "15.0.0",
142
137
  "eslint-plugin-import": "2.29.1",
143
138
  "eslint-plugin-mocha": "6.3.0",
144
139
  "expect": "29.7.0",
145
- "express": "4.18.3",
140
+ "express": "4.18.2",
146
141
  "graphql": "14.6.0",
147
142
  "husky": "8.0.3",
148
143
  "inquirer-test": "2.0.1",
149
144
  "jsdoc": "3.6.11",
150
145
  "jsdoc-typeof-plugin": "1.0.0",
151
146
  "json-server": "0.10.1",
152
- "playwright": "1.41.1",
153
- "puppeteer": "22.4.1",
147
+ "playwright": "1.40.1",
148
+ "puppeteer": "21.1.1",
154
149
  "qrcode-terminal": "0.12.0",
155
150
  "rosie": "2.1.1",
156
151
  "runok": "0.9.3",
157
152
  "sinon": "17.0.1",
158
153
  "sinon-chai": "3.7.0",
159
- "testcafe": "3.5.0",
154
+ "testcafe": "3.3.0",
160
155
  "ts-morph": "21.0.1",
161
156
  "ts-node": "10.9.2",
162
- "tsd": "^0.30.7",
163
157
  "tsd-jsdoc": "2.5.0",
164
- "typedoc": "0.25.12",
158
+ "typedoc": "0.25.7",
165
159
  "typedoc-plugin-markdown": "3.17.1",
166
160
  "typescript": "5.3.3",
167
161
  "wdio-docker-service": "1.5.0",
168
- "webdriverio": "8.33.1",
162
+ "webdriverio": "8.27.2",
169
163
  "xml2js": "0.6.2",
170
164
  "xpath": "0.0.34"
171
165
  },
@@ -173,11 +167,5 @@
173
167
  "node": ">=16.0",
174
168
  "npm": ">=5.6.0"
175
169
  },
176
- "es6": true,
177
- "tsd": {
178
- "directory": "typings",
179
- "compilerOptions": {
180
- "strict": false
181
- }
182
- }
183
- }
170
+ "es6": true
171
+ }
@@ -8,7 +8,6 @@
8
8
 
9
9
  declare namespace CodeceptJS {
10
10
  type WithTranslation<T> = T &
11
- // @ts-ignore
12
11
  import("./utils").Translate<T, Translation.Actions>;
13
12
 
14
13
  type Cookie = {
@@ -383,22 +382,6 @@ declare namespace CodeceptJS {
383
382
  [key: string]: any;
384
383
  };
385
384
 
386
- type MockRequest = {
387
- method: 'GET'|'PUT'|'POST'|'PATCH'|'DELETE'|string;
388
- path: string;
389
- queryParams?: object;
390
- }
391
-
392
- type MockResponse = {
393
- status: number;
394
- body?: object;
395
- }
396
-
397
- type MockInteraction = {
398
- request: MockRequest;
399
- response: MockResponse;
400
- }
401
-
402
385
  interface PageScrollPosition {
403
386
  x: number;
404
387
  y: number;