codeceptjs 3.5.0 → 3.5.1-2.beta.7

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 (273) hide show
  1. package/README.md +24 -25
  2. package/lib/actor.js +6 -3
  3. package/lib/ai.js +12 -3
  4. package/lib/cli.js +12 -2
  5. package/lib/codecept.js +4 -0
  6. package/lib/colorUtils.js +10 -0
  7. package/lib/command/definitions.js +2 -7
  8. package/lib/command/dryRun.js +2 -1
  9. package/lib/command/info.js +24 -0
  10. package/lib/command/init.js +51 -5
  11. package/lib/command/run-multiple/collection.js +17 -5
  12. package/lib/command/run-multiple.js +4 -2
  13. package/lib/command/run-workers.js +66 -4
  14. package/lib/command/run.js +7 -0
  15. package/lib/command/workers/runTests.js +39 -0
  16. package/lib/data/context.js +14 -6
  17. package/lib/event.js +4 -0
  18. package/lib/helper/ApiDataFactory.js +2 -1
  19. package/lib/helper/Appium.js +73 -24
  20. package/lib/helper/Expect.js +422 -0
  21. package/lib/helper/FileSystem.js +1 -1
  22. package/lib/helper/GraphQL.js +25 -0
  23. package/lib/helper/Nightmare.js +9 -4
  24. package/lib/helper/OpenAI.js +14 -10
  25. package/lib/helper/Playwright.js +1205 -288
  26. package/lib/helper/Protractor.js +11 -6
  27. package/lib/helper/Puppeteer.js +173 -61
  28. package/lib/helper/TestCafe.js +44 -9
  29. package/lib/helper/WebDriver.js +231 -82
  30. package/lib/helper/errors/ElementNotFound.js +2 -1
  31. package/lib/helper/extras/PlaywrightReactVueLocator.js +38 -0
  32. package/lib/helper/scripts/blurElement.js +17 -0
  33. package/lib/helper/scripts/focusElement.js +17 -0
  34. package/lib/helper/scripts/highlightElement.js +2 -2
  35. package/lib/html.js +3 -3
  36. package/lib/interfaces/bdd.js +1 -1
  37. package/lib/interfaces/gherkin.js +37 -3
  38. package/lib/interfaces/scenarioConfig.js +1 -0
  39. package/lib/locator.js +17 -4
  40. package/lib/mochaFactory.js +2 -1
  41. package/lib/output.js +1 -1
  42. package/lib/pause.js +12 -9
  43. package/lib/plugin/autoLogin.js +45 -10
  44. package/lib/plugin/heal.js +47 -17
  45. package/lib/plugin/retryFailedStep.js +10 -1
  46. package/lib/plugin/retryTo.js +2 -4
  47. package/lib/plugin/selenoid.js +6 -1
  48. package/lib/plugin/standardActingHelpers.js +0 -2
  49. package/lib/plugin/stepByStepReport.js +2 -2
  50. package/lib/plugin/tryTo.js +5 -7
  51. package/lib/plugin/wdio.js +0 -1
  52. package/lib/recorder.js +20 -9
  53. package/lib/session.js +1 -1
  54. package/lib/step.js +30 -11
  55. package/lib/ui.js +1 -0
  56. package/lib/utils.js +18 -1
  57. package/lib/workers.js +28 -3
  58. package/package.json +108 -98
  59. package/translations/de-DE.js +5 -0
  60. package/translations/fr-FR.js +14 -1
  61. package/translations/it-IT.js +1 -0
  62. package/translations/ja-JP.js +5 -0
  63. package/translations/pl-PL.js +5 -0
  64. package/translations/pt-BR.js +1 -0
  65. package/translations/ru-RU.js +1 -0
  66. package/translations/zh-CN.js +5 -0
  67. package/translations/zh-TW.js +5 -0
  68. package/typings/index.d.ts +8 -6
  69. package/typings/promiseBasedTypes.d.ts +784 -822
  70. package/typings/types.d.ts +1214 -727
  71. package/CHANGELOG.md +0 -2492
  72. package/docs/advanced.md +0 -351
  73. package/docs/ai.md +0 -246
  74. package/docs/api.md +0 -323
  75. package/docs/basics.md +0 -980
  76. package/docs/bdd.md +0 -535
  77. package/docs/best.md +0 -237
  78. package/docs/books.md +0 -37
  79. package/docs/bootstrap.md +0 -135
  80. package/docs/build/ApiDataFactory.js +0 -409
  81. package/docs/build/Appium.js +0 -1978
  82. package/docs/build/FileSystem.js +0 -228
  83. package/docs/build/GraphQL.js +0 -204
  84. package/docs/build/GraphQLDataFactory.js +0 -309
  85. package/docs/build/JSONResponse.js +0 -338
  86. package/docs/build/Mochawesome.js +0 -71
  87. package/docs/build/Nightmare.js +0 -2147
  88. package/docs/build/OpenAI.js +0 -122
  89. package/docs/build/Playwright.js +0 -4134
  90. package/docs/build/Polly.js +0 -42
  91. package/docs/build/Protractor.js +0 -2701
  92. package/docs/build/Puppeteer.js +0 -3743
  93. package/docs/build/REST.js +0 -344
  94. package/docs/build/SeleniumWebdriver.js +0 -76
  95. package/docs/build/TestCafe.js +0 -2059
  96. package/docs/build/WebDriver.js +0 -4042
  97. package/docs/changelog.md +0 -2501
  98. package/docs/commands.md +0 -254
  99. package/docs/community-helpers.md +0 -58
  100. package/docs/configuration.md +0 -157
  101. package/docs/continuous-integration.md +0 -22
  102. package/docs/custom-helpers.md +0 -306
  103. package/docs/data.md +0 -375
  104. package/docs/detox.md +0 -235
  105. package/docs/docker.md +0 -137
  106. package/docs/email.md +0 -183
  107. package/docs/examples.md +0 -149
  108. package/docs/helpers/ApiDataFactory.md +0 -266
  109. package/docs/helpers/Appium.md +0 -1317
  110. package/docs/helpers/Detox.md +0 -586
  111. package/docs/helpers/FileSystem.md +0 -152
  112. package/docs/helpers/GraphQL.md +0 -130
  113. package/docs/helpers/GraphQLDataFactory.md +0 -226
  114. package/docs/helpers/JSONResponse.md +0 -254
  115. package/docs/helpers/Mochawesome.md +0 -8
  116. package/docs/helpers/MockRequest.md +0 -377
  117. package/docs/helpers/Nightmare.md +0 -1258
  118. package/docs/helpers/OpenAI.md +0 -70
  119. package/docs/helpers/Playwright.md +0 -2250
  120. package/docs/helpers/Polly.md +0 -44
  121. package/docs/helpers/Puppeteer-firefox.md +0 -86
  122. package/docs/helpers/Puppeteer.md +0 -2147
  123. package/docs/helpers/REST.md +0 -218
  124. package/docs/helpers/TestCafe.md +0 -1224
  125. package/docs/helpers/WebDriver.md +0 -2325
  126. package/docs/hooks.md +0 -340
  127. package/docs/index.md +0 -111
  128. package/docs/installation.md +0 -75
  129. package/docs/internal-api.md +0 -265
  130. package/docs/locators.md +0 -331
  131. package/docs/mobile-react-native-locators.md +0 -67
  132. package/docs/mobile.md +0 -344
  133. package/docs/nightmare.md +0 -223
  134. package/docs/pageobjects.md +0 -291
  135. package/docs/parallel.md +0 -288
  136. package/docs/playwright.md +0 -609
  137. package/docs/plugins.md +0 -1225
  138. package/docs/puppeteer.md +0 -316
  139. package/docs/quickstart.md +0 -163
  140. package/docs/react.md +0 -69
  141. package/docs/reports.md +0 -392
  142. package/docs/secrets.md +0 -36
  143. package/docs/shadow.md +0 -68
  144. package/docs/shared/keys.mustache +0 -31
  145. package/docs/shared/react.mustache +0 -1
  146. package/docs/testcafe.md +0 -174
  147. package/docs/translation.md +0 -247
  148. package/docs/tutorial.md +0 -271
  149. package/docs/typescript.md +0 -180
  150. package/docs/ui.md +0 -59
  151. package/docs/videos.md +0 -28
  152. package/docs/visual.md +0 -202
  153. package/docs/vue.md +0 -121
  154. package/docs/webapi/amOnPage.mustache +0 -11
  155. package/docs/webapi/appendField.mustache +0 -11
  156. package/docs/webapi/attachFile.mustache +0 -12
  157. package/docs/webapi/checkOption.mustache +0 -13
  158. package/docs/webapi/clearCookie.mustache +0 -10
  159. package/docs/webapi/clearField.mustache +0 -9
  160. package/docs/webapi/click.mustache +0 -25
  161. package/docs/webapi/clickLink.mustache +0 -8
  162. package/docs/webapi/closeCurrentTab.mustache +0 -7
  163. package/docs/webapi/closeOtherTabs.mustache +0 -8
  164. package/docs/webapi/dontSee.mustache +0 -11
  165. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +0 -10
  166. package/docs/webapi/dontSeeCookie.mustache +0 -8
  167. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +0 -10
  168. package/docs/webapi/dontSeeElement.mustache +0 -8
  169. package/docs/webapi/dontSeeElementInDOM.mustache +0 -8
  170. package/docs/webapi/dontSeeInCurrentUrl.mustache +0 -4
  171. package/docs/webapi/dontSeeInField.mustache +0 -11
  172. package/docs/webapi/dontSeeInSource.mustache +0 -8
  173. package/docs/webapi/dontSeeInTitle.mustache +0 -8
  174. package/docs/webapi/doubleClick.mustache +0 -13
  175. package/docs/webapi/downloadFile.mustache +0 -12
  176. package/docs/webapi/dragAndDrop.mustache +0 -9
  177. package/docs/webapi/dragSlider.mustache +0 -11
  178. package/docs/webapi/executeAsyncScript.mustache +0 -24
  179. package/docs/webapi/executeScript.mustache +0 -26
  180. package/docs/webapi/fillField.mustache +0 -16
  181. package/docs/webapi/forceClick.mustache +0 -28
  182. package/docs/webapi/forceRightClick.mustache +0 -18
  183. package/docs/webapi/grabAllWindowHandles.mustache +0 -7
  184. package/docs/webapi/grabAttributeFrom.mustache +0 -10
  185. package/docs/webapi/grabAttributeFromAll.mustache +0 -9
  186. package/docs/webapi/grabBrowserLogs.mustache +0 -9
  187. package/docs/webapi/grabCookie.mustache +0 -11
  188. package/docs/webapi/grabCssPropertyFrom.mustache +0 -11
  189. package/docs/webapi/grabCssPropertyFromAll.mustache +0 -10
  190. package/docs/webapi/grabCurrentUrl.mustache +0 -9
  191. package/docs/webapi/grabCurrentWindowHandle.mustache +0 -6
  192. package/docs/webapi/grabDataFromPerformanceTiming.mustache +0 -20
  193. package/docs/webapi/grabElementBoundingRect.mustache +0 -20
  194. package/docs/webapi/grabGeoLocation.mustache +0 -8
  195. package/docs/webapi/grabHTMLFrom.mustache +0 -10
  196. package/docs/webapi/grabHTMLFromAll.mustache +0 -9
  197. package/docs/webapi/grabNumberOfOpenTabs.mustache +0 -8
  198. package/docs/webapi/grabNumberOfVisibleElements.mustache +0 -9
  199. package/docs/webapi/grabPageScrollPosition.mustache +0 -8
  200. package/docs/webapi/grabPopupText.mustache +0 -5
  201. package/docs/webapi/grabSource.mustache +0 -8
  202. package/docs/webapi/grabTextFrom.mustache +0 -10
  203. package/docs/webapi/grabTextFromAll.mustache +0 -9
  204. package/docs/webapi/grabTitle.mustache +0 -8
  205. package/docs/webapi/grabValueFrom.mustache +0 -9
  206. package/docs/webapi/grabValueFromAll.mustache +0 -8
  207. package/docs/webapi/moveCursorTo.mustache +0 -12
  208. package/docs/webapi/openNewTab.mustache +0 -7
  209. package/docs/webapi/pressKey.mustache +0 -12
  210. package/docs/webapi/pressKeyDown.mustache +0 -12
  211. package/docs/webapi/pressKeyUp.mustache +0 -12
  212. package/docs/webapi/pressKeyWithKeyNormalization.mustache +0 -60
  213. package/docs/webapi/refreshPage.mustache +0 -6
  214. package/docs/webapi/resizeWindow.mustache +0 -6
  215. package/docs/webapi/rightClick.mustache +0 -14
  216. package/docs/webapi/saveElementScreenshot.mustache +0 -10
  217. package/docs/webapi/saveScreenshot.mustache +0 -12
  218. package/docs/webapi/say.mustache +0 -10
  219. package/docs/webapi/scrollIntoView.mustache +0 -11
  220. package/docs/webapi/scrollPageToBottom.mustache +0 -6
  221. package/docs/webapi/scrollPageToTop.mustache +0 -6
  222. package/docs/webapi/scrollTo.mustache +0 -12
  223. package/docs/webapi/see.mustache +0 -11
  224. package/docs/webapi/seeAttributesOnElements.mustache +0 -9
  225. package/docs/webapi/seeCheckboxIsChecked.mustache +0 -10
  226. package/docs/webapi/seeCookie.mustache +0 -8
  227. package/docs/webapi/seeCssPropertiesOnElements.mustache +0 -9
  228. package/docs/webapi/seeCurrentUrlEquals.mustache +0 -11
  229. package/docs/webapi/seeElement.mustache +0 -8
  230. package/docs/webapi/seeElementInDOM.mustache +0 -8
  231. package/docs/webapi/seeInCurrentUrl.mustache +0 -8
  232. package/docs/webapi/seeInField.mustache +0 -12
  233. package/docs/webapi/seeInPopup.mustache +0 -8
  234. package/docs/webapi/seeInSource.mustache +0 -7
  235. package/docs/webapi/seeInTitle.mustache +0 -8
  236. package/docs/webapi/seeNumberOfElements.mustache +0 -11
  237. package/docs/webapi/seeNumberOfVisibleElements.mustache +0 -10
  238. package/docs/webapi/seeTextEquals.mustache +0 -9
  239. package/docs/webapi/seeTitleEquals.mustache +0 -8
  240. package/docs/webapi/selectOption.mustache +0 -21
  241. package/docs/webapi/setCookie.mustache +0 -16
  242. package/docs/webapi/setGeoLocation.mustache +0 -12
  243. package/docs/webapi/switchTo.mustache +0 -9
  244. package/docs/webapi/switchToNextTab.mustache +0 -10
  245. package/docs/webapi/switchToPreviousTab.mustache +0 -10
  246. package/docs/webapi/type.mustache +0 -21
  247. package/docs/webapi/uncheckOption.mustache +0 -13
  248. package/docs/webapi/wait.mustache +0 -8
  249. package/docs/webapi/waitForClickable.mustache +0 -11
  250. package/docs/webapi/waitForDetached.mustache +0 -10
  251. package/docs/webapi/waitForElement.mustache +0 -11
  252. package/docs/webapi/waitForEnabled.mustache +0 -6
  253. package/docs/webapi/waitForFunction.mustache +0 -17
  254. package/docs/webapi/waitForInvisible.mustache +0 -10
  255. package/docs/webapi/waitForText.mustache +0 -13
  256. package/docs/webapi/waitForValue.mustache +0 -10
  257. package/docs/webapi/waitForVisible.mustache +0 -10
  258. package/docs/webapi/waitInUrl.mustache +0 -9
  259. package/docs/webapi/waitNumberOfVisibleElements.mustache +0 -10
  260. package/docs/webapi/waitToHide.mustache +0 -10
  261. package/docs/webapi/waitUrlEquals.mustache +0 -10
  262. package/docs/webdriver.md +0 -657
  263. package/docs/wiki/Books-&-Posts.md +0 -27
  264. package/docs/wiki/Community-Helpers-&-Plugins.md +0 -49
  265. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +0 -29
  266. package/docs/wiki/Examples.md +0 -139
  267. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +0 -68
  268. package/docs/wiki/Home.md +0 -16
  269. package/docs/wiki/Release-Process.md +0 -24
  270. package/docs/wiki/Roadmap.md +0 -23
  271. package/docs/wiki/Tests.md +0 -1393
  272. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +0 -153
  273. package/docs/wiki/Videos.md +0 -19
package/CHANGELOG.md DELETED
@@ -1,2492 +0,0 @@
1
- ## 3.5.0
2
-
3
- 🛩️ Features
4
-
5
- - **🪄 [AI Powered Test Automation](/ai)** - use OpenAI as a copilot for test automation. #3713 By @davertmik
6
- ![](https://user-images.githubusercontent.com/220264/250418764-c382709a-3ccb-4eb5-b6bc-538f3b3b3d35.png)
7
- * [AI guide](/ai) added
8
- * added support for OpenAI in `pause()`
9
- * added [`heal` plugin](/plugins#heal) for self-healing tests
10
- * added [`OpenAI`](/helpers/openai) helper
11
-
12
-
13
- - [Playwright][Puppeteer][WebDriver] Highlight the interacting elements in debug mode or with `highlightElement` option set (#3672) - by @KobeNguyenT
14
-
15
- ![](https://user-images.githubusercontent.com/220264/250415226-a7620418-56a4-4837-b790-b15e91e5d1f0.png)
16
-
17
- - [Playwright] Support for APIs in Playwright (#3665) - by Egor Bodnar
18
- * `clearField` replaced to use new Playwright API
19
- * `blur` added
20
- * `focus` added
21
-
22
- - **[Added support for multiple browsers](/parallel#Parallel-Execution-by-Workers-on-Multiple-Browsers)** in `run-workers` (#3606) by @karanshah-browserstack :
23
-
24
- Multiple browsers configured as profiles:
25
-
26
- ```js
27
- exports.config = {
28
- helpers: {
29
- WebDriver: {
30
- url: 'http://localhost:3000',
31
- }
32
- },
33
- multiple: {
34
- profile1: {
35
- browsers: [
36
- {
37
- browser: "firefox",
38
- },
39
- {
40
- browser: "chrome",
41
- }
42
- ]
43
- },
44
- ```
45
- And executed via `run-workers` with `all` argument
46
-
47
- ```
48
- npx codeceptjs run-workers 2 all
49
- ```
50
-
51
- - [Appium] Add Appium v2 support (#3622) - by @KobeNguyenT
52
- - Improve `gpo` command to create page objects as modules or as classes (#3625) - by @KobeNguyenT
53
- - Added `emptyOutputFolder` config to clean up output before running tests (#3604) - by @KobeNguyenT
54
- - Add `secret()` function support to `append()` and `type()` (#3615) - by @anils92
55
- - [Playwright] Add `bypassCSP` option to helper's config (#3641) - by @KobeNguyenT
56
- - Print number of tests for each suite in dryRun (#3620) - by @KobeNguyenT
57
-
58
- 🐛 Bug Fixes
59
-
60
- - Support `--grep` in dry-run command (#3673) - by @KobeNguyenT
61
- - Fix typings improvements in playwright (#3650) - by @KobeNguyenT
62
- - Fixed global retry #3667 by @KobeNguyenT
63
- - Fixed creating JavaScript test using "codeceptjs gt" (#3611) - by Jaromir Obr
64
-
65
-
66
- ## 3.4.1
67
-
68
- * Updated mocha to v 10.2. Fixes #3591
69
- * Fixes executing a faling Before hook. Resolves #3592
70
-
71
- ## 3.4.0
72
-
73
- * **Updated to latest mocha and modern Cucumber**
74
- * **Allure plugin moved to [@codeceptjs/allure-legacy](https://github.com/codeceptjs/allure-legacy) package**. This happened because allure-commons package v1 was not updated and caused vulnarabilities. Fixes #3422. We don't plan to maintain allure v2 plugin so it's up to community to take this initiative. Current allure plugin will print a warning message without interfering the run, so it won't accidentally fail your builds.
75
- * Added ability to **[retry Before](https://codecept.io/basics/#retry-before), BeforeSuite, After, AfterSuite** hooks by @davertmik:
76
- ```js
77
- Feature('flaky Before & BeforeSuite', { retryBefore: 2, retryBeforeSuite: 3 })
78
- ```
79
-
80
- * **Flexible [retries configuration](https://codecept.io/basics/#retry-configuration) introduced** by @davertmik:
81
-
82
- ```js
83
- retry: [
84
- {
85
- // enable this config only for flaky tests
86
- grep: '@flaky',
87
- Before: 3 // retry Before 3 times
88
- Scenario: 3 // retry Scenario 3 times
89
- },
90
- {
91
- // retry less when running slow tests
92
- grep: '@slow'
93
- Scenario: 1
94
- Before: 1
95
- }, {
96
- // retry all BeforeSuite 3 times
97
- BeforeSuite: 3
98
- }
99
- ]
100
- ```
101
- * **Flexible [timeout configuration](https://codecept.io/advanced/#timeout-configuration)** introduced by @davertmik:
102
-
103
- ```js
104
- timeout: [
105
- 10, // default timeout is 10secs
106
- { // but increase timeout for slow tests
107
- grep: '@slow',
108
- Feature: 50
109
- },
110
- ]
111
- ```
112
-
113
- * JsDoc: Removed promise from `I.say`. See #3535 by @danielrentz
114
- * [Playwright] `handleDownloads` requires now a filename param. See #3511 by @PeterNgTr
115
- * [WebDriver] Added support for v8, removed support for webdriverio v5 and lower. See #3578 by @PeterNgTr
116
-
117
-
118
- ## 3.3.7
119
-
120
- 🛩️ Features
121
-
122
- * **Promise-based typings** for TypeScript definitions in #3465 by @nlespiaucq. If you use TypeScript or use linters [check how it may be useful to you](https://bit.ly/3XIMq6n).
123
- * **Translation** improved to use [custom vocabulary](https://codecept.io/translation/).
124
- * [Playwright] Added methods in #3398 by @mirao
125
- * `restartBrowser` - to restart a browser (with different config)
126
- * `_createContextPage` - to create a new browser context with a page from a helper
127
- * Added [Cucumber custom types](/bdd#custom-types) for BDD in #3435 by @Likstern
128
- * Propose using JSONResponse helper when initializing project for API testing. #3455 by @PeterNgTr
129
- * When translation enabled, generate tests using localized aliases. By @davertmik
130
- * [Appium] Added `checkIfAppIsInstalled` in #3507 by @PeterNgTr
131
-
132
- 🐛 Bugfixes
133
-
134
- * Fixed #3462 `TypeError: Cannot read properties of undefined (reading 'setStatus')` by @dwentland24 in #3438
135
- * Fixed creating steps file for TypeScript setup #3459 by @PeterNgTr
136
- * Fixed issue of after all event in `run-rerun` command after complete execution #3464 by @jain-neeeraj
137
- * [Playwright][WebDriver][Appium] Do not change `waitForTimeout` value on validation. See #3478 by @pmajewski24. Fixes #2589
138
- * [Playwright][WebDriver][Protractor][Puppeteer][TestCafe] Fixes `Element "{null: undefined}" was not found` and `element ([object Object]) still not present` messages when using object locators. See #3501 and #3502 by @pmajewski24
139
- * [Playwright] Improved file names when downloading file in #3449 by @PeterNgTr. Fixes #3412 and #3409
140
- * Add default value to `profile` env variable. See #3443 by @dwentland24. Resolves #3339
141
- * [Playwright] Using system-native path separator when saving artifacts in #3460 by @PeterNgTr
142
- * [Playwright] Saving videos and traces from multiple sessions in #3505 by @davertmik
143
- * [Playwright] Fixed `amOnPage` to navigate to `about:blank` by @zaxoavoki in #3470 Fixes #2311
144
- * Various typing improvements by @AWolf81 @PeterNgTr @mirao
145
-
146
- 📖 Documentation
147
-
148
- * Updated [Quickstart](https://codecept.io/quickstart/) with detailed explanation of questions in init
149
- * Added [Translation](/translation/) guide
150
- * Updated [TypeScript](https://bit.ly/3XIMq6n) guide for promise-based typings
151
- * Reordered guides list on a website
152
-
153
- ## 3.3.6
154
-
155
- * [`run-rerun`](https://codecept.io/commands/#run-rerun) command was re-introduced by @dwentland24 in #3436. Use it to perform run multiple times and detect flaky tests
156
- * Enabled `retryFailedStep` by default in `@codeceptjs/configure` v 0.10. See https://github.com/codeceptjs/configure/pull/26
157
- * [Playwright] Fixed properties types "waitForNavigation" and "firefox" by @mirao in #3401
158
- * [REST] Changed "endpoint" to optional by @mirao in #3404
159
- * [REST] Use [`secret`](/secrets) for form encoded string by @PeterNgTr:
160
-
161
- ```js
162
- const secretData = secret('name=john&password=123456');
163
- const response = await I.sendPostRequest('/user', secretData);
164
- ```
165
-
166
- * [Playwright]Fixed docs related to fixed properties types "waitForNavigation" and "firefox" by @mirao in #3407
167
- * [Playwright]Fixed parameters of startActivity() by @mirao in #3408
168
- * Move semver to prod dependencies by @timja in #3413
169
- * check if browser is W3C instead of Android by @mikk150 in #3414
170
- * Pass service configs with options and caps as array for browsers… by @07souravkunda in #3418
171
- * fix for type of "webdriver.port" by @ngraf in #3421
172
- * fix for type of "webdriver.smartWait" by @pmajewski24 in #3426
173
- * fix(datatable): mask secret text by @PeterNgTr in #3432
174
- * fix(playwright) - video name and missing type by @PeterNgTr in #3430
175
- * fix for expected type of "bootstrap", "teardown", "bootstrapAll" and "teardownAll" by @ngraf in #3424
176
- * Improve generate pageobject `gpo` command to work with TypeScript by @PeterNgTr in #3411
177
- * Fixed dry-run to always return 0 code and exit
178
- * Added minimal version notice for NodeJS >= 12
179
- * fix(utils): remove . of test title to avoid confusion by @PeterNgTr in #3431
180
-
181
- ## 3.3.5
182
-
183
- 🛩️ Features
184
-
185
- * Added **TypeScript types for CodeceptJS config**.
186
-
187
- Update `codecept.conf.js` to get intellisense when writing config file:
188
-
189
- ```js
190
- /**@type {CodeceptJS.MainConfig}**/
191
- exports.config = {
192
- //...
193
- }
194
- ```
195
- * Added TS types for helpers config:
196
- * Playwright
197
- * Puppeteer
198
- * WebDriver
199
- * REST
200
- * Added **[TypeScript option](/typescript)** for installation via `codeceptjs init` to initialize new projects in TS (by @PeterNgTr and @davertmik)
201
- * Includes `node-ts` automatically when using TypeScript setup.
202
-
203
-
204
- 🐛 Bugfixes
205
-
206
- * [Puppeteer] Fixed support for Puppeteer > 14.4 by @PeterNgTr
207
- * Don't report files as existing when non-directory is in path by @jonathanperret. See #3374
208
- * Fixed TS type for `secret` function by @PeterNgTr
209
- * Fixed wrong order for async MetaSteps by @dwentland24. See #3393
210
- * Fixed same param substitution in BDD step. See #3385 by @snehabhandge
211
-
212
- 📖 Documentation
213
-
214
- * Updated [configuration options](https://codecept.io/configuration/) to match TypeScript types
215
- * Updated [TypeScript documentation](https://codecept.io/typescript/) on simplifying TS installation
216
- * Added codecept-tesults plugin documentation by @ajeetd
217
-
218
-
219
-
220
- ## 3.3.4
221
-
222
- * Added support for masking fields in objects via `secret` function:
223
-
224
- ```js
225
- I.sendPostRequest('/auth', secret({ name: 'jon', password: '123456' }, 'password'));
226
- ```
227
- * Added [a guide about using of `secret`](/secrets) function
228
- * [Appium] Use `touchClick` when interacting with elements in iOS. See #3317 by @mikk150
229
- * [Playwright] Added `cdpConnection` option to connect over CDP. See #3309 by @Hmihaly
230
- * [customLocator plugin] Allowed to specify multiple attributes for custom locator. Thanks to @aruiz-caritsqa
231
-
232
- ```js
233
- plugins: {
234
- customLocator: {
235
- enabled: true,
236
- prefix: '$',
237
- attribute: ['data-qa', 'data-test'],
238
- }
239
- }
240
- ```
241
- * [retryTo plugin] Fixed #3147 using `pollInterval` option. See #3351 by @cyonkee
242
- * [Playwright] Fixed grabbing of browser console messages and window resize in new tab. Thanks to @mirao
243
- * [REST] Added `prettyPrintJson` option to print JSON in nice way by @PeterNgTr
244
- * [JSONResponse] Updated response validation to iterate over array items if response is array. Thanks to @PeterNgTr
245
-
246
- ```js
247
- // response.data == [
248
- // { user: { name: 'jon', email: 'jon@doe.com' } },
249
- // { user: { name: 'matt', email: 'matt@doe.com' } },
250
- //]
251
-
252
- I.seeResponseContainsKeys(['user']);
253
- I.seeResponseContainsJson({ user: { email: 'jon@doe.com' } });
254
- I.seeResponseContainsJson({ user: { email: 'matt@doe.com' } });
255
- I.dontSeeResponseContainsJson({ user: 2 });
256
- ```
257
-
258
- ## 3.3.3
259
-
260
- * Fixed `DataCloneError: () => could not be cloned` when running data tests in run-workers
261
- * 🇺🇦 Added #StandWithUkraine notice to CLI
262
-
263
-
264
- ## 3.3.2
265
-
266
- * [REST] Fixed override of headers/token in `haveRequestHeaders()` and `amBearerAuthenticated()`. See #3304 by @mirao
267
- * Reverted typings change introduced in #3245. [More details on this](https://twitter.com/CodeceptJS/status/1519725963856207873)
268
-
269
- ## 3.3.1
270
-
271
- 🛩️ Features:
272
-
273
- * Add option to avoid duplicate gherkin step definitions (#3257) - @raywiis
274
- * Added `step.*` for run-workers #3272. Thanks to @abhimanyupandian
275
- * Fixed loading tests for `codecept run` using glob patterns. By @jayudey-wf
276
-
277
- ```
278
- npx codeceptjs run test-dir/*"
279
- ```
280
-
281
- * [Playwright] **Possible breaking change.** By default `timeout` is changed to 5000ms. The value set in 3.3.0 was too low. Please set `timeout` explicitly to not depend on release values.
282
- * [Playwright] Added for color scheme option by @PeterNgTr
283
-
284
- ```js
285
- helpers: {
286
- Playwright : {
287
- url: "http://localhost",
288
- colorScheme: "dark",
289
- }
290
- }
291
- ```
292
-
293
-
294
- 🐛 Bugfixes:
295
-
296
- * [Playwright] Fixed `Cannot read property 'video' of undefined`
297
- * Fixed haveRequestHeaders() and amBearerAuthenticated() of REST helper (#3260) - @mirao
298
- * Fixed: allure attachment fails if screenshot failed #3298 by @ruudvanderweijde
299
- * Fixed #3105 using autoLogin() plugin with TypeScript. Fix #3290 by @PeterNgTr
300
- * [Playwright] Added extra params for click and dragAndDrop to type definitions by @mirao
301
-
302
-
303
- 📖 Documentation
304
- * Improving the typings in many places
305
- * Improving the return type of helpers for TS users (#3245) - @nlespiaucq
306
-
307
- ## 3.3.0
308
-
309
- 🛩️ Features:
310
-
311
- * [**API Testing introduced**](/api)
312
- * Introduced [`JSONResponse`](/helpers/JSONResponse) helper which connects to REST, GraphQL or Playwright helper
313
- * [REST] Added `amBearerAuthenticated` method
314
- * [REST] Added `haveRequestHeaders` method
315
- * Added dependency on `joi` and `chai`
316
- * [Playwright] Added `timeout` option to set [timeout](https://playwright.dev/docs/api/class-page#page-set-default-timeout) for all Playwright actions. If an action fails, Playwright keeps retrying it for a time set by timeout.
317
- * [Playwright] **Possible breaking change.** By default `timeout` is set to 1000ms. *Previous default was set by Playwright internally to 30s. This was causing contradiction to CodeceptJS retries, so triggered up to 3 retries for 30s of time. This timeout option was lowered so retryFailedStep plugin would not cause long delays.*
318
- * [Playwright] Updated `restart` config option to include 3 restart strategies:
319
- * 'context' or **false** - restarts [browser context](https://playwright.dev/docs/api/class-browsercontext) but keeps running browser. Recommended by Playwright team to keep tests isolated.
320
- * 'browser' or **true** - closes browser and opens it again between tests.
321
- * 'session' or 'keep' - keeps browser context and session, but cleans up cookies and localStorage between tests. The fastest option when running tests in windowed mode. Works with `keepCookies` and `keepBrowserState` options. This behavior was default prior CodeceptJS 3.1
322
- * [Playwright] Extended methods to provide more options from engine. These methods were updated so additional options can be be passed as the last argument:
323
- * [`click`](/helpers/Playwright#click)
324
- * [`dragAndDrop`](/helpers/Playwright#dragAndDrop)
325
- * [`checkOption`](/helpers/Playwright#checkOption)
326
- * [`uncheckOption`](/helpers/Playwright#uncheckOption)
327
-
328
- ```js
329
- // use Playwright click options as 3rd argument
330
- I.click('canvas', '.model', { position: { x: 20, y: 40 } })
331
- // check option also has options
332
- I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
333
- ```
334
-
335
- * `eachElement` plugin introduced. It allows you to iterate over elements and perform some action on them using direct engines API
336
-
337
- ```js
338
- await eachElement('click all links in .list', '.list a', (el) => {
339
- await el.click();
340
- })
341
- ```
342
- * [Playwright] Added support to `playwright-core` package if `playwright` is not installed. See #3190, fixes #2663.
343
- * [Playwright] Added `makeApiRequest` action to perform API requests. Requires Playwright >= 1.18
344
- * Added support to `codecept.config.js` for name consistency across other JS tools. See motivation at #3195 by @JiLiZART
345
- * [ApiDataFactory] Added options arg to `have` method. See #3197 by @JJlokidoki
346
- * Improved pt-br translations to include keywords: 'Funcionalidade', 'Cenário', 'Antes', 'Depois', 'AntesDaSuite', 'DepoisDaSuite'. See #3206 by @danilolutz
347
- * [allure plugin] Introduced `addStep` method to add comments and attachments. See #3104 by @EgorBodnar
348
-
349
- 🐛 Bugfixes:
350
-
351
- * Fixed #3212: using Regex flags for Cucumber steps. See #3214 by @anils92
352
-
353
- 📖 Documentation
354
-
355
- * Added [Testomat.io reporter](/reports#testomatio)
356
- * Added [api testing](/api) guides
357
- * Added [internal api](/internal-api) guides
358
- * [Appium] Fixed documentation for `performSwipe`
359
- * [Playwright] update docs for `usePlaywrightTo` method by @dbudzins
360
-
361
- ## 3.2.3
362
-
363
- * Documentation improvements by @maojunxyz
364
- * Guard mocha cli reporter from registering step logger multiple times #3180 by @nikocanvacom
365
- * [Playwright] Fixed "tracing.stop: tracing.stop: ENAMETOOLONG: name too long" by @hatufacci
366
- * Fixed #2889: return always the same error contract from simplifyTest. See #3168 by @andremoah
367
-
368
- ## 3.2.2
369
-
370
- * [Playwright] Reverted removal of retry on context errors. Fixes #3130
371
- * Timeout improvements by @nikocanvacom:
372
- * Added priorites to timeouts
373
- * Added `overrideStepLimits` to [stepTimeout plugin](https://codecept.io/plugins/#steptimeout) to override steps timeouts set by `limitTime`.
374
- * Fixed step timeout not working due to override by NaN by test timeout #3126
375
- * [Appium] Fixed logging error when `manualStart` is true. See #3140 by @nikocanvacom
376
-
377
-
378
- ## 3.2.1
379
-
380
- > ♻️ This release fixes hanging of tests by reducing timeouts for automatic retries on failures.
381
-
382
- * [retryFailedStep plugin] **New Defaults**: retries steps up to 3 times with factor of 1.5 (previously 5 with factor 2)
383
- * [Playwright] - disabled retry on failed context actions (not needed anymore)
384
- * [Puppeteer] - reduced retries on context failures to 3 times.
385
- * [Playwright] Handling `crash` event to automatically close crashed pages.
386
-
387
- ## 3.2.0
388
-
389
- 🛩️ Features:
390
-
391
- **[Timeouts](https://codecept.io/advanced/#timeout) implemented**
392
- * global timeouts (via `timeout` config option).
393
- * _Breaking change:_ timeout option expects **timeout in seconds**, not in milliseconds as it was previously.
394
- * test timeouts (via `Scenario` and `Feature` options)
395
- * _Breaking change:_ `Feature().timeout()` and `Scenario().timeout()` calls has no effect and are deprecated
396
-
397
- ```js
398
- // set timeout for every test in suite to 10 secs
399
- Feature('tests with timeout', { timeout: 10 });
400
-
401
- // set timeout for this test to 20 secs
402
- Scenario('a test with timeout', { timeout: 20 }, ({ I }) => {});
403
- ```
404
-
405
- * step timeouts (See #3059 by @nikocanvacom)
406
-
407
- ```js
408
- // set step timeout to 5 secs
409
- I.limitTime(5).click('Link');
410
- ```
411
- * `stepTimeout` plugin introduced to automatically add timeouts for each step (#3059 by @nikocanvacom).
412
-
413
- [**retryTo**](/plugins/#retryto) plugin introduced to rerun a set of steps on failure:
414
-
415
- ```js
416
- // editing in text in iframe
417
- // if iframe was not loaded - retry 5 times
418
- await retryTo(() => {
419
- I.switchTo('#editor frame');
420
- I.fillField('textarea', 'value');
421
- }, 5);
422
- ```
423
-
424
- * [Playwright] added `locale` configuration
425
- * [WebDriver] upgraded to webdriverio v7
426
-
427
- 🐛 Bugfixes:
428
-
429
- * Fixed allure plugin "Unexpected endStep()" error in #3098 by @abhimanyupandian
430
- * [Puppeteer] always close remote browser on test end. See #3054 by @mattonem
431
- * stepbyStepReport Plugin: Disabled screenshots after test has failed. See #3119 by @ioannisChalkias
432
-
433
-
434
- ## 3.1.3
435
-
436
- 🛩️ Features:
437
-
438
- * BDD Improvement. Added `DataTableArgument` class to work with table data structures.
439
-
440
- ```js
441
- const { DataTableArgument } = require('codeceptjs');
442
- //...
443
- Given('I have an employee card', (table) => {
444
- const dataTableArgument = new DataTableArgument(table);
445
- const hashes = dataTableArgument.hashes();
446
- // hashes = [{ name: 'Harry', surname: 'Potter', position: 'Seeker' }];
447
- const rows = dataTableArgument.rows();
448
- // rows = [['Harry', 'Potter', Seeker]];
449
- }
450
- ```
451
- See updated [BDD section](https://codecept.io/bdd/) for more API options. Thanks to @EgorBodnar
452
-
453
- * Support `cjs` file extensions for config file: `codecept.conf.cjs`. See #3052 by @kalvenschraut
454
- * API updates: Added `test.file` and `suite.file` properties to `test` and `suite` objects to use in helpers and plugins.
455
-
456
- 🐛 Bugfixes:
457
-
458
- * [Playwright] Fixed resetting `test.artifacts` for failing tests. See #3033 by @jancorvus. Fixes #3032
459
- * [Playwright] Apply `basicAuth` credentials to all opened browser contexts. See #3036 by @nikocanvacom. Fixes #3035
460
- * [WebDriver] Updated `webdriverio` default version to `^6.12.1`. See #3043 by @sridhareaswaran
461
- * [Playwright] `I.haveRequestHeaders` affects all tabs. See #3049 by @jancorvus
462
- * BDD: Fixed unhandled empty feature files. Fix #3046 by @abhimanyupandian
463
- * Fixed `RangeError: Invalid string length` in `recorder.js` when running huge amount of tests.
464
- * [Appium] Fixed definitions for `touchPerform`, `hideDeviceKeyboard`, `removeApp` by @mirao
465
-
466
- 📖 Documentation:
467
-
468
- * Added Testrail reporter [Reports Docs](https://codecept.io/reports/#testrail)
469
-
470
-
471
- ## 3.1.2
472
-
473
- 🛩️ Features:
474
-
475
- * Added `coverage` plugin to generate code coverage for Playwright & Puppeteer. By @anirudh-modi
476
- * Added `subtitle` plugin to generate subtitles for videos recorded with Playwright. By @anirudh-modi
477
- * Configuration: `config.tests` to accept array of file patterns. See #2994 by @monsteramba
478
-
479
- ```js
480
- exports.config = {
481
- tests: ['./*_test.js','./sampleTest.js'],
482
- // ...
483
- }
484
- ```
485
- * Notification is shown for test files without `Feature()`. See #3011 by @PeterNgTr
486
-
487
- 🐛 Bugfixes:
488
-
489
- * [Playwright] Fixed #2986 error is thrown when deleting a missing video. Fix by @hatufacci
490
- * Fixed false positive result when invalid function is called in a helper. See #2997 by @abhimanyupandian
491
- * [Appium] Removed full page mode for `saveScreenshot`. See #3002 by @nlespiaucq
492
- * [Playwright] Fixed #3003 saving trace for a test with a long name. Fix by @hatufacci
493
-
494
- 🎱 Other:
495
-
496
- * Deprecated `puppeteerCoverage` plugin in favor of `coverage` plugin.
497
-
498
- ## 3.1.1
499
-
500
- * [Appium] Fixed #2759
501
- `grabNumberOfVisibleElements`, `grabAttributeFrom`, `grabAttributeFromAll` to allow id locators.
502
-
503
- ## 3.1.0
504
-
505
- * [Plawyright] Updated to Playwright 1.13
506
- * [Playwright] **Possible breaking change**: `BrowserContext` is initialized before each test and closed after. This behavior matches recommendation from Playwright team to use different contexts for tests.
507
- * [Puppeteer] Updated to Puppeteer 10.2.
508
- * [Protractor] Helper deprecated
509
-
510
- 🛩️ Features:
511
-
512
- * [Playwright] Added recording of [video](https://codecept.io/playwright/#video) and [traces](https://codecept.io/playwright/#trace) by @davertmik
513
- * [Playwritght] [Mocking requests](https://codecept.io/playwright/#mocking-network-requests) implemented via `route` API of Playwright by @davertmik
514
- * [Playwright] Added **support for [React locators](https://codecept.io/react/#locators)** in #2912 by @AAAstorga
515
-
516
- 🐛 Bugfixes:
517
-
518
- * [Puppeteer] Fixed #2244 `els[0]._clickablePoint is not a function` by @karunandrii.
519
- * [Puppeteer] Fixed `fillField` to check for invisible elements. See #2916 by @anne-open-xchange
520
- * [Playwright] Reset of dialog event listener before registration of new one. #2946 by @nikocanvacom
521
- * Fixed running Gherkin features with `run-multiple` using chunks. See #2900 by @andrenoberto
522
- * Fixed #2937 broken typings for subfolders on Windows by @jancorvus
523
- * Fixed issue where cucumberJsonReporter not working with fakerTransform plugin. See #2942 by @ilangv
524
- * Fixed #2952 finished job with status code 0 when playwright cannot connect to remote wss url. By @davertmik
525
-
526
-
527
- ## 3.0.7
528
-
529
- 📖 Documentation fixes:
530
-
531
- * Remove broken link from `Nightmare helper`. See #2860 by @Arhell
532
- * Fixed broken links in `playwright.md`. See #2848 by @johnhoodjr
533
- * Fix mocha-multi config example. See #2881 by @rimesc
534
- * Fix small errors in email documentation file. See #2884 by @mkrtchian
535
- * Improve documentation for `Sharing Data Between Workers` section. See #2891 by @ngraf
536
-
537
- 🛩️ Features:
538
-
539
- * [WebDriver] Shadow DOM Support for `Webdriver`. See #2741 by @gkushang
540
- * [Release management] Introduce the versioning automatically, it follows the semantics versioning. See #2883 by @PeterNgTr
541
- * Adding opts into `Scenario.skip` that it would be useful for building reports. See #2867 by @AlexKo4
542
- * Added support for attaching screenshots to [cucumberJsonReporter](https://github.com/ktryniszewski-mdsol/codeceptjs-cucumber-json-reporter) See #2888 by @fijijavis
543
- * Supported config file for `codeceptjs shell` command. See #2895 by @PeterNgTr:
544
-
545
- ```
546
- npx codeceptjs shell -c foo.conf.js
547
- ```
548
-
549
- Bug fixes:
550
- * [GraphQL] Use a helper-specific instance of Axios to avoid contaminating global defaults. See #2868 by @vanvoljg
551
- * A default system color is used when passing non supported system color when using I.say(). See #2874 by @PeterNgTr
552
- * [Playwright] Avoid the timout due to calling the click on invisible elements. See #2875 by cbayer97
553
-
554
-
555
- ## 3.0.6
556
-
557
- * [Playwright] Added `electron` as a browser to config. See #2834 by @cbayer97
558
- * [Playwright] Implemented `launchPersistentContext` to be able to launch persistent remote browsers. See #2817 by @brunoqueiros. Fixes #2376.
559
- * Fixed printing logs and stack traces for `run-workers`. See #2857 by @haveac1gar. Fixes #2621, #2852
560
- * Emit custom messages from worker to the main thread. See #2824 by @jccguimaraes
561
- * Improved workers processes output. See #2804 by @drfiresign
562
- * BDD. Added ability to use an array of feature files inside config in `gherkin.features`. See #2814 by @jbergeronjr
563
-
564
- ```js
565
- "features": [
566
- "./features/*.feature",
567
- "./features/api_features/*.feature"
568
- ],
569
- ```
570
- * Added `getQueueId` to reporter to rerun a specific promise. See #2837 by @jonatask
571
- * **Added `fakerTransform` plugin** to use faker data in Gherkin scenarios. See #2854 by @adrielcodeco
572
-
573
- ```feature
574
- Scenario Outline: ...
575
- Given ...
576
- When ...
577
- Then ...
578
-
579
- Examples:
580
- | productName | customer | email | anythingMore |
581
- | {{commerce.product}} | Dr. {{name.findName}} | {{internet.email}} | staticData |
582
- ```
583
- * [REST] Use class instance of axios, not the global instance, to avoid contaminating global configuration. #2846 by @vanvoljg
584
- * [Appium] Added `tunnelIdentifier` config option to provide tunnel for SauceLabs. See #2832 by @gurjeetbains
585
-
586
- ## 3.0.5
587
-
588
-
589
- Features:
590
-
591
- * **[Official Docker image for CodeceptJS v3](https://hub.docker.com/r/codeceptjs/codeceptjs)**. New Docker image is based on official Playwright image and supports Playwright, Puppeteer, WebDriver engines. Thanks @VikentyShevyrin
592
- * Better support for Typescript `codecept.conf.ts` configuration files. See #2750 by @elaichenkov
593
- * Propagate more events for custom parallel script. See #2796 by @jccguimaraes
594
- * [mocha-junit-reporter] Now supports attachments, see documentation for details. See #2675 by @Shard
595
- * CustomLocators interface for TypeScript to extend from LocatorOrString. See #2798 by @danielrentz
596
- * [REST] Mask sensitive data from log messages.
597
- ```js
598
- I.sendPatchRequest('/api/users.json', secret({ "email": "user@user.com" }));
599
- ```
600
- See #2786 by @PeterNgTr
601
-
602
- Bug fixes:
603
- * Fixed reporting of nested steps with PageObjects and BDD scenarios. See #2800 by @davertmik. Fixes #2720 #2682
604
- * Fixed issue with `codeceptjs shell` which was broken since 3.0.0. See #2743 by @stedman
605
- * [Gherkin] Fixed issue suppressed or hidden errors in tests. See #2745 by @ktryniszewski-mdsol
606
- * [Playwright] fix grabCssPropertyFromAll serialization by using property names. See #2757 by @elaichenkov
607
- * [Allure] fix report for multi sessions. See #2771 by @cbayer97
608
- * [WebDriver] Fix locator object debug log messages in smart wait. See 2748 by @elaichenkov
609
-
610
- Documentation fixes:
611
- * Fixed some broken examples. See #2756 by @danielrentz
612
- * Fixed Typescript typings. See #2747, #2758 and #2769 by @elaichenkov
613
- * Added missing type for xFeature. See #2754 by @PeterNgTr
614
- * Fixed code example in Page Object documentation. See #2793 by @mkrtchian
615
-
616
- Library updates:
617
- * Updated Axios to 0.21.1. See by @sseide
618
- * Updated @pollyjs/core @pollyjs/adapter-puppeteer. See #2760 by @Anikethana
619
-
620
- ## 3.0.4
621
-
622
- * **Hotfix** Fixed `init` script by adding `cross-spawn` package. By @vipulgupta2048
623
- * Fixed handling error during initialization of `run-multiple`. See #2730 by @wagoid
624
-
625
- ## 3.0.3
626
-
627
- * **Playwright 1.7 support**
628
- * [Playwright] Fixed handling null context in click. See #2667 by @matthewjf
629
- * [Playwright] Fixed `Cannot read property '$$' of null` when locating elements. See #2713 by @matthewjf
630
- * Command `npx codeceptjs init` improved
631
- * auto-installing required packages
632
- * better error messages
633
- * fixed generating type definitions
634
- * Data Driven Tests improvements: instead of having one skipped test for data driven scenarios when using xData you get a skipped test for each entry in the data table. See #2698 by @Georgegriff
635
- * [Puppeteer] Fixed that `waitForFunction` was not working with number values. See #2703 by @MumblesNZ
636
- * Enabled autocompletion for custom helpers. #2695 by @PeterNgTr
637
- * Emit test.after on workers. Fix #2693 by @jccguimaraes
638
- * TypeScript: Allow .ts config files. See #2708 by @elukoyanov
639
- * Fixed definitions generation errors by @elukoyanov. See #2707 and #2718
640
- * Fixed handing error in _after function; for example, browser is closed during test and tests executions is stopped, but error was not logged. See #2715 by @elukoyanov
641
- * Emit hook.failed in workers. Fix #2723 by @jccguimaraes
642
- * [wdio plugin] Added `seleniumArgs` and `seleniumInstallArgs` config options for plugin. See #2687 by @andrerleao
643
- * [allure plugin] Added `addParameter` method in #2717 by @jancorvus. Fixes #2716
644
- * Added mocha-based `--reporter-options` and `--reporter <name>` commands to `run-workers` command by in #2691 @Ameterezu
645
- * Fixed infinite loop for junit reports. See #2691 @Ameterezu
646
- * Added status, start/end time, and match line for BDD steps. See #2678 by @ktryniszewski-mdsol
647
- * [stepByStepReport plugin] Fixed "helper.saveScreenshot is not a function". Fix #2688 by @andrerleao
648
-
649
-
650
-
651
- ## 3.0.2
652
-
653
- * [Playwright] Fix connection close with remote browser. See #2629 by @dipiash
654
- * [REST] set maxUploadFileSize when performing api calls. See #2611 by @PeterNgTr
655
- * Duplicate Scenario names (combined with Feature name) are now detected via a warning message.
656
- Duplicate test names can cause `codeceptjs run-workers` to not function. See #2656 by @Georgegriff
657
- * Documentation fixes
658
-
659
- Bug Fixes:
660
- * --suites flag now should function correctly for `codeceptjs run-workers`. See #2655 by @Georgegriff
661
- * [autoLogin plugin] Login methods should now function as expected with `codeceptjs run-workers`. See #2658 by @Georgegriff, resolves #2620
662
-
663
-
664
-
665
- ## 3.0.1
666
-
667
- ♨️ Hot fix:
668
- * Lock the mocha version to avoid the errors. See #2624 by PeterNgTr
669
-
670
- 🐛 Bug Fix:
671
- * Fixed error handling in Scenario.js. See #2607 by haveac1gar
672
- * Changing type definition in order to allow the use of functions with any number of any arguments. See #2616 by akoltun
673
-
674
- * Some updates/changes on documentations
675
-
676
- ## 3.0.0
677
- > [ 👌 **LEARN HOW TO UPGRADE TO CODECEPTJS 3 ➡**](https://bit.ly/codecept3Up)
678
-
679
- * Playwright set to be a default engine.
680
- * **NodeJS 12+ required**
681
- * **BREAKING CHANGE:** Syntax for tests has changed.
682
-
683
-
684
- ```js
685
- // Previous
686
- Scenario('title', (I, loginPage) => {});
687
-
688
- // Current
689
- Scenario('title', ({ I, loginPage }) => {});
690
- ```
691
-
692
- * **BREAKING** Replaced bootstrap/teardown scripts to accept only functions or async functions. Async function with callback (with done parameter) should be replaced with async/await. [See our upgrade guide](https://bit.ly/codecept3Up).
693
- * **[TypeScript guide](/typescript)** and [boilerplate project](https://github.com/codeceptjs/typescript-boilerplate)
694
- * [tryTo](/plugins/#tryto) and [pauseOnFail](/plugins/#pauseOnFail) plugins installed by default
695
- * Introduced one-line installer:
696
-
697
- ```
698
- npx create-codeceptjs .
699
- ```
700
-
701
- Read changelog to learn more about version 👇
702
-
703
- ## 3.0.0-rc
704
-
705
-
706
-
707
- * Moved [Helper class into its own package](https://github.com/codeceptjs/helper) to simplify publishing standalone helpers.
708
- * Fixed typings for `I.say` and `I.retry` by @Vorobeyko
709
- * Updated documentation:
710
- * [Quickstart](https://github.com/codeceptjs/CodeceptJS/blob/codeceptjs-v3.0/docs/quickstart.md#quickstart)
711
- * [Best Practices](https://github.com/codeceptjs/CodeceptJS/blob/codeceptjs-v3.0/docs/best.md)
712
- * [Custom Helpers](https://github.com/codeceptjs/CodeceptJS/blob/codeceptjs-v3.0/docs/custom-helpers.md)
713
- * [TypeScript](https://github.com/codeceptjs/CodeceptJS/blob/codeceptjs-v3.0/docs/typescript.md)
714
-
715
- ## 3.0.0-beta.4
716
-
717
- 🐛 Bug Fix:
718
- * PageObject was broken when using "this" inside a simple object.
719
- * The typings for all WebDriver methods work correctly.
720
- * The typings for "this.helper" and helper constructor work correctly, too.
721
-
722
- 🧤 Internal:
723
- * Our TS Typings will be tested now! We strarted using [dtslint](https://github.com/microsoft/dtslint) to check all typings and all rules for linter.
724
- Example:
725
- ```ts
726
- const psp = wd.grabPageScrollPosition() // $ExpectType Promise<PageScrollPosition>
727
- psp.then(
728
- result => {
729
- result.x // $ExpectType number
730
- result.y // $ExpectType number
731
- }
732
- )
733
- ```
734
- * And last: Reducing package size from 3.3Mb to 2.0Mb
735
-
736
- ## 3.0.0-beta-3
737
-
738
- * **BREAKING** Replaced bootstrap/teardown scripts to accept only functions or async functions. Async function with callback (with done parameter) should be replaced with async/await. [See our upgrde guide](https://bit.ly/codecept3Up).
739
- * Test artifacts introduced. Each test object has `artifacts` property, to keep attachment files. For instance, a screenshot of a failed test is attached to a test as artifact.
740
- * Improved output for test execution
741
- * Changed colors for steps output, simplified
742
- * Added stack trace for test failures
743
- * Removed `Event emitted` from log in `--verbose` mode
744
- * List artifacts of a failed tests
745
-
746
- ![](https://user-images.githubusercontent.com/220264/82160052-397bf800-989b-11ea-81c0-8e58b3d33525.png)
747
-
748
- * Steps & metasteps refactored by @Vorobeyko. Logs to arguments passed to page objects:
749
-
750
- ```js
751
- // TEST:
752
- MyPage.hasFiles('first arg', 'second arg');
753
-
754
- // OUTPUT:
755
- MyPage: hasFile "First arg", "Second arg"
756
- I see file "codecept.js"
757
- I see file "codecept.po.json"
758
- ```
759
- * Introduced official [TypeScript boilerplate](https://github.com/codeceptjs/typescript-boilerplate). Started by @Vorobeyko.
760
-
761
- ## 3.0.0-beta
762
-
763
-
764
- * **NodeJS 12+ required**
765
- * **BREAKING CHANGE:** Syntax for tests has changed.
766
-
767
-
768
- ```js
769
- // Previous
770
- Scenario('title', (I, loginPage) => {});
771
-
772
- // Current
773
- Scenario('title', ({ I, loginPage }) => {});
774
- ```
775
-
776
- * **BREAKING CHANGE:** [WebDriver][Protractor][Puppeteer][Playwright][Nightmare] `grab*` functions unified:
777
- * `grab*From` => **returns single value** from element or throws error when no matchng elements found
778
- * `grab*FromAll` => returns array of values, or empty array when no matching elements
779
- * Public API for workers introduced by @koushikmohan1996. [Customize parallel execution](https://github.com/Codeception/CodeceptJS/blob/codeceptjs-v3.0/docs/parallel.md#custom-parallel-execution) with workers by building custom scripts.
780
-
781
- * [Playwright] Added `usePlaywrightTo` method to access Playwright API in tests directly:
782
-
783
- ```js
784
- I.usePlaywrightTo('do something special', async ({ page }) => {
785
- // use page or browser objects here
786
- });
787
- ```
788
-
789
- * [Puppeteer] Introduced `usePuppeteerTo` method to access Puppeteer API:
790
-
791
- ```js
792
- I.usePuppeteerTo('do something special', async ({ page, browser }) => {
793
- // use page or browser objects here
794
- });
795
- ```
796
-
797
- * [WebDriver] Introduced `useWebDriverTo` method to access webdriverio API:
798
-
799
- ```js
800
- I.useWebDriverTo('do something special', async ({ browser }) => {
801
- // use browser object here
802
- });
803
- ```
804
-
805
- * [Protractor] Introduced `useProtractorTo` method to access protractor API
806
- * `tryTo` plugin introduced. Allows conditional action execution:
807
-
808
- ```js
809
- const isSeen = await tryTo(() => {
810
- I.see('Some text');
811
- });
812
- // we are not sure if cookie bar is displayed, but if so - accept cookies
813
- tryTo(() => I.click('Accept', '.cookies'));
814
- ```
815
-
816
- * **Possible breaking change** In semantic locators `[` char indicates CSS selector.
817
- ## 2.6.11
818
-
819
- * [Playwright] Playwright 1.4 compatibility
820
- * [Playwright] Added `ignoreHTTPSErrors` config option (default: false). See #2566 by gurjeetbains
821
- * Added French translation by @vimar
822
- * [WebDriver] Updated `dragSlider` to work in WebDriver W3C protocol. Fixes #2557 by suniljaiswal01
823
-
824
- ## 2.6.10
825
-
826
- * Fixed saving options for suite via `Feature('title', {key: value})` by @Diokuz. See #2553 and [Docs](https://codecept.io/advanced/#dynamic-configuration)
827
-
828
- ## 2.6.9
829
-
830
- * [Puppeteer][Playwright] SessionStorage is now cleared in after hook. See #2524
831
- * When helper load failed the error stack is now logged by @SkReD. See #2541
832
- * Small documentation fixes.
833
-
834
- ## 2.6.8
835
-
836
- * [WebDriver][Protractor][Playwright][Puppeteer][Nightmare] `saveElementScreenshot` method added to make screenshot of an element. By @suniljaiswal01
837
- * [Playwright][Puppeteer] Added `type` method to type a text using keyboard with an optional delay.
838
- * [WebDriver] Added optional `delay` argument to `type` method to slow down typing.
839
- * [Puppeteer] Fixed `amOnPage` freeze when `getPageTimeout` is 0"; set 30 sec as default timeout by @Vorobeyko.
840
- * Fixed printing step with null argument in custom helper by @sjana-aj. See #2494
841
- * Fix missing screenshot on failure when REST helper is in use #2513 by @PeterNgTr
842
- * Improve error logging in the `screenshotOnFail` plugin #2512 by @pablopaul
843
-
844
- ## 2.6.7
845
-
846
- * Add REST helper into `standardActingHelpers` array #2474 by @PeterNgTr
847
- * Add missing `--invert` option for `run-workers` command #2504 by @pablopaul
848
- * [WebDriver] Introduce `forceRightClick` method #2485 bylsuniljaiswal01
849
- * [Playwright] Fix `setCookie` method #2491 by @bmbarker90
850
- * [TypeScript] Update compilerOptions.target to es2017 #2483 by @shanplourde
851
- * [Mocha] Honor reporter configuration #2465 by @trinhpham
852
-
853
- ## 2.6.6
854
-
855
- * Puppeteer 4.0 support. Important: MockRequest helper won't work with Puppeter > 3.3
856
- * Added `xFeature` and `Feature.skip` to skip all tests in a suite. By @Georgegriff
857
- * [Appium] Fixed #2428 Android native locator support by @idxn
858
- * [WebDriver] Fixed `waitNumberOfVisibleElements` to actually filter visible elements. By @ilangv
859
- * [Puppeteer] Fixed handling error which is not an Error object. Fixes `cannot read property indexOf of undefined` error. Fix #2436 by @Georgegriff
860
- * [Puppeteer] Print error on page crash by @Georgegriff
861
-
862
- ## 2.6.5
863
-
864
- * Added `test.skipped` event to run-workers, fixing allure reports with skipped tests in workers #2391. Fix #2387 by @koushikmohan1996
865
- * [Playwright] Fixed calling `waitFor*` methods with custom locators #2314. Fix #2389 by @Georgegriff
866
-
867
- ## 2.6.4
868
-
869
- * [Playwright] **Playwright 1.0 support** by @Georgegriff.
870
-
871
- ## 2.6.3
872
-
873
- * [stepByStepReport plugin] Fixed when using plugin with BeforeSuite. Fixes #2337 by @mirao
874
- * [allure plugin] Fixed reporting of tests skipped by failure in before hook. Refer to #2349 & #2354. Fix by @koushikmohan1996
875
-
876
- ## 2.6.2
877
-
878
- * [WebDriver][Puppeteer] Added `forceClick` method to emulate click event instead of using native events.
879
- * [Playwright] Updated to 0.14
880
- * [Puppeteer] Updated to Puppeteer v3.0
881
- * [wdio] Fixed undefined output directory for wdio plugns. Fix By @PeterNgTr
882
- * [Playwright] Introduced `handleDownloads` method to download file. Please note, this method has slightly different API than the same one in Puppeteer.
883
- * [allure] Fixed undefined output directory for allure plugin on using custom runner. Fix by @charliepradeep
884
- * [WebDriver] Fixed `waitForEnabled` fix for webdriver 6. Fix by @dsharapkou
885
- * Workers: Fixed negative failure result if use scenario with the same names. Fix by @Vorobeyko
886
- * [MockRequest] Updated documentation to match new helper version
887
- * Fixed: skipped tests are not reported if a suite failed in `before`. Refer #2349 & #2354. Fix by @koushikmohan1996
888
-
889
- ## 2.6.1
890
-
891
- * [screenshotOnFail plugin] Fixed saving screenshot of active session.
892
- * [screenshotOnFail plugin] Fix issue #2301 when having the flag `uniqueScreenshotNames`=true results in `undefined` in screenshot file name by @PeterNgTr
893
- * [WebDriver] Fixed `waitForElement` not applying the optional second argument to override the default timeout in webdriverio 6. Fix by @Mooksc
894
- * [WebDriver] Updated `waitUntil` method which is used by all of the wait* functions. This updates the `waitForElement` by the same convention used to update `waitForVisible` and `waitInUrl` to be compatible with both WebDriverIO v5 & v6. See #2313 by @Mooksc
895
-
896
- ## 2.6.0
897
-
898
- * **[Playwright] Updated to Playwright 0.12** by @Georgegriff.
899
-
900
- Upgrade playwright to ^0.12:
901
-
902
- ```
903
- npm i playwright@^0.12 --save
904
- ```
905
-
906
- [Notable changes](https://github.com/microsoft/playwright/releases/tag/v0.12.0):
907
- * Fixed opening two browsers on start
908
- * `executeScript` - passed function now accepts only one argument. Pass in objects or arrays if you need multtple arguments:
909
- ```js
910
- // Old style, does not work anymore:
911
- I.executeScript((x, y) => x + y, x, y);
912
- // New style, passing an object:
913
- I.executeScript(({x, y}) => x + y, {x, y});
914
- ```
915
- * `click` - automatically waits for element to become clickable (visible, not animated) and waits for navigation.
916
- * `clickLink` - deprecated
917
- * `waitForClickable` - deprecated
918
- * `forceClick` - added
919
- * Added support for custom locators. See #2277
920
- * Introduced [device emulation](/playwright/#device-emulation):
921
- * globally via `emulate` config option
922
- * per session
923
-
924
- **[WebDriver] Updated to webdriverio v6** by @PeterNgTr.
925
-
926
- Read [release notes](https://webdriver.io/blog/2020/03/26/webdriverio-v6-released.html), then
927
- upgrade webdriverio to ^6.0:
928
-
929
- ```
930
- npm i webdriverio@^6.0 --save
931
- ```
932
- *(webdriverio v5 support is deprecated and will be removed in CodeceptJS 3.0)*
933
-
934
- [WebDriver] Introduced [Shadow DOM support](/shadow) by @gkushang
935
-
936
- ```js
937
- I.click({ shadow: ['my-app', 'recipe-hello', 'button'] });
938
- ```
939
-
940
- * **Fixed parallel execution of `run-workers` for Gherkin** scenarios by @koushikmohan1996
941
- * [MockRequest] Updated and **moved to [standalone package](https://github.com/codeceptjs/mock-request)**:
942
- * full support for record/replay mode for Puppeteer
943
- * added `mockServer` method to use flexible PollyJS API to define mocks
944
- * fixed stale browser screen in record mode.
945
- * [Playwright] Added support on for `screenshotOnFail` plugin by @amonkc
946
- * Gherkin improvement: setting different tags per examples. See #2208 by @acuper
947
- * [TestCafe] Updated `click` to take first visible element. Fixes #2226 by @theTainted
948
- * [Puppeteer][WebDriver] Updated `waitForClickable` method to check for element overlapping. See #2261 by @PiQx
949
- * [Puppeteer] Dropped `puppeteer-firefox` support, as Puppeteer supports Firefox natively.
950
- * [REST] Rrespect Content-Type header. See #2262 by @pmarshall-legacy
951
- * [allure plugin] Fixes BeforeSuite failures in allure reports. See #2248 by @Georgegriff
952
- * [WebDriver][Puppeteer][Playwright] A screenshot of for an active session is saved in multi-session mode. See #2253 by @ChexWarrior
953
- * Fixed `--profile` option by @pablopaul. Profile value to be passed into `run-multiple` and `run-workers`:
954
-
955
- ```
956
- npx codecept run-workers 2 --profile firefox
957
- ```
958
-
959
- Value is available at `process.env.profile` (previously `process.profile`). See #2302. Fixes #1968 #1315
960
-
961
- * [commentStep Plugin introduced](/plugins#commentstep). Allows to annotate logical parts of a test:
962
-
963
- ```js
964
- __`Given`;
965
- I.amOnPage('/profile')
966
-
967
- __`When`;
968
- I.click('Logout');
969
-
970
- __`Then`;
971
- I.see('You are logged out');
972
- ```
973
-
974
- ## 2.5.0
975
-
976
- * **Experimental: [Playwright](/playwright) helper introduced**.
977
-
978
- > [Playwright](https://github.com/microsoft/playwright/) is an alternative to Puppeteer which works very similarly to it but adds cross-browser support with Firefox and Webkit. Until v1.0 Playwright API is not stable but we introduce it to CodeceptJS so you could try it.
979
-
980
- * [Puppeteer] Fixed basic auth support when running in multiple sessions. See #2178 by @ian-bartholomew
981
- * [Puppeteer] Fixed `waitForText` when there is no `body` element on page (redirect). See #2181 by @Vorobeyko
982
- * [Selenoid plugin] Fixed overriding current capabilities by adding deepMerge. Fixes #2183 by @koushikmohan1996
983
- * Added types for `Scenario.todo` by @Vorobeyko
984
- * Added types for Mocha by @Vorobeyko. Fixed typing conflicts with Jest
985
- * [FileSystem] Added methods by @nitschSB
986
- * `waitForFile`
987
- * `seeFileContentsEqualReferenceFile`
988
- * Added `--colors` option to `run` and `run-multiple` so you force colored output in dockerized environment. See #2189 by @mirao
989
- * [WebDriver] Added `type` command to enter value without focusing on a field. See #2198 by @xMutaGenx
990
- * Fixed `codeceptjs gt` command to respect config pattern for tests. See #2200 and #2204 by @matheo
991
-
992
-
993
- ## 2.4.3
994
-
995
- * Hotfix for interactive pause
996
-
997
- ## 2.4.2
998
-
999
- * **Interactive pause improvements** by @koushikmohan1996
1000
- * allows using in page objects and variables: `pause({ loginPage, a })`
1001
- * enables custom commands inside pause with `=>` prefix: `=> loginPage.open()`
1002
- * [Selenoid plugin](/plugins#selenoid) added by by @koushikmohan1996
1003
- * uses Selenoid to launch browsers inside Docker containers
1004
- * automatically **records videos** and attaches them to allure reports
1005
- * can delete videos for successful tests
1006
- * can automatically pull in and start Selenoid containers
1007
- * works with WebDriver helper
1008
- * Avoid failiure report on successful retry in worker by @koushikmohan1996
1009
- * Added translation ability to Scenario, Feature and other context methods by @koushikmohan1996
1010
- * 📢 Please help us translate context methods to your language! See [italian translation](https://github.com/codeceptjs/CodeceptJS/blob/master/translations/it-IT.js#L3) as an example and send [patches to vocabularies](https://github.com/codeceptjs/CodeceptJS/tree/master/translations).
1011
- * allurePlugin: Added `say` comments to allure reports by @PeterNgTr.
1012
- * Fixed no custom output folder created when executed with run-worker. Fix by @PeterNgTr
1013
- * [Puppeteer] Fixed error description for context element not found. See #2065. Fix by @PeterNgTr
1014
- * [WebDriver] Fixed `waitForClickable` to wait for exact number of seconds by @mirao. Resolves #2166
1015
- * Fixed setting `compilerOptions` in `jsconfig.json` file on init by @PeterNgTr
1016
- * [Filesystem] Added method by @nitschSB
1017
- * `seeFileContentsEqualReferenceFile`
1018
- * `waitForFile`
1019
-
1020
-
1021
- ## 2.4.1
1022
-
1023
- * [Hotfix] - Add missing lib that prevents codeceptjs from initializing.
1024
-
1025
- ## 2.4.0
1026
-
1027
- * Improved setup wizard with `npx codecept init`:
1028
- * **enabled [retryFailedStep](/plugins/#retryfailedstep) plugin for new setups**.
1029
- * enabled [@codeceptjs/configure](/configuration/#common-configuration-patterns) to toggle headless/window mode via env variable
1030
- * creates a new test on init
1031
- * removed question on "steps file", create it by default.
1032
- * Added [pauseOnFail plugin](/plugins/#pauseonfail). *Sponsored by Paul Vincent Beigang and his book "[Practical End 2 End Testing with CodeceptJS](https://leanpub.com/codeceptjs/)"*.
1033
- * Added [`run-rerun` command](/commands/#run-rerun) to run tests multiple times to detect and fix flaky tests. By @Ilrilan and @Vorobeyko.
1034
- * Added [`Scenario.todo()` to declare tests as pending](/basics#todotest). See #2100 by @Vorobeyko
1035
- * Added support for absolute path for `output` dir. See #2049 by @elukoyanov
1036
- * Fixed error in `npx codecept init` caused by calling `console.print`. See #2071 by @Atinux.
1037
- * [Filesystem] Methods added by @aefluke:
1038
- * `seeFileNameMatching`
1039
- * `grabFileNames`
1040
- * [Puppeteer] Fixed grabbing attributes with hyphen by @Holorium
1041
- * [TestCafe] Fixed `grabAttributeFrom` method by @elukoyanov
1042
- * [MockRequest] Added support for [Polly config options](https://netflix.github.io/pollyjs/#/configuration?id=configuration) by @ecrmnn
1043
- * [TestCafe] Fixes exiting with zero code on failure. Fixed #2090 with #2106 by @koushikmohan1996
1044
- * [WebDriver][Puppeteer] Added basicAuth support via config. Example: `basicAuth: {username: 'username', password: 'password'}`. See #1962 by @PeterNgTr
1045
- * [WebDriver][Appium] Added `scrollIntoView` by @pablopaul
1046
- * Fixed #2118: No error stack trace for syntax error by @senthillkumar
1047
- * Added `parse()` method to data table inside Cucumber tests. Use it to obtain rows and hashes for test data. See #2082 by @Sraime
1048
-
1049
- ## 2.3.6
1050
-
1051
- * Create better Typescript definition file through JSDoc. By @lemnis
1052
- * `run-workers` now can use glob pattern. By @Ilrilan
1053
- ```js
1054
- // Example:
1055
- exports.config = {
1056
- tests: '{./workers/base_test.workers.js,./workers/test_grep.workers.js}',
1057
- }
1058
- ```
1059
- * Added new command `npx codeceptjs info` which print information about your environment and CodeceptJS configs. By @jamesgeorge007
1060
- * Fixed some typos in documantation. By @pablopaul @atomicpages @EricTendian
1061
- * Added PULL_REQUEST template.
1062
- * [Puppeteer][WebDriver] Added `waitForClickable` for waiting clickable element on page.
1063
- * [TestCafe] Added support for remote connection. By @jvdieten
1064
- * [Puppeteer] Fixed `waitForText` XPath context now works correctly. By @Heavik
1065
- * [TestCafe] Fixed `clearField` clear field now awaits TestCafe's promise. By @orihomie
1066
- * [Puppeteer] Fixed fails when executing localStorage on services pages. See #2026
1067
- * Fixed empty tags in test name. See #2038
1068
-
1069
- ## 2.3.5
1070
-
1071
- * Set "parse-function" dependency to "5.2.11" to avoid further installation errors.
1072
-
1073
- ## 2.3.4
1074
-
1075
- * Fixed installation error "Cannot find module '@babel/runtime/helpers/interopRequireDefault'". The issue came from `parse-function` package. Fixed by @pablopaul.
1076
- * [Puppeteer] Fixed switching to iframe without an ID by @johnyb. See #1974
1077
- * Added `--profile` option to `run-workers` by @orihomie
1078
- * Added a tag definition to `FeatureConfig` and `ScenarioConfig` by @sseliverstov
1079
-
1080
- ## 2.3.3
1081
-
1082
- * **[customLocator plugin](#customlocator) introduced**. Adds a locator strategy for special test attributes on elements.
1083
-
1084
- ```js
1085
- // when data-test-id is a special test attribute
1086
- // enable and configure plugin to replace this
1087
- I.click({ css: '[data-test-id=register_button]');
1088
- // with this
1089
- I.click('$register_button');
1090
- ```
1091
- * [Puppeteer][WebDriver] `pressKey` improvements by @martomo:
1092
- Changed pressKey method to resolve issues and extend functionality.
1093
- * Did not properly recognize 'Meta' (or 'Command') as modifier key.
1094
- * Right modifier keys did not work in WebDriver using JsonWireProtocol.
1095
- * 'Shift' + 'key' combination would not reflect actual keyboard behavior.
1096
- * Respect sequence with multiple modifier keys passed to pressKey.
1097
- * Added support to automatic change operation modifier key based on operating system.
1098
- * [Puppeteer][WebDriver] Added `pressKeyUp` and `pressKeyDown` to press and release modifier keys like `Control` or `Shift`. By @martomo.
1099
- * [Puppeteer][WebDriver] Added `grabElementBoundingRect` by @PeterNgTr.
1100
- * [Puppeteer] Fixed speed degradation introduced in #1306 with accessibility locators support. See #1953.
1101
- * Added `Config.addHook` to add a function that will update configuration on load.
1102
- * Started [`@codeceptjs/configure`](https://github.com/codeceptjs/configure) package with a collection of common configuration patterns.
1103
- * [TestCafe] port's management removed (left on TestCafe itself) by @orihomie. Fixes #1934.
1104
- * [REST] Headers are no more declared as singleton variable. Fixes #1959
1105
- * Updated Docker image to include run tests in workers with `NUMBER_OF_WORKERS` env variable. By @PeterNgTr.
1106
-
1107
- ## 2.3.2
1108
-
1109
- * [Puppeteer] Fixed Puppeteer 1.20 support by @davertmik
1110
- * Fixed `run-workers` to run with complex configs. See #1887 by @nitschSB
1111
- * Added `--suites` option to `run-workers` to split suites by workers (tests of the same suite goes to teh same worker). Thanks @nitschSB.
1112
- * Added a guide on [Email Testing](https://codecept.io/email).
1113
- * [retryFailedStepPlugin] Improved to ignore wait* steps and others. Also added option to ignore this plugin per test bases. See [updated documentation](https://codecept.io/plugins#retryfailedstep). By @davertmik
1114
- * Fixed using PageObjects as classes by @Vorobeyko. See #1896
1115
- * [WebDriver] Fixed opening more than one tab. See #1875 by @jplegoff. Fixes #1874
1116
- * Fixed #1891 when `I.retry()` affected retries of next steps. By @davertmik
1117
-
1118
- ## 2.3.1
1119
-
1120
- * [MockRequest] Polly helper was renamed to MockRequest.
1121
- * [MockRequest][WebDriver] [Mocking requests](https://codecept.io/webdriver#mocking-requests) is now available in WebDriver. Thanks @radhey1851
1122
- * [Puppeteer] Ensure configured user agent and/or window size is applied to all pages. See #1862 by @martomo
1123
- * Improve handling of xpath locators with round brackets by @nitschSB. See #1870
1124
- * Use WebDriver capabilities config in wdio plugin. #1869 by @quekshuy
1125
-
1126
- ## 2.3.0
1127
-
1128
-
1129
- * **[Parallel testing by workers](https://codecept.io/parallel#parallel-execution-by-workers) introduced** by @VikalpP and @davertmik. Use `run-workers` command as faster and simpler alternative to `run-multiple`. Requires NodeJS v12
1130
-
1131
- ```
1132
- # run all tests in parallel using 3 workers
1133
- npx codeceptjs run-workers 3
1134
- ```
1135
- * [GraphQL][GraphQLDataFactory] **Helpers for data management over GraphQL** APIs added. By @radhey1851.
1136
- * Learn how to [use GraphQL helper](https://codecept.io/data#graphql) to access GarphQL API
1137
- * And how to combine it with [GraphQLDataFactory](https://codecept.io/data#graphql-data-factory) to generate and persist test data.
1138
- * **Updated to use Mocha 6**. See #1802 by @elukoyanov
1139
- * Added `dry-run` command to print steps of test scenarios without running them. Fails to execute scenarios with `grab*` methods or custom code. See #1825 for more details.
1140
-
1141
- ```
1142
- npx codeceptjs dry-run
1143
- ```
1144
-
1145
- * [Appium] Optimization when clicking, searching for fields by accessibility id. See #1777 by @gagandeepsingh26
1146
- * [TestCafe] Fixed `switchTo` by @KadoBOT
1147
- * [WebDriver] Added geolocation actions by @PeterNgTr
1148
- * `grabGeoLocation()`
1149
- * `setGeoLocation()`
1150
- * [Polly] Check typeof arguments for mock requests by @VikalpP. Fixes #1815
1151
- * CLI improvements by @jamesgeorge007
1152
- * `codeceptjs` command prints list of all available commands
1153
- * added `codeceptjs -V` flag to print version information
1154
- * warns on unknown command
1155
- * Added TypeScript files support to `run-multiple` by @z4o4z
1156
- * Fixed element position bug in locator builder. See #1829 by @AnotherAnkor
1157
- * Various TypeScript typings updates by @elukoyanov and @Vorobeyko
1158
- * Added `event.step.comment` event for all comment steps like `I.say` or gherking steps.
1159
-
1160
- ## 2.2.1
1161
-
1162
- * [WebDriver] A [dedicated guide](https://codecept.io/webdriver) written.
1163
- * [TestCafe] A [dedicated guide](https://codecept.io/testcafe) written.
1164
- * [Puppeteer] A [chapter on mocking](https://codecept.io/puppeteer#mocking-requests) written
1165
- * [Puppeteer][Nightmare][TestCafe] Window mode is enabled by default on `codeceptjs init`.
1166
- * [TestCafe] Actions implemented by @hubidu
1167
- * `grabPageScrollPosition`
1168
- * `scrollPageToTop`
1169
- * `scrollPageToBottom`
1170
- * `scrollTo`
1171
- * `switchTo`
1172
- * Intellisense improvements. Renamed `tsconfig.json` to `jsconfig.json` on init. Fixed autocompletion for Visual Studio Code.
1173
- * [Polly] Take configuration values from Puppeteer. Fix #1766 by @VikalpP
1174
- * [Polly] Add preconditions to check for puppeteer page availability by @VikalpP. Fixes #1767
1175
- * [WebDriver] Use filename for `uploadFile` by @VikalpP. See #1797
1176
- * [Puppeteer] Configure speed of input with `pressKeyDelay` option. By @hubidu
1177
- * Fixed recursive loading of support objects by @davertmik.
1178
- * Fixed support object definitions in steps.d.ts by @johnyb. Fixes #1795
1179
- * Fixed `Data().Scenario().injectDependencies()` is not a function by @andrerleao
1180
- * Fixed crash when using xScenario & Scenario.skip with tag by @VikalpP. Fixes #1751
1181
- * Dynamic configuration of helpers can be performed with async function. See #1786 by @cviejo
1182
- * Added TS definitions for internal objects by @Vorobeyko
1183
- * BDD improvements:
1184
- * Fix for snippets command with a .feature file that has special characters by @asselin
1185
- * Fix `--path` option on `gherkin:snippets` command by @asselin. See #1790
1186
- * Added `--feature` option to `gherkin:snippets` to enable creating snippets for a subset of .feature files. See #1803 by @asselin.
1187
- * Fixed: dynamic configs not reset after test. Fixes #1776 by @cviejo.
1188
-
1189
- ## 2.2.0
1190
-
1191
- * **EXPERIMENTAL** [**TestCafe** helper](https://codecept.io/helpers/TestCafe) introduced. TestCafe allows to run cross-browser tests it its own very fast engine. Supports all browsers including mobile. Thanks to @hubidu for implementation! Please test it and send us feedback.
1192
- * [Puppeteer] Mocking requests enabled by introducing [Polly.js helper](https://codecept.io/helpers/Polly). Thanks @VikalpP
1193
-
1194
- ```js
1195
- // use Polly & Puppeteer helpers
1196
- I.mockRequest('GET', '/api/users', 200);
1197
- I.mockRequest('POST', '/users', { user: { name: 'fake' }});
1198
- ```
1199
-
1200
- * **EXPERIMENTAL** [Puppeteer] [Firefox support](https://codecept.io/helpers/Puppeteer-firefox) introduced by @ngadiyak, see #1740
1201
- * [stepByStepReportPlugin] use md5 hash to generate reports into unique folder. Fix #1744 by @chimurai
1202
- * Interactive pause improvements:
1203
- * print result of `grab` commands
1204
- * print message for successful assertions
1205
- * `run-multiple` (parallel execution) improvements:
1206
- * `bootstrapAll` must be called before creating chunks. #1741 by @Vorobeyko
1207
- * Bugfix: If value in config has falsy value then multiple config does not overwrite original value. #1756 by @LukoyanovE
1208
- * Fixed hooks broken in 2.1.5 by @Vorobeyko
1209
- * Fix references to support objects when using Dependency Injection. Fix by @johnyb. See #1701
1210
- * Fix dynamic config applied for multiple helpers by @VikalpP #1743
1211
-
1212
-
1213
- ## 2.1.5
1214
-
1215
- * **EXPERIMENTAL** [Wix Detox support](https://github.com/codeceptjs/detox-helper) introduced as standalone helper. Provides a faster alternative to Appium for mobile testing.
1216
- * Saving successful commands inside interactive pause into `_output/cli-history` file. By @hubidu
1217
- * Fixed hanging error handler inside scenario. See #1721 by @haily-lgc.
1218
- * Fixed by @Vorobeyko: tests did not fail when an exception was raised in async bootstrap.
1219
- * [WebDriver] Added window control methods by @emmonspired
1220
- * `grabAllWindowHandles` returns all window handles
1221
- * `grabCurrentWindowHandle` returns current window handle
1222
- * `switchToWindow` switched to window by its handle
1223
- * [Appium] Fixed using `host` as configuration by @trinhpham
1224
- * Fixed `run-multiple` command when `tests` config option is undefined (in Gherkin scenarios). By @gkushang.
1225
- * German translation introduced by @hubidu
1226
-
1227
- ## 2.1.4
1228
-
1229
- * [WebDriver][Puppeteer][Protractor][Nightmare] A11y locator support introduced by @Holorium. Clickable elements as well as fields can be located by following attributes:
1230
- * `aria-label`
1231
- * `title`
1232
- * `aria-labelledby`
1233
- * [Puppeteer] Added support for React locators.
1234
- * New [React Guide](https://codecept.io/react) added.
1235
- * [Puppeteer] Deprecated `downloadFile`
1236
- * [Puppeteer] Introduced `handleDownloads` replacing `downloadFile`
1237
- * [puppeteerCoverage plugin] Fixed path already exists error by @seta-tuha.
1238
- * Fixed 'ERROR: ENAMETOOLONG' creating directory names in `run-multiple` with long config. By @artvinn
1239
- * [REST] Fixed url autocompletion combining base and relative paths by @LukoyanovE
1240
- * [Nightmare][Protractor] `uncheckOption` method introduced by @PeterNgTr
1241
- * [autoLogin plugin] Enable to use without `await` by @tsuemura
1242
- * [Puppeteer] Fixed `UnhandledPromiseRejectionWarning: "Execution context was destroyed...` by @adrielcodeco
1243
- * [WebDriver] Keep browser window dimensions when starting a new session by @spiroid
1244
- * Replace Ghekrin plceholders with values in files that combine a scenerio outline and table by @medtoure18.
1245
- * Added Documentation to [locate elements in React Native](https://codecept.io/mobile-react-native-locators) apps. By @DimGun.
1246
- * Adding optional `path` parameter to `bdd:snippets` command to append snippets to a specific file. By @cthorsen31.
1247
- * Added optional `output` parameter to `def` command by @LukoyanovE.
1248
- * [Puppeteer] Added `grabDataFromPerformanceTiming` by @PeterNgTr.
1249
- * axios updated to `0.19.0` by @SteveShaffer
1250
- * TypeScript defitions updated by @LukoyanovE. Added `secret` and `inject` function.
1251
-
1252
- ## 2.1.3
1253
-
1254
- * Fixed autoLogin plugin to inject `login` function
1255
- * Fixed using `toString()` in DataTablewhen it is defined by @tsuemura
1256
-
1257
- ## 2.1.2
1258
-
1259
- * Fixed `inject` to load objects recursively.
1260
- * Fixed TypeScript definitions for locators by @LukoyanovE
1261
- * **EXPERIMENTAL** [WebDriver] ReactJS locators support with webdriverio v5.8+:
1262
-
1263
- ```js
1264
- // locating React element by name, prop, state
1265
- I.click({ react: 'component-name', props: {}, state: {} });
1266
- I.seeElement({ react: 'component-name', props: {}, state: {} });
1267
- ```
1268
-
1269
- ## 2.1.1
1270
-
1271
- * Do not retry `within` and `session` calls inside `retryFailedStep` plugin. Fix by @tsuemura
1272
-
1273
- ## 2.1.0
1274
-
1275
- * Added global `inject()` function to require actor and page objects using dependency injection. Recommended to use in page objects, step definition files, support objects:
1276
-
1277
- ```js
1278
- // old way
1279
- const I = actor();
1280
- const myPage = require('../page/myPage');
1281
-
1282
- // new way
1283
- const { I, myPage } = inject();
1284
- ```
1285
-
1286
- * Added global `secret` function to fill in sensitive data. By @RohanHart:
1287
-
1288
- ```js
1289
- I.fillField('password', secret('123456'));
1290
- ```
1291
-
1292
- * [wdioPlugin](https://codecept.io/plugins/#wdio) Added a plugin to **support webdriverio services** including *selenium-standalone*, *sauce*, *browserstack*, etc. **Sponsored by @GSasu**
1293
- * [Appium] Fixed `swipe*` methods by @PeterNgTr
1294
- * BDD Gherkin Improvements:
1295
- * Implemented `run-multiple` for feature files. **Sponsored by @GSasu**
1296
- * Added `--features` and `--tests` options to `run-multiple`. **Sponsored by @GSasu**
1297
- * Implemented `Before` and `After` hooks in [step definitions](https://codecept.io/bdd#before)
1298
- * Fixed running tests by absolute path. By @batalov.
1299
- * Enabled the adding screenshot to failed test for moch-junit-reporter by @PeterNgTr.
1300
- * [Puppeteer] Implemented `uncheckOption` and fixed behavior of `checkOption` by @aml2610
1301
- * [WebDriver] Fixed `seeTextEquals` on empty strings by @PeterNgTr
1302
- * [Puppeteer] Fixed launch with `browserWSEndpoint` config by @ngadiyak.
1303
- * [Puppeteer] Fixed switching back to main window in multi-session mode by @davertmik.
1304
- * [autoLoginPlugin] Fixed using async functions for auto login by @nitschSB
1305
-
1306
- > This release was partly sponsored by @GSasu. Thanks for the support!
1307
- Do you want to improve this project? [Learn more about sponsorin CodeceptJS
1308
-
1309
-
1310
- ## 2.0.8
1311
-
1312
- * [Puppeteer] Added `downloadFile` action by @PeterNgTr.
1313
-
1314
- Use it with `FileSystem` helper to test availability of a file:
1315
- ```js
1316
- const fileName = await I.downloadFile('a.file-link');
1317
- I.amInPath('output');
1318
- I.seeFile(fileName);
1319
- ```
1320
- > Actions `amInPath` and `seeFile` are taken from [FileSystem](https://codecept.io/helpers/FileSystem) helper
1321
-
1322
- * [Puppeteer] Fixed `autoLogin` plugin with Puppeteer by @davertmik
1323
- * [WebDriver] `seeInField` should throw error if element has no value attrubite. By @PeterNgTr
1324
- * [WebDriver] Fixed `seeTextEquals` passes for any string if element is empty by @PeterNgTr.
1325
- * [WebDriver] Internal refctoring to use `el.isDisplayed` to match latest webdriverio implementation. Thanks to @LukoyanovE
1326
- * [allure plugin] Add ability enable [screenshotDiff plugin](https://github.com/allure-framework/allure2/blob/master/plugins/screen-diff-plugin/README.md) by @Vorobeyko
1327
- * [Appium] Fixed `locator.stringify` call by @LukoyanovE
1328
-
1329
- ## 2.0.7
1330
-
1331
- * [WebDriver][Protractor][Nightmare] `rightClick` method implemented (fixed) in a standard way. By @davertmik
1332
- * [WebDriver] Updated WebDriver API calls in helper. By @PeterNgTr
1333
- * [stepByStepReportPlugin] Added `screenshotsForAllureReport` config options to automatically attach screenshots to allure reports. By @PeterNgTr
1334
- * [allurePlugin] Added `addLabel` method by @Vorobeyko
1335
- * Locator Builder: fixed `withChild` and `withDescendant` to match deep nested siblings by @Vorobeyko.
1336
-
1337
- ## 2.0.6
1338
-
1339
- * Introduced [Custom Locator Strategies](https://codecept.io/locators#custom-locators).
1340
- * Added [Visual Testing Guide](https://codecept.io/visual) by @puneet0191 and @MitkoTschimev.
1341
- * [Puppeteer] [`puppeteerCoverage`](https://codecept.io/plugins#puppeteercoverage) plugin added to collect code coverage in JS. By @dvillarama
1342
- * Make override option in `run-multiple` to respect the generated overridden config by @kinyat
1343
- * Fixed deep merge for `container.append()`. Introduced `lodash.merge()`. By @Vorobeyko
1344
- * Fixed saving screenshot on Windows by
1345
- * Fix errors on using interactive shell with Allure plugin by tsuemura
1346
- * Fixed using dynamic injections with `Scenario().injectDependencies` by @tsemura
1347
- * [WebDriver][Puppeteer][Nightmare][Protractor] Fixed url protocol detection for non-http urls by @LukoyanovE
1348
- * [WebDriver] Enabled compatibility with `stepByStepReport` by @tsuemura
1349
- * [WebDriver] Fixed `grabHTMLFrom` to return innerHTML value by @Holorium. Fixed compatibility with WebDriverIO.
1350
- * [WebDriver] `grabHTMLFrom` to return one HTML vlaue for one element matched, array if multiple elements found by @davertmik.
1351
- * [Nightmare] Added `grabHTMLFrom` by @davertmik
1352
- * Fixed `bootstrapAll` and `teardownAll` launch with path as argument by @LukoyanovE
1353
- * Fixed `bootstrapAll` and `teardownAll` calls from exported object by @LukoyanovE
1354
- * [WebDriver] Added possibility to define conditional checks interval for `waitUntil` by @LukoyanovE
1355
- * Fixed storing current data in data driven tests in a test object. By @Vorobeyko
1356
- * [WebDriver] Fixed `hostname` config option overwrite when setting a cloud provider. By @LukoyanovE
1357
- * [WebDriver] `dragSlider` method implemented by @DavertMik
1358
- * [WebDrover] Fixed `scrollTo` to use new webdriverio API by @PeterNgTr
1359
- * Added Japanese translation file by @tsemura
1360
- * Added `Locator.withDescendant()` method to find an element which contains a descendant (child, grandchild) by @Vorobeyko
1361
- * [WebDriver] Fixed configuring capabilities for Selenoid and IE by @Vorobeyko
1362
- * [WebDriver] Restore original window size when taking full size screenshot by @tsuemura
1363
- * Enabled `throws()`,` fails()`, `retry()`, `timeout()`, `config()` functions for data driven tests. By @jjm409
1364
-
1365
- ## 2.0.5
1366
-
1367
- [Broken Release]
1368
-
1369
- ## 2.0.4
1370
-
1371
- * [WebDriver][Protractor][Nightmare][Puppeteer] `grabAttributeFrom` returns an array when multiple elements matched. By @PeterNgTr
1372
- * [autoLogin plugin] Fixed merging users config by @nealfennimore
1373
- * [autoDelay plugin] Added WebDriver to list of supported helpers by @mattin4d
1374
- * [Appium] Fixed using locators in `waitForElement`, `waitForVisible`, `waitForInvisible`. By @eduardofinotti
1375
- * [allure plugin] Add tags to allure reports by @Vorobeyko
1376
- * [allure plugin] Add skipped tests to allure reports by @Vorobeyko
1377
- * Fixed `Logged Test name | [object Object]` when used Data().Scenario(). By @Vorobeyko
1378
- * Fixed Data().only.Scenario() to run for all datasets. By @Vorobeyko
1379
- * [WebDriver] `attachFile` to work with hidden elements. Fixed in #1460 by @tsuemura
1380
-
1381
-
1382
-
1383
- ## 2.0.3
1384
-
1385
- * [**autoLogin plugin**](https://codecept.io/plugins#autologin) added. Allows to log in once and reuse browser session. When session expires - automatically logs in again. Can persist session between runs by saving cookies to file.
1386
- * Fixed `Maximum stack trace` issue in `retryFailedStep` plugin.
1387
- * Added `locate()` function into the interactive shell.
1388
- * [WebDriver] Disabled smartWait for interactive shell.
1389
- * [Appium] Updated methods to use for mobile locators
1390
- * `waitForElement`
1391
- * `waitForVisible`
1392
- * `waitForInvisible`
1393
- * Helper and page object generators no longer update config automatically. Please add your page objects and helpers manually.
1394
-
1395
- ## 2.0.2
1396
-
1397
- * [Puppeteer] Improved handling of connection with remote browser using Puppeteer by @martomo
1398
- * [WebDriver] Updated to webdriverio 5.2.2 by @martomo
1399
- * Interactive pause improvements by @davertmik
1400
- * Disable retryFailedStep plugin in in interactive mode
1401
- * Removes `Interface: parseInput` while in interactive pause
1402
- * [ApiDataFactory] Improvements
1403
- * added `fetchId` config option to override id retrieval from payload
1404
- * added `onRequest` config option to update request in realtime
1405
- * added `returnId` config option to return ids of created items instead of items themvelves
1406
- * added `headers` config option to override default headers.
1407
- * added a new chapter into [DataManagement](https://codecept.io/data#api-requests-using-browser-session)
1408
- * [REST] Added `onRequest` config option
1409
-
1410
-
1411
- ## 2.0.1
1412
-
1413
- * Fixed creating project with `codecept init`.
1414
- * Fixed error while installing webdriverio@5.
1415
- * Added code beautifier for generated configs.
1416
- * [WebDriver] Updated to webdriverio 5.1.0
1417
-
1418
- ## 2.0.0
1419
-
1420
- * [WebDriver] **Breaking Change.** Updated to webdriverio v5. New helper **WebDriver** helper introduced.
1421
-
1422
- * **Upgrade plan**:
1423
-
1424
- 1. Install latest webdriverio
1425
- ```
1426
- npm install webdriverio@5 --save
1427
- ```
1428
-
1429
- 2. Replace `WebDriverIO` => `WebDriver` helper name in config.
1430
- 3. Read [webdriverio changelog](https://github.com/webdriverio/webdriverio/blob/master/CHANGELOG.md). If you were using webdriver API in your helpers, upgrade accordingly.
1431
- 4. We made WebDriver helper to be compatible with old API so no additional changes required.
1432
-
1433
- > If you face issues using webdriverio v5 you can still use webdriverio 4.x and WebDriverIO helper. Make sure you have `webdriverio: ^4.0` installed.
1434
-
1435
- * Known issues: `attachFile` doesn't work with proxy server.
1436
-
1437
- * [Appium] **Breaking Change.** Updated to use webdriverio v5 as well. See upgrade plan ↑
1438
- * [REST] **Breaking Change.** Replaced `unirest` library with `axios`.
1439
-
1440
- * **Upgrade plan**:
1441
-
1442
- 1. Refer to [axios API](https://github.com/axios/axios).
1443
- 2. If you were using `unirest` requests/responses in your tests change them to axios format.
1444
- * **Breaking Change.** Generators support in tests removed. Use `async/await` in your tests
1445
- * **Using `codecept.conf.js` as default configuration format**
1446
- * Fixed "enametoolong" error when saving screenshots for data driven tests by @PeterNgTr
1447
- * Updated NodeJS to 10 in Docker image
1448
- * [Pupeteer] Add support to use WSEndpoint. Allows to execute tests remotely. [See #1350] by @gabrielcaires (https://github.com/codeceptjs/CodeceptJS/pull/1350)
1449
- * In interactive shell [Enter] goes to next step. Improvement by @PeterNgTr.
1450
- * `I.say` accepts second parameter as color to print colorful comments. Improvement by @PeterNgTr.
1451
-
1452
- ```js
1453
- I.say('This is red', 'red'); //red is used
1454
- I.say('This is blue', 'blue'); //blue is used
1455
- I.say('This is by default'); //cyan is used
1456
- ```
1457
- * Fixed allure reports for multi session testing by @PeterNgTr
1458
- * Fixed allure reports for hooks by @PeterNgTr
1459
-
1460
- ## 1.4.6
1461
-
1462
- * [Puppeteer] `dragSlider` action added by @PeterNgTr
1463
- * [Puppeteer] Fixed opening browser in shell mode by @allenhwkim
1464
- * [Puppeteer] Fixed making screenshot on additional sessions by @PeterNgTr. Fixes #1266
1465
- * Added `--invert` option to `run-multiple` command by @LukoyanovE
1466
- * Fixed steps in Allure reports by @PeterNgTr
1467
- * Add option `output` to customize output directory in [stepByStepReport plugin](https://codecept.io/plugins/#stepbystepreport). By @fpsthirty
1468
- * Changed type definition of PageObjects to get auto completion by @rhicu
1469
- * Fixed steps output for async/arrow functions in CLI by @LukoyanovE. See #1329
1470
-
1471
- ## 1.4.5
1472
-
1473
- * Add **require** param to main config. Allows to require Node modules before executing tests. By @LukoyanovE. For example:
1474
- * Use `ts-node/register` to register TypeScript parser
1475
- * Use `should` to register should-style assertions
1476
-
1477
- ```js
1478
- "require": ["ts-node/register", "should"]
1479
- ```
1480
-
1481
- * [WebDriverIO] Fix timeouts definition to be compatible with W3C drivers. By @LukoyanovE
1482
- * Fixed: exception in Before block w/ Mocha causes test not to report failure. See #1292 by @PeterNgTr
1483
- * Command `run-parallel` now accepts `--override` flag. Thanks to @ClemCB
1484
- * Fixed Allure report with Before/BeforeSuite/After/AfterSuite steps. By @PeterNgTr
1485
- * Added `RUN_MULTIPLE` env variable to [Docker config](https://codecept.io/docker/). Allows to run tests in parallel inside a container. Thanks to @PeterNgTr
1486
- * [Mochawesome] Fixed showing screenshot on failure. Fix by @PeterNgTr
1487
- * Fixed running tests filtering by tag names defined via `Scenario.tag()`
1488
-
1489
- ## 1.4.4
1490
-
1491
- * [autoDelay plugin](https://codecept.io/plugins/#autoDelay) added. Adds tiny delay before and after an action so the page could react to actions performed.
1492
- * [Puppeteer] improvements by @luismanuel001
1493
- * `click` no longer waits for navigation
1494
- * `clickLink` method added. Performs a click and waits for navigation.
1495
- * Bootstrap scripts to be started only for `run` command and ignored on `list`, `def`, etc. Fix by @LukoyanovE
1496
-
1497
-
1498
- ## 1.4.3
1499
-
1500
- * Groups renamed to Tags for compatibility with BDD layer
1501
- * Test and suite objects to contain tags property which can be accessed from internal API
1502
- * Fixed adding tags for Scenario Outline in BDD
1503
- * Added `tag()` method to ScenarioConfig and FeatureConfig:
1504
-
1505
- ```js
1506
- Scenario('update user profile', () => {
1507
- // test goes here
1508
- }).tag('@slow');
1509
- ```
1510
-
1511
- * Fixed attaching Allure screenshot on exception. Fix by @DevinWatson
1512
- * Improved type definitions for custom steps. By @Akxe
1513
- * Fixed setting `multiple.parallel.chunks` as environment variable in config. See #1238 by @ngadiyak
1514
-
1515
- ## 1.4.2
1516
-
1517
- * Fixed setting config for plugins (inclunding setting `outputDir` for allure) by @jplegoff
1518
-
1519
- ## 1.4.1
1520
-
1521
- * Added `plugins` option to `run-multiple`
1522
- * Minor output fixes
1523
- * Added Type Definition for Helper class by @Akxe
1524
- * Fixed extracing devault extension in generators by @Akxe
1525
-
1526
- ## 1.4.0
1527
-
1528
- * [**Allure Reporter Integration**](https://codecept.io/reports/#allure). Full inegration with Allure Server. Get nicely looking UI for tests,including steps, nested steps, and screenshots. Thanks **Natarajan Krishnamurthy @krish** for sponsoring this feature.
1529
- * [Plugins API introduced](https://codecept.io/hooks/#plugins). Create custom plugins for CodeceptJS by hooking into event dispatcher, and using promise recorder.
1530
- * **Official [CodeceptJS plugins](https://codecept.io/plugins) added**:
1531
- * **`stepByStepReport` - creates nicely looking report to see test execution as a slideshow**. Use this plugin to debug tests in headless environment without recording a video.
1532
- * `allure` - Allure reporter added as plugin.
1533
- * `screenshotOnFail` - saves screenshot on fail. Replaces similar functionality from helpers.
1534
- * `retryFailedStep` - to rerun each failed step.
1535
- * [Puppeteer] Fix `executeAsyncScript` unexpected token by @jonathanz
1536
- * Added `override` option to `run-multiple` command by @svarlet
1537
-
1538
- ## 1.3.3
1539
-
1540
- * Added `initGlobals()` function to API of [custom runner](https://codecept.io/hooks/#custom-runner).
1541
-
1542
- ## 1.3.2
1543
-
1544
- * Interactve Shell improvements for `pause()`
1545
- * Added `next` command for **step-by-step debug** when using `pause()`.
1546
- * Use `After(pause);` in a to start interactive console after last step.
1547
- * [Puppeteer] Updated to Puppeteer 1.6.0
1548
- * Added `waitForRequest` to wait for network request.
1549
- * Added `waitForResponse` to wait for network response.
1550
- * Improved TypeScript definitions to support custom steps and page objects. By @xt1
1551
- * Fixed XPath detection to accept XPath which starts with `./` by @BenoitZugmeyer
1552
-
1553
- ## 1.3.1
1554
-
1555
- * BDD-Gherkin: Fixed running async steps.
1556
- * [Puppeteer] Fixed process hanging for 30 seconds. Page loading timeout default via `getPageTimeout` set 0 seconds.
1557
- * [Puppeteer] Improved displaying client-side console messages in debug mode.
1558
- * [Puppeteer] Fixed closing sessions in `restart:false` mode for multi-session mode.
1559
- * [Protractor] Fixed `grabPopupText` to not throw error popup is not opened.
1560
- * [Protractor] Added info on using 'direct' Protractor driver to helper documentation by @xt1.
1561
- * [WebDriverIO] Added a list of all special keys to WebDriverIO helper by @davertmik and @xt1.
1562
- * Improved TypeScript definitions generator by @xt1
1563
-
1564
- ## 1.3.0
1565
-
1566
- * **Cucumber-style BDD. Introduced [Gherkin support](https://codecept.io/bdd). Thanks to [David Vins](https://github.com/dvins) and [Omedym](https://www.omedym.com) for sponsoring this feature**.
1567
-
1568
- Basic feature file:
1569
-
1570
- ```gherkin
1571
- Feature: Business rules
1572
- In order to achieve my goals
1573
- As a persona
1574
- I want to be able to interact with a system
1575
-
1576
- Scenario: do anything in my life
1577
- Given I need to open Google
1578
- ```
1579
-
1580
- Step definition:
1581
-
1582
- ```js
1583
- const I = actor();
1584
-
1585
- Given('I need to open Google', () => {
1586
- I.amOnPage('https://google.com');
1587
- });
1588
- ```
1589
-
1590
- Run it with `--features --steps` flag:
1591
-
1592
- ```
1593
- codeceptjs run --steps --features
1594
- ```
1595
-
1596
- ---
1597
-
1598
- * **Brekaing Chnage** `run` command now uses relative path + test name to run exactly one test file.
1599
-
1600
- Previous behavior (removed):
1601
- ```
1602
- codeceptjs run basic_test.js
1603
- ```
1604
- Current behavior (relative path to config + a test name)
1605
-
1606
- ```
1607
- codeceptjs run tests/basic_test.js
1608
- ```
1609
- This change allows using auto-completion when running a specific test.
1610
-
1611
- ---
1612
-
1613
- * Nested steps output enabled for page objects.
1614
- * to see high-level steps only run tests with `--steps` flag.
1615
- * to see PageObjects implementation run tests with `--debug`.
1616
- * PageObjects simplified to remove `_init()` extra method. Try updated generators and see [updated guide](https://codecept.io/pageobjects/#pageobject).
1617
- * [Puppeteer] [Multiple sessions](https://codecept.io/acceptance/#multiple-sessions) enabled. Requires Puppeteer >= 1.5
1618
- * [Puppeteer] Stability improvement. Waits for for `load` event on page load. This strategy can be changed in config:
1619
- * `waitForNavigation` config option introduced. Possible options: `load`, `domcontentloaded`, `networkidle0`, `networkidle2`. See [Puppeteer API](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitfornavigationoptions)
1620
- * `getPageTimeout` config option to set maximum navigation time in milliseconds. Default is 30 seconds.
1621
- * `waitForNavigation` method added. Explicitly waits for navigation to be finished.
1622
- * [WebDriverIO][Protractor][Puppeteer][Nightmare] **Possible BC** `grabTextFrom` unified. Return a text for single matched element and an array of texts for multiple elements.
1623
- * [Puppeteer]Fixed `resizeWindow` by @sergejkaravajnij
1624
- * [WebDriverIO][Protractor][Puppeteer][Nightmare] `waitForFunction` added. Waits for client-side JavaScript function to return true by @GREENpoint.
1625
- * [Puppeteer] `waitUntil` deprecated in favor of `waitForFunction`.
1626
- * Added `filter` function to DataTable.
1627
- * Send non-nested array of files to custom parallel execution chunking by @mikecbrant.
1628
- * Fixed invalid output directory path for run-multiple by @mikecbrant.
1629
- * [WebDriverIO] `waitUntil` timeout accepts time in seconds (as all other wait* functions). Fix by @truesrc.
1630
- * [Nightmare] Fixed `grabNumberOfVisibleElements` to work similarly to `seeElement`. Thx to @stefanschenk and Jinbo Jinboson.
1631
- * [Protractor] Fixed alert handling error with message 'no such alert' by @truesrc.
1632
-
1633
-
1634
- ## 1.2.1
1635
-
1636
- * Fixed running `I.retry()` on multiple steps.
1637
- * Fixed parallel execution wih chunks.
1638
- * [Puppeteer] Fixed `grabNumberOfVisibleElements` to return `0` instead of throwing error if no elements are found.
1639
-
1640
- ## 1.2.0
1641
-
1642
- * [WebDriverIO][Protractor][Multiple Sessions](https://codecept.io/acceptance/#multiple-sessions). Run several browser sessions in one test. Introduced `session` command, which opens additional browser window and closes it after a test.
1643
-
1644
- ```js
1645
- Scenario('run in different browsers', (I) => {
1646
- I.amOnPage('/hello');
1647
- I.see('Hello!');
1648
- session('john', () => {
1649
- I.amOnPage('/bye');
1650
- I.dontSee('Hello');
1651
- I.see('Bye');
1652
- });
1653
- I.see('Hello');
1654
- });
1655
- ```
1656
-
1657
- * [Parallel Execution](https://codecept.io/advanced/#parallel-execution) by @sveneisenschmidt. Run tests in parallel specifying number of chunks:
1658
-
1659
- ```js
1660
- "multiple": {
1661
- "parallel": {
1662
- // run in 2 processes
1663
- "chunks": 2,
1664
- // run all tests in chrome
1665
- "browsers": ["chrome"]
1666
- },
1667
- }
1668
- ```
1669
-
1670
- * [Locator Builder](https://codecept.io/locators). Write complex locators with simplest API combining CSS and XPath:
1671
-
1672
- ```js
1673
- // select 'Edit' link inside 2nd row of a table
1674
- locate('//table')
1675
- .find('tr')
1676
- .at(2)
1677
- .find('a')
1678
- .withText('Edit');
1679
- ```
1680
-
1681
- * [Dynamic configuration](https://codecept.io/advanced/#dynamic-configuration) to update helpers config per test or per suite.
1682
- * Added `event.test.finished` which fires synchronously for both failed and passed tests.
1683
- * [WebDriverIO][Protractor][Nightmare][Puppeteer] Full page screenshots on failure disabled by default. See [issue#1600. You can enabled them with `fullPageScreenshots: true`, however they may work unstable in Selenium.
1684
- * `within` blocks can return values. See [updated documentation](https://codecept.io/basics/#within).
1685
- * Removed doublt call to `_init` in helpers. Fixes issue #1036
1686
- * Added scenario and feature configuration via fluent API:
1687
-
1688
- ```js
1689
- Feature('checkout')
1690
- .timeout(3000)
1691
- .retry(2);
1692
-
1693
- Scenario('user can order in firefox', (I) => {
1694
- // see dynamic configuration
1695
- }).config({ browser: 'firefox' })
1696
- .timeout(20000);
1697
-
1698
- Scenario('this test should throw error', (I) => {
1699
- // I.amOnPage
1700
- }).throws(new Error);
1701
- ```
1702
-
1703
- ## 1.1.8
1704
-
1705
- * Fixed generating TypeScript definitions with `codeceptjs def`.
1706
- * Added Chinese translation ("zh-CN" and "zh-TW") by @TechQuery.
1707
- * Fixed running tests from a different folder specified by `-c` option.
1708
- * [Puppeteer] Added support for hash handling in URL by @gavoja.
1709
- * [Puppeteer] Fixed setting viewport size by @gavoja. See [Puppeteer issue](https://github.com/GoogleChrome/puppeteer/issues/1183)
1710
-
1711
-
1712
- ## 1.1.7
1713
-
1714
- * Docker Image updateed. [See updated reference](https://codecept.io/docker/):
1715
- * codeceptjs package is mounted as `/codecept` insde container
1716
- * tests directory is expected to be mounted as `/tests`
1717
- * `codeceptjs` global runner added (symlink to `/codecept/bin/codecept.js`)
1718
- * [Protractor] Functions added by @reubenmiller:
1719
- * `_locateCheckable (only available from other helpers)`
1720
- * `_locateClickable (only available from other helpers)`
1721
- * `_locateFields (only available from other helpers)`
1722
- * `acceptPopup`
1723
- * `cancelPopup`
1724
- * `dragAndDrop`
1725
- * `grabBrowserLogs`
1726
- * `grabCssPropertyFrom`
1727
- * `grabHTMLFrom`
1728
- * `grabNumberOfVisibleElements`
1729
- * `grabPageScrollPosition (new)`
1730
- * `rightClick`
1731
- * `scrollPageToBottom`
1732
- * `scrollPageToTop`
1733
- * `scrollTo`
1734
- * `seeAttributesOnElements`
1735
- * `seeCssPropertiesOnElements`
1736
- * `seeInPopup`
1737
- * `seeNumberOfVisibleElements`
1738
- * `switchTo`
1739
- * `waitForEnabled`
1740
- * `waitForValue`
1741
- * `waitInUrl`
1742
- * `waitNumberOfVisibleElements`
1743
- * `waitToHide`
1744
- * `waitUntil`
1745
- * `waitUrlEquals`
1746
- * [Nightmare] added:
1747
- * `grabPageScrollPosition` (new)
1748
- * `seeNumberOfVisibleElements`
1749
- * `waitToHide`
1750
- * [Puppeteer] added:
1751
- * `grabPageScrollPosition` (new)
1752
- * [WebDriverIO] added"
1753
- * `grabPageScrollPosition` (new)
1754
- * [Puppeteer] Fixed running wait* functions without setting `sec` parameter.
1755
- * [Puppeteer][Protractor] Fixed bug with I.click when using an object selector with the xpath property. By @reubenmiller
1756
- * [WebDriverIO][Protractor][Nightmare][Puppeteer] Fixed I.switchTo(0) and I.scrollTo(100, 100) api inconsistencies between helpers.
1757
- * [Protractor] Fixing bug when `seeAttributesOnElements` and `seeCssPropertiesOnElement` were incorrectly passing when the attributes/properties did not match by @reubenmiller
1758
- * [WebDriverIO] Use inbuilt dragAndDrop function (still doesn't work in Firefox). By @reubenmiller
1759
- * Support for Nightmare 3.0
1760
- * Enable glob patterns in `config.test` / `Codecept.loadTests` by @sveneisenschmidt
1761
- * Enable overriding of `config.tests` for `run-multiple` by @sveneisenschmidt
1762
-
1763
-
1764
- ## 1.1.6
1765
-
1766
- * Added support for `async I =>` functions syntax in Scenario by @APshenkin
1767
- * [WebDriverIO][Protractor][Puppeteer][Nightmare] `waitForInvisible` waits for element to hide or to be removed from page. By @reubenmiller
1768
- * [Protractor][Puppeteer][Nightmare] Added `grabCurrentUrl` function. By @reubenmiller
1769
- * [WebDriverIO] `grabBrowserUrl` deprecated in favor of `grabCurrentUrl` to unify the API.
1770
- * [Nightmare] Improved element visibility detection by @reubenmiller
1771
- * [Puppeteer] Fixing function calls when clearing the cookies and localstorage. By @reubenmiller
1772
- * [Puppeteer] Added `waitForEnabled`, `waitForValue` and `waitNumberOfVisibleElements` methods by @reubenmiller
1773
- * [WebDriverIO] Fixed `grabNumberOfVisibleElements` to return 0 when no visible elements are on page. By @michaltrunek
1774
- * Helpers API improvements (by @reubenmiller)
1775
- * `_passed` hook runs after a test passed successfully
1776
- * `_failed` hook runs on a failed test
1777
- * Hooks API. New events added by @reubenmiller:
1778
- * `event.all.before` - executed before all tests
1779
- * `event.all.after` - executed after all tests
1780
- * `event.multiple.before` - executed before all processes in run-multiple
1781
- * `event.multiple.after` - executed after all processes in run-multiple
1782
- * Multiple execution
1783
- * Allow `AfterSuite` and `After` test hooks to be defined after the first Scenario. By @reubenmiller
1784
- * [Nightmare] Prevent `I.amOnpage` navigation if the browser is already at the given url
1785
- * Multiple-Run: Added new `bootstrapAll` and `teardownAll` hooks to be executed before and after all processes
1786
- * `codeceptjs def` command accepts `--config` option. By @reubenmiller
1787
-
1788
- ## 1.1.5
1789
-
1790
- * [Puppeteer] Rerun steps failed due to "Cannot find context with specified id" Error.
1791
- * Added syntax to retry a single step:
1792
-
1793
- ```js
1794
- // retry action once on failure
1795
- I.retry().see('Hello');
1796
-
1797
- // retry action 3 times on failure
1798
- I.retry(3).see('Hello');
1799
-
1800
- // retry action 3 times waiting for 0.1 second before next try
1801
- I.retry({ retries: 3, minTimeout: 100 }).see('Hello');
1802
-
1803
- // retry action 3 times waiting no more than 3 seconds for last retry
1804
- I.retry({ retries: 3, maxTimeout: 3000 }).see('Hello');
1805
-
1806
- // retry 2 times if error with message 'Node not visible' happens
1807
- I.retry({
1808
- retries: 2,
1809
- when: err => err.message === 'Node not visible'
1810
- }).seeElement('#user');
1811
- ```
1812
-
1813
- * `Scenario().injectDependencies` added to dynamically add objects into DI container by @Apshenkin. See [Dependency Injection section in PageObjects](https://codecept.io/pageobjects/#dependency-injection).
1814
- * Fixed using async/await functions inside `within`
1815
- * [WebDriverIO][Protractor][Puppeteer][Nightmare] **`waitUntilExists` deprecated** in favor of `waitForElement`
1816
- * [WebDriverIO][Protractor] **`waitForStalenessOf` deprecated** in favor of `waitForDetached`
1817
- * [WebDriverIO][Protractor][Puppeteer][Nightmare] `waitForDetached` added
1818
- * [Nightmare] Added `I.seeNumberOfElements()` by @pmoncadaisla
1819
- * [Nightmare] Load blank page when starting nightmare so that the .evaluate function will work if _failed/saveScreenshot is triggered by @reubenmiller
1820
- * Fixed using plain arrays for data driven tests by @reubenmiller
1821
- * [Puppeteer] Use default tab instead of opening a new tab when starting the browser by @reubenmiller
1822
- * [Puppeteer] Added `grabNumberOfTabs` function by @reubenmiller
1823
- * [Puppeteer] Add ability to set user-agent by @abidhahmed
1824
- * [Puppeteer] Add keepCookies and keepBrowserState @abidhahmed
1825
- * [Puppeteer] Clear value attribute instead of innerhtml for TEXTAREA by @reubenmiller
1826
- * [REST] fixed sending string payload by @michaltrunek
1827
- * Fixed unhandled rejection in async/await tests by @APshenkin
1828
-
1829
-
1830
- ## 1.1.4
1831
-
1832
- * Removed `yarn` call in package.json
1833
- * Fixed `console.log` in Puppeteer by @othree
1834
- * [Appium] `runOnAndroid` and `runOnIOS` can receive a function to check capabilities dynamically:
1835
-
1836
- ```js
1837
- I.runOnAndroid(caps => caps.platformVersion >= 7, () => {
1838
- // run code only on Android 7+
1839
- });
1840
- ```
1841
-
1842
- ## 1.1.3
1843
-
1844
- * [Puppeteer] +25 Functions added by @reubenmiller
1845
- * `_locateCheckable`
1846
- * `_locateClickable`
1847
- * `_locateFields`
1848
- * `closeOtherTabs`
1849
- * `dragAndDrop`
1850
- * `grabBrowserLogs`
1851
- * `grabCssPropertyFrom`
1852
- * `grabHTMLFrom`
1853
- * `grabNumberOfVisibleElements`
1854
- * `grabSource`
1855
- * `rightClick`
1856
- * `scrollPageToBottom`
1857
- * `scrollPageToTop`
1858
- * `scrollTo`
1859
- * `seeAttributesOnElements`
1860
- * `seeCssPropertiesOnElements`
1861
- * `seeInField`
1862
- * `seeNumberOfElements`
1863
- * `seeNumberOfVisibleElements`
1864
- * `seeTextEquals`
1865
- * `seeTitleEquals`
1866
- * `switchTo`
1867
- * `waitForInvisible`
1868
- * `waitInUrl`
1869
- * `waitUrlEquals`
1870
- * [Protractor] +8 functions added by @reubenmiller
1871
- * `closeCurrentTab`
1872
- * `grabSource`
1873
- * `openNewTab`
1874
- * `seeNumberOfElements`
1875
- * `seeTextEquals`
1876
- * `seeTitleEquals`
1877
- * `switchToNextTab`
1878
- * `switchToPreviousTab`
1879
- * [Nightmare] `waitForInvisible` added by @reubenmiller
1880
- * [Puppeteer] Printing console.log information in debug mode.
1881
- * [Nightmare] Integrated with `nightmare-har-plugin` by mingfang. Added `enableHAR` option. Added HAR functions:
1882
- * `grabHAR`
1883
- * `saveHAR`
1884
- * `resetHAR`
1885
- * [WebDriverIO] Fixed execution stability for parallel requests with Chromedriver
1886
- * [WebDriverIO] Fixed resizeWindow when resizing to 'maximize' by @reubenmiller
1887
- * [WebDriverIO] Fixing resizing window to full screen when taking a screenshot by @reubenmiller
1888
-
1889
- ## 1.1.2
1890
-
1891
- * [Puppeteer] Upgraded to Puppeteer 1.0
1892
- * Added `grep` option to config to set default matching pattern for tests.
1893
- * [Puppeteer] Added `acceptPopup`, `cancelPopup`, `seeInPopup` and `grabPopupText` functions by @reubenmiller
1894
- * [Puppeteer] `within` iframe and nested iframe support added by @reubenmiller
1895
- * [REST] Added support for JSON objects since payload (as a JSON) was automatically converted into "URL query" type of parameter by @Kalostrinho
1896
- * [REST] Added `resetRequestHeaders` method by @Kalostrinho
1897
- * [REST] Added `followRedirect` option and `amFollowingRequestRedirects`/`amNotFollowingRequestRedirects` methods by @Kalostrinho
1898
- * [WebDriverIO] `uncheckOption` implemented by @brunobg
1899
- * [WebDriverIO] Added `grabBrowserUrl` by @Kalostrinho
1900
- * Add ability to require helpers from node_modules by @APshenkin
1901
- * Added `--profile` option to `run-multiple` command by @jamie-beck
1902
- * Custom output name for multiple browser run by @tfiwm
1903
- * Fixed passing data to scenarios by @KennyRules
1904
-
1905
- ## 1.1.1
1906
-
1907
- * [WebDriverIO] fixed `waitForInvisible` by @Kporal
1908
-
1909
- ## 1.1.0
1910
-
1911
- Major update to CodeceptJS. **NodeJS v 8.9.1** is now minimal Node version required.
1912
- This brings native async-await support to CodeceptJS. It is recommended to start using await for tests instead of generators:
1913
-
1914
- ```js
1915
- async () => {
1916
- I.amOnPage('/page');
1917
- const url = await I.grabTextFrom('.nextPage');
1918
- I.amOnPage(url);
1919
- }
1920
- ```
1921
-
1922
- Thanks to [@Apshenkin](https://github.com/apshenkin) for implementation. Also, most helpers were refactored to use async-await. This made our code simpler. We hope that this encourages more users to send pull requests!
1923
-
1924
- We also introduced strict ESLint policies for our codebase. Thanks to [@Galkin](https://github.com/galkin) for that.
1925
-
1926
- * **[Puppeteer] Helper introduced**. [Learn how to run tests headlessly with Google Chrome's Puppeteer](http://codecept.io/puppeteer/).
1927
- * [SeleniumWebdriver] Helper is deprecated, it is recommended to use Protractor with config option `angular: false` instead.
1928
- * [WebDriverIO] nested iframe support in the within block by @reubenmiller. Example:
1929
-
1930
- ```js
1931
- within({frame: ['#wrapperId', '[name=content]']}, () => {
1932
- I.click('Sign in!');
1933
- I.see('Email Address');
1934
- });
1935
- I.see('Nested Iframe test');
1936
- I.dontSee('Email Address');
1937
- });
1938
- ```
1939
- * [WebDriverIO] Support for `~` locator to find elements by `aria-label`. This behavior is similar as it is in Appium and helps testing cross-platform React apps. Example:
1940
-
1941
- ```html
1942
- <Text accessibilityLabel="foobar">
1943
- CodeceptJS is awesome
1944
- </Text>
1945
- ```
1946
- ↑ This element can be located with `~foobar` in WebDriverIO and Appium helpers. Thanks to @flyskywhy
1947
-
1948
- * Allow providing arbitrary objects in config includes by @rlewan
1949
- * [REST] Prevent from mutating default headers by @alexashley. See #789
1950
- * [REST] Fixed sending empty helpers with `haveRequestHeaders` in `sendPostRequest`. By @petrisorionel
1951
- * Fixed displaying undefined args in output by @APshenkin
1952
- * Fixed NaN instead of seconds in output by @APshenkin
1953
- * Add browser name to report file for `multiple-run` by @trollr
1954
- * Mocha updated to 4.x
1955
-
1956
-
1957
-
1958
- ## 1.0.3
1959
-
1960
- * [WebDriverIO][Protractor][Nightmare] method `waitUntilExists` implemented by @sabau
1961
- * Absolute path can be set for `output` dir by @APshenkin. Fix #571* Data table rows can be ignored by using `xadd`. By @APhenkin
1962
- * Added `Data(table).only.Scenario` to give ability to launch only Data tests. By @APhenkin
1963
- * Implemented `ElementNotFound` error by @BorisOsipov.
1964
- * Added TypeScript compiler / configs to check the JavaScript by @KennyRules
1965
- * [Nightmare] fix executeScript return value by @jploskonka
1966
- * [Nightmare] fixed: err.indexOf not a function when waitForText times out in nightmare by @joeypedicini92
1967
- * Fixed: Retries not working when using .only. By @APhenkin
1968
-
1969
-
1970
- ## 1.0.2
1971
-
1972
- * Introduced generators support in scenario hooks for `BeforeSuite`/`Before`/`AfterSuite`/`After`
1973
- * [ApiDataFactory] Fixed loading helper; `requireg` package included.
1974
- * Fix #485`run-multiple`: the first browser-resolution combination was be used in all configurations
1975
- * Fixed unique test names:
1976
- * Fixed #447 tests failed silently if they have the same name as other tests.
1977
- * Use uuid in screenshot names when `uniqueScreenshotNames: true`
1978
- * [Protractor] Fixed testing non-angular application. `amOutsideAngularApp` is executed before each step. Fixes #458* Added output for steps in hooks when they fail
1979
-
1980
- ## 1.0.1
1981
-
1982
- * Reporters improvements:
1983
- * Allows to execute [multiple reporters](http://codecept.io/advanced/#Multi-Reports)
1984
- * Added [Mochawesome](http://codecept.io/helpers/Mochawesome/) helper
1985
- * `addMochawesomeContext` method to add custom data to mochawesome reports
1986
- * Fixed Mochawesome context for failed screenshots.
1987
- * [WebDriverIO] improved click on context to match clickable element with a text inside. Fixes #647* [Nightmare] Added `refresh` function by @awhanks
1988
- * fixed `Unhandled promise rejection (rejection id: 1): Error: Unknown wait type: pageLoad`
1989
- * support for tests with retries in html report
1990
- * be sure that change window size and timeouts completes before test
1991
- * [Nightmare] Fixed `[Wrapped Error] "codeceptjs is not defined"`; Reinjectiing client scripts to a webpage on changes.
1992
- * [Nightmare] Added more detailed error messages for `Wait*` methods
1993
- * [Nightmare] Fixed adding screenshots to Mochawesome
1994
- * [Nightmare] Fix unique screenshots names in Nightmare
1995
- * Fixed CodeceptJS work with hooks in helpers to finish codeceptJS correctly if errors appears in helpers hooks
1996
- * Create a new session for next test If selenium grid error received
1997
- * Create screenshots for failed hooks from a Feature file
1998
- * Fixed `retries` option
1999
-
2000
- ## 1.0
2001
-
2002
- CodeceptJS hits first stable release. CodeceptJS provides a unified API for [web testing for Webdriverio](http://codecept.io/acceptance/), [Protractor](http://codecept.io/angular/), and [NightmareJS](http://codecept.io/nightmare/). Since 1.0 you can also **test mobile applications** in the similar manner with Appium.
2003
-
2004
- Sample test:
2005
-
2006
- ```js
2007
- I.seeAppIsInstalled("io.super.app");
2008
- I.click('~startUserRegistrationCD');
2009
- I.fillField('~email of the customer', 'Nothing special'));
2010
- I.see('davert@codecept.io', '~email of the customer'));
2011
- I.clearField('~email of the customer'));
2012
- I.dontSee('Nothing special', '~email of the customer'));
2013
- ```
2014
-
2015
- * Read [the Mobile Testing guide](http://codecept.io/mobile).
2016
- * Discover [Appium Helper](http://codecept.io/helpers/Appium/)
2017
-
2018
- ---
2019
-
2020
- We also introduced two new **helpers for data management**.
2021
- Using them you can easily prepare and cleanup data for your tests using public REST API.
2022
-
2023
- Sample test
2024
-
2025
- ```js
2026
- // create a user using data factories and REST API
2027
- I.have('user', { name: 'davert', password: '123456' });
2028
- // use it to login
2029
- I.amOnPage('/login');
2030
- I.fillField('login', 'davert');
2031
- I.fillField('password', '123456');
2032
- I.click('Login');
2033
- I.see('Hello, davert');
2034
- // user will be removed after the test
2035
- ```
2036
-
2037
- * Read [Data Management guide](http://codecept.io/data)
2038
- * [REST Helper](http://codecept.io/helpers/REST)
2039
- * [ApiDataFactory](http://codecept.io/helpers/ApiDataFactory/)
2040
-
2041
- ---
2042
-
2043
- Next notable feature is **[SmartWait](http://codecept.io/acceptance/#smartwait)** for WebDriverIO, Protractor, SeleniumWebdriver. When `smartwait` option is set, script will wait for extra milliseconds to locate an element before failing. This feature uses implicit waits of Selenium but turns them on only in applicable pieces. For instance, implicit waits are enabled for `seeElement` but disabled for `dontSeeElement`
2044
-
2045
- * Read more about [SmartWait](http://codecept.io/acceptance/#smartwait)
2046
-
2047
- ##### Changelog
2048
-
2049
- * Minimal NodeJS version is 6.11.1 LTS
2050
- * Use `within` command with generators.
2051
- * [Data Driven Tests](http://codecept.io/advanced/#data-driven-tests) introduced.
2052
- * Print execution time per step in `--debug` mode. #591 by @APshenkin
2053
- * [WebDriverIO][Protractor][Nightmare] Added `disableScreenshots` option to disable screenshots on fail by @Apshenkin
2054
- * [WebDriverIO][Protractor][Nightmare] Added `uniqueScreenshotNames` option to generate unique names for screenshots on failure by @Apshenkin
2055
- * [WebDriverIO][Nightmare] Fixed click on context; `click('text', '#el')` will throw exception if text is not found inside `#el`.
2056
- * [WebDriverIO][Protractor][SeleniumWebdriver] [SmartWait introduced](http://codecept.io/acceptance/#smartwait).
2057
- * [WebDriverIO][Protractor][Nightmare]Fixed `saveScreenshot` for PhantomJS, `fullPageScreenshots` option introduced by @HughZurname #549
2058
- * [Appium] helper introduced by @APshenkin
2059
- * [REST] helper introduced by @atrevino in #504
2060
- * [WebDriverIO][SeleniumWebdriver] Fixed "windowSize": "maximize" for Chrome 59+ version #560 by @APshenkin
2061
- * [Nightmare] Fixed restarting by @APshenkin #581
2062
- * [WebDriverIO] Methods added by @APshenkin:
2063
- * [grabCssPropertyFrom](http://codecept.io/helpers/WebDriverIO/#grabcsspropertyfrom)
2064
- * [seeTitleEquals](http://codecept.io/helpers/WebDriverIO/#seetitleequals)
2065
- * [seeTextEquals](http://codecept.io/helpers/WebDriverIO/#seetextequals)
2066
- * [seeCssPropertiesOnElements](http://codecept.io/helpers/WebDriverIO/#seecsspropertiesonelements)
2067
- * [seeAttributesOnElements](http://codecept.io/helpers/WebDriverIO/#seeattributesonelements)
2068
- * [grabNumberOfVisibleElements](http://codecept.io/helpers/WebDriverIO/#grabnumberofvisibleelements)
2069
- * [waitInUrl](http://codecept.io/helpers/WebDriverIO/#waitinurl)
2070
- * [waitUrlEquals](http://codecept.io/helpers/WebDriverIO/#waiturlequals)
2071
- * [waitForValue](http://codecept.io/helpers/WebDriverIO/#waitforvalue)
2072
- * [waitNumberOfVisibleElements](http://codecept.io/helpers/WebDriverIO/#waitnumberofvisibleelements)
2073
- * [switchToNextTab](http://codecept.io/helpers/WebDriverIO/#switchtonexttab)
2074
- * [switchToPreviousTab](http://codecept.io/helpers/WebDriverIO/#switchtoprevioustab)
2075
- * [closeCurrentTab](http://codecept.io/helpers/WebDriverIO/#closecurrenttab)
2076
- * [openNewTab](http://codecept.io/helpers/WebDriverIO/#opennewtab)
2077
- * [refreshPage](http://codecept.io/helpers/WebDriverIO/#refreshpage)
2078
- * [scrollPageToBottom](http://codecept.io/helpers/WebDriverIO/#scrollpagetobottom)
2079
- * [scrollPageToTop](http://codecept.io/helpers/WebDriverIO/#scrollpagetotop)
2080
- * [grabBrowserLogs](http://codecept.io/helpers/WebDriverIO/#grabbrowserlogs)
2081
- * Use mkdirp to create output directory. #592 by @vkramskikh
2082
- * [WebDriverIO] Fixed `seeNumberOfVisibleElements` by @BorisOsipov #574
2083
- * Lots of fixes for promise chain by @APshenkin #568
2084
- * Fix #543- After block not properly executed if Scenario fails
2085
- * Expected behavior in promise chains: `_beforeSuite` hooks from helpers -> `BeforeSuite` from test -> `_before` hooks from helpers -> `Before` from test - > Test steps -> `_failed` hooks from helpers (if test failed) -> `After` from test -> `_after` hooks from helpers -> `AfterSuite` from test -> `_afterSuite` hook from helpers.
2086
- * if during test we got errors from any hook (in test or in helper) - stop complete this suite and go to another
2087
- * if during test we got error from Selenium server - stop complete this suite and go to another
2088
- * [WebDriverIO][Protractor] if `restart` option is false - close all tabs expect one in `_after`.
2089
- * Complete `_after`, `_afterSuite` hooks even After/AfterSuite from test was failed
2090
- * Don't close browser between suites, when `restart` option is false. We should start browser only one time and close it only after all tests.
2091
- * Close tabs and clear local storage, if `keepCookies` flag is enabled
2092
- * Fix TypeError when using babel-node or ts-node on node.js 7+ #586 by @vkramskikh
2093
- * [Nightmare] fixed usage of `_locate`
2094
-
2095
- Special thanks to **Andrey Pshenkin** for his work on this release and the major improvements.
2096
-
2097
- ## 0.6.3
2098
-
2099
- * Errors are printed in non-verbose mode. Shows "Selenium not started" and other important errors.
2100
- * Allowed to set custom test options:
2101
-
2102
- ```js
2103
- Scenario('My scenario', { build_id: 123, type: 'slow' }, function (I)
2104
- ```
2105
- those options can be accessed as `opts` property inside a `test` object. Can be used in custom listeners.
2106
-
2107
- * Added `docs` directory to a package.
2108
- * [WebDriverIO][Protractor][SeleniumWebdriver] Bugfix: cleaning session when `restart: false` by @tfiwm #519
2109
- * [WebDriverIO][Protractor][Nightmare] Added second parameter to `saveScreenshot` to allow a full page screenshot. By @HughZurname
2110
- * Added suite object to `suite.before` and `suite.after` events by @implico. #496
2111
-
2112
- ## 0.6.2
2113
-
2114
- * Added `config` object to [public API](http://codecept.io/hooks/#api)
2115
- * Extended `index.js` to include `actor` and `helpers`, so they could be required:
2116
-
2117
- ```js
2118
- const actor = require('codeceptjs').actor;
2119
- ```
2120
-
2121
- * Added [example for creating custom runner](http://codecept.io/hooks/#custom-runner) with public API.
2122
- * run command to create `output` directory if it doesn't exist
2123
- * [Protractor] fixed loading globally installed Protractor
2124
- * run-multiple command improvements:
2125
- * create output directories for each process
2126
- * print process ids in output
2127
-
2128
- ## 0.6.1
2129
-
2130
- * Fixed loading hooks
2131
-
2132
- ## 0.6.0
2133
-
2134
- Major release with extension API and parallel execution.
2135
-
2136
- * **Breaking** Removed path argument from `run`. To specify path other than current directory use `--config` or `-c` option:
2137
-
2138
- Instead of: `codeceptjs run tests` use:
2139
-
2140
- ```
2141
- # load config and run from tests directory
2142
- codeceptjs run -c tests/
2143
-
2144
- # or load codecept.json from tests directory
2145
- codeceptjs run -c tests/codecept.json
2146
-
2147
- # run users_test.js inside tests directory
2148
- codeceptjs run users_test.js -c tests
2149
- ```
2150
-
2151
- * **Command `multiple-run` added**, to execute tests in several browsers in parallel by @APshenkin and @davertmik. [See documentation](http://codecept.io/advanced/#multiple-execution).
2152
- * **Hooks API added to extend CodeceptJS** with custom listeners and plugins. [See documentation](http://codecept.io/hooks/#hooks_1).
2153
- * [Nightmare][WebDriverIO] `within` can work with iframes by @imvetri. [See documentation](http://codecept.io/acceptance/#iframes).
2154
- * [WebDriverIO][SeleniumWebdriver][Protractor] Default browser changed to `chrome`
2155
- * [Nightmare] Fixed globally locating `nightmare-upload`.
2156
- * [WebDriverIO] added `seeNumberOfVisibleElements` method by @elarouche.
2157
- * Exit with non-zero code if init throws an error by @rincedd
2158
- * New guides published:
2159
- * [Installation](http://codecept.io/installation/)
2160
- * [Hooks](http://codecept.io/hooks/)
2161
- * [Advanced Usage](http://codecept.io/advanced/)
2162
- * Meta packages published:
2163
- * [codecept-webdriverio](https://www.npmjs.com/package/codecept-webdriverio)
2164
- * [codecept-protractor](https://www.npmjs.com/package/codecept-protractor)
2165
- * [codecept-nightmare](https://www.npmjs.com/package/codecept-nightmare)
2166
-
2167
-
2168
- ## 0.5.1
2169
-
2170
- * [Polish translation](http://codecept.io/translation/#polish) added by @limes.
2171
- * Update process exit code so that mocha saves reports before exit by @romanovma.
2172
- * [Nightmare] fixed `getAttributeFrom` for custom attributes by @robrkerr
2173
- * [Nightmare] Fixed *UnhandledPromiseRejectionWarning error* when selecting the dropdown using `selectOption` by @robrkerr. [Se PR.
2174
- * [Protractor] fixed `pressKey` method by @romanovma
2175
-
2176
- ## 0.5.0
2177
-
2178
- * Protractor ^5.0.0 support (while keeping ^4.0.9 compatibility)
2179
- * Fix 'fullTitle() is not a function' in exit.js by @hubidu. See #388.
2180
- * [Nightmare] Fix for `waitTimeout` by @HughZurname. See #391. Resolves #236* Dockerized CodeceptJS setup by @artiomnist. [See reference](https://github.com/codeceptjs/CodeceptJS/blob/master/docker/README.md)
2181
-
2182
- ## 0.4.16
2183
-
2184
- * Fixed steps output synchronization (regression since 0.4.14).
2185
- * [WebDriverIO][Protractor][SeleniumWebdriver][Nightmare] added `keepCookies` option to keep cookies between tests with `restart: false`.
2186
- * [Protractor] added `waitForTimeout` config option to set default waiting time for all wait* functions.
2187
- * Fixed `_test` hook for helpers by @cjhille.
2188
-
2189
- ## 0.4.15
2190
-
2191
- * Fixed regression in recorder sessions: `oldpromise is not defined`.
2192
-
2193
- ## 0.4.14
2194
-
2195
- * `_beforeStep` and `_afterStep` hooks in helpers are synchronized. Allows to perform additional actions between steps.
2196
-
2197
- Example: fail if JS error occur in custom helper using WebdriverIO:
2198
-
2199
- ```js
2200
- _before() {
2201
- this.err = null;
2202
- this.helpers['WebDriverIO'].browser.on('error', (e) => this.err = e);
2203
- }
2204
-
2205
- _afterStep() {
2206
- if (this.err) throw new Error('Browser JS error '+this.err);
2207
- }
2208
- ```
2209
-
2210
- Example: fail if JS error occur in custom helper using Nightmare:
2211
-
2212
- ```js
2213
- _before() {
2214
- this.err = null;
2215
- this.helpers['Nightmare'].browser.on('page', (type, message, stack) => {
2216
- this.err = `${message} ${stack}`;
2217
- });
2218
- }
2219
-
2220
- _afterStep() {
2221
- if (this.err) throw new Error('Browser JS error '+this.err);
2222
- }
2223
- ```
2224
-
2225
- * Fixed `codecept list` and `codecept def` commands.
2226
- * Added `I.say` method to print arbitrary comments.
2227
-
2228
- ```js
2229
- I.say('I am going to publish post');
2230
- I.say('I enter title and body');
2231
- I.say('I expect post is visible on site');
2232
- ```
2233
-
2234
- * [Nightmare] `restart` option added. `restart: false` allows to run all tests in a single window, disabled by default. By @nairvijays99
2235
- * [Nightmare] Fixed `resizeWindow` command.
2236
- * [Protractor][SeleniumWebdriver] added `windowSize` config option to resize window on start.
2237
- * Fixed "Scenario.skip causes 'Cannot read property retries of undefined'" by @MasterOfPoppets
2238
- * Fixed providing absolute paths for tests in config by @lennym
2239
-
2240
- ## 0.4.13
2241
-
2242
- * Added **retries** option `Feature` and `Scenario` to rerun fragile tests:
2243
-
2244
- ```js
2245
- Feature('Complex JS Stuff', {retries: 3});
2246
-
2247
- Scenario('Not that complex', {retries: 1}, (I) => {
2248
- // test goes here
2249
- });
2250
- ```
2251
-
2252
- * Added **timeout** option `Feature` and `Scenario` to specify timeout.
2253
-
2254
- ```js
2255
- Feature('Complex JS Stuff', {timeout: 5000});
2256
-
2257
- Scenario('Not that complex', {timeout: 1000}, (I) => {
2258
- // test goes here
2259
- });
2260
- ```
2261
-
2262
- * [WebDriverIO] Added `uniqueScreenshotNames` option to set unique screenshot names for failed tests. By @APshenkin. See #299
2263
- * [WebDriverIO] `clearField` method improved to accept name/label locators and throw errors.
2264
- * [Nightmare][SeleniumWebdriver][Protractor] `clearField` method added.
2265
- * [Nightmare] Fixed `waitForElement`, and `waitForVisible` methods.
2266
- * [Nightmare] Fixed `resizeWindow` by @norisk-it
2267
- * Added italian [translation](http://codecept.io/translation/#italian).
2268
-
2269
- ## 0.4.12
2270
-
2271
- * Bootstrap / Teardown improved with [Hooks](http://codecept.io/configuration/#hooks). Various options for setup/teardown provided.
2272
- * Added `--override` or `-o` option for runner to dynamically override configs. Valid JSON should be passed:
2273
-
2274
- ```
2275
- codeceptjs run -o '{ "bootstrap": "bootstrap.js"}'
2276
- codeceptjs run -o '{ "helpers": {"WebDriverIO": {"browser": "chrome"}}}'
2277
- ```
2278
-
2279
- * Added [regression tests](https://github.com/codeceptjs/CodeceptJS/tree/master/test/runner) for codeceptjs tests runner.
2280
-
2281
- ## 0.4.11
2282
-
2283
- * Fixed regression in 0.4.10
2284
- * Added `bootstrap`/`teardown` config options to accept functions as parameters by @pscanf. See updated [config reference](http://codecept.io/configuration/) #319
2285
-
2286
- ## 0.4.10
2287
-
2288
- * [Protractor] Protrctor 4.0.12+ support.
2289
- * Enabled async bootstrap file by @abachar. Use inside `bootstrap.js`:
2290
-
2291
- ```js
2292
- module.exports = function(done) {
2293
- // async instructions
2294
- // call done() to continue execution
2295
- // otherwise call done('error description')
2296
- }
2297
- ```
2298
-
2299
- * Changed 'pending' to 'skipped' in reports by @timja-kainos. See #315
2300
-
2301
- ## 0.4.9
2302
-
2303
- * [SeleniumWebdriver][Protractor][WebDriverIO][Nightmare] fixed `executeScript`, `executeAsyncScript` to work and return values.
2304
- * [Protractor][SeleniumWebdriver][WebDriverIO] Added `waitForInvisible` and `waitForStalenessOf` methods by @Nighthawk14.
2305
- * Added `--config` option to `codeceptjs run` to manually specify config file by @cnworks
2306
- * [Protractor] Simplified behavior of `amOutsideAngularApp` by using `ignoreSynchronization`. Fixes #278
2307
- * Set exit code to 1 when test fails at `Before`/`After` hooks. Fixes #279
2308
-
2309
-
2310
- ## 0.4.8
2311
-
2312
- * [Protractor][SeleniumWebdriver][Nightmare] added `moveCursorTo` method.
2313
- * [Protractor][SeleniumWebdriver][WebDriverIO] Added `manualStart` option to start browser manually in the beginning of test. By @cnworks. [PR#250
2314
- * Fixed `codeceptjs init` to work with nested directories and file masks.
2315
- * Fixed `codeceptjs gt` to generate test with proper file name suffix. By @Zougi.
2316
- * [Nightmare] Fixed: Error is thrown when clicking on element which can't be locate. By @davetmik
2317
- * [WebDriverIO] Fixed `attachFile` for file upload. By @giuband and @davetmik
2318
- * [WebDriverIO] Add support for timeouts in config and with `defineTimeouts` method. By @easternbloc #258 and #267 by @davetmik
2319
- * Fixed hanging of CodeceptJS when error is thrown by event dispatcher. Fix by @Zougi and @davetmik
2320
-
2321
-
2322
- ## 0.4.7
2323
-
2324
- * Improved docs for `BeforeSuite`; fixed its usage with `restart: false` option by @APshenkin.
2325
- * Added `Nightmare` to list of available helpers on `init`.
2326
- * [Nightmare] Removed double `resizeWindow` implementation.
2327
-
2328
- ## 0.4.6
2329
-
2330
- * Added `BeforeSuite` and `AfterSuite` hooks to scenario by @APshenkin. See [updated documentation](http://codecept.io/basics/#beforesuite)
2331
-
2332
- ## 0.4.5
2333
-
2334
- * Fixed running `codecept def` command by @jankaspar
2335
- * [Protractor][SeleniumWebdriver] Added support for special keys in `pressKey` method. Fixes #216
2336
-
2337
- ## 0.4.4
2338
-
2339
- * Interactive shell fixed. Start it by running `codeceptjs shell`
2340
- * Added `--profile` option to `shell` command to use dynamic configuration.
2341
- * Added `--verbose` option to `shell` command for most complete output.
2342
-
2343
- ## 0.4.3
2344
-
2345
- * [Protractor] Regression fixed to ^4.0.0 support
2346
- * Translations included into package.
2347
- * `teardown` option added to config (opposite to `bootstrap`), expects a JS file to be executed after tests stop.
2348
- * [Configuration](http://codecept.io/configuration/) can be set via JavaScript file `codecept.conf.js` instead of `codecept.json`. It should export `config` object:
2349
-
2350
- ```js
2351
- // inside codecept.conf.js
2352
- exports.config = {
2353
- // contents of codecept.js
2354
- }
2355
- ```
2356
- * Added `--profile` option to pass its value to `codecept.conf.js` as `process.profile` for [dynamic configuration](http://codecept.io/configuration#dynamic-configuration).
2357
- * Documentation for [StepObjects, PageFragments](http://codecept.io/pageobjects#PageFragments) updated.
2358
- * Documentation for [Configuration](http://codecept.io/configuration/) added.
2359
-
2360
- ## 0.4.2
2361
-
2362
- * Added ability to localize tests with translation #189. Thanks to @abner
2363
- * [Translation] ru-RU translation added.
2364
- * [Translation] pt-BR translation added.
2365
- * [Protractor] Protractor 4.0.4 compatibility.
2366
- * [WebDriverIO][SeleniumWebdriver][Protractor] Fixed single browser session mode for `restart: false`
2367
- * Fixed using of 3rd party reporters (xunit, mocha-junit-reporter, mochawesome). Added guide.
2368
- * Documentation for [Translation](http://codecept.io/translation/) added.
2369
- * Documentation for [Reports](http://codecept.io/reports/) added.
2370
-
2371
- ## 0.4.1
2372
-
2373
- * Added custom steps to step definition list. See #174 by @jayS-de
2374
- * [WebDriverIO] Fixed using `waitForTimeout` option by @stephane-ruhlmann. See #178
2375
-
2376
- ## 0.4.0
2377
-
2378
- * **[Nightmare](http://codecept.io/nightmare) Helper** added for faster web testing.
2379
- * [Protractor][SeleniumWebdriver][WebDriverIO] added `restart: false` option to reuse one browser between tests (improves speed).
2380
- * **Protractor 4.0** compatibility. Please upgrade Protractor library.
2381
- * Added `--verbose` option for `run` command to log and print global promise and events.
2382
- * Fixed errors with shutting down and cleanup.
2383
- * Fixed starting interactive shell with `codeceptjs shell`.
2384
- * Fixed handling of failures inside within block
2385
-
2386
- ## 0.3.5
2387
-
2388
- * Introduced IDE autocompletion support for Visual Studio Code and others. Added command for generating TypeScript definitions for `I` object. Use it as
2389
-
2390
- ```
2391
- codeceptjs def
2392
- ```
2393
-
2394
- to generate steps definition file and include it into tests by reference. By @kaflan
2395
-
2396
- ## 0.3.4
2397
-
2398
- * [Protractor] version 3.3.0 comptaibility, NPM 3 compatibility. Please update Protractor!
2399
- * allows using absolute path for helpers, output, in config and in command line. By @denis-sokolov
2400
- * Fixes 'Cannot read property '1' of null in generate.js:44' by @seethislight
2401
-
2402
- ## 0.3.3
2403
-
2404
- **Fixed global installation**. CodeceptJS can now locate globally located modules.
2405
- CodeceptJS is also recommended for local installation.
2406
- Depending on installation type additional modules (webdriverio, protractor, ...) will be loaded either from local or from global path.
2407
-
2408
- ## 0.3.2
2409
-
2410
- * Added `codeceptjs list` command which shows all available methods of `I` object.
2411
- * [Protractor][SeleniumWebdriver] fixed closing browser instances
2412
- * [Protractor][SeleniumWebdriver] `doubleClick` method added
2413
- * [WebDriverIO][Protractor][SeleniumWebdriver] `doubleClick` method to locate clickable elements by text, `context` option added.
2414
- * Fixed using assert in generator without yields #89
2415
-
2416
- ## 0.3.1
2417
-
2418
- * Fixed `init` command
2419
-
2420
- ## 0.3.0
2421
-
2422
- **Breaking Change**: webdriverio package removed from dependencies list. You will need to install it manually after the upgrade.
2423
- Starting from 0.3.0 webdriverio is not the only backend for running selenium tests, so you are free to choose between Protractor, SeleniumWebdriver, and webdriverio and install them.
2424
-
2425
- * **[Protractor] helper added**. Now you can test AngularJS applications by using its official library within the unigied CodeceptJS API!
2426
- * **[SeleniumWebdriver] helper added**. You can switch to official JS bindings for Selenium.
2427
- * [WebDriverIO] **updated to webdriverio v 4.0**
2428
- * [WebDriverIO] `clearField` method added by @fabioel
2429
- * [WebDriverIO] added `dragAndDrop` by @fabioel
2430
- * [WebDriverIO] fixed `scrollTo` method by @sensone
2431
- * [WebDriverIO] fixed `windowSize: maximize` option in config
2432
- * [WebDriverIO] `seeElement` and `dontSeeElement` check element for visibility by @fabioel and @davertmik
2433
- * [WebDriverIO] `seeElementInDOM`, `dontSeeElementInDOM` added to check element exists on page.
2434
- * [WebDriverIO] fixed saving screenshots on failure. Fixes #70
2435
- * fixed `within` block doesn't end in output not #79
2436
-
2437
-
2438
- ## 0.2.8
2439
-
2440
- * [WebDriverIO] added `seeNumberOfElements` by @fabioel
2441
-
2442
- ## 0.2.7
2443
-
2444
- * process ends with exit code 1 on error or failure #49
2445
- * fixed registereing global Helper #57
2446
- * fixed handling error in within block #50
2447
-
2448
- ## 0.2.6
2449
-
2450
- * Fixed `done() was called multiple times`
2451
- * [WebDriverIO] added `waitToHide` method by @fabioel
2452
- * Added global `Helper` (alias `codecept_helper)`, object use for writing custom Helpers. Generator updated. Changes to #48
2453
-
2454
- ## 0.2.5
2455
-
2456
- * Fixed issues with using yield inside a test #45 #47 #43
2457
- * Fixed generating a custom helper. Helper class is now accessible with `codecept_helper` var. Fixes #48
2458
-
2459
- ## 0.2.4
2460
-
2461
- * Fixed accessing helpers from custom helper by @pim.
2462
-
2463
- ## 0.2.3
2464
-
2465
- * [WebDriverIO] fixed `seeInField` to work with single value elements like: input[type=text], textareas, and multiple: select, input[type=radio], input[type=checkbox]
2466
- * [WebDriverIO] fixed `pressKey`, key modifeiers (Control, Command, Alt, Shift) are released after the action
2467
-
2468
- ## 0.2.2
2469
-
2470
- Fixed generation of custom steps file and page objects.
2471
- Please replace `require('codeceptjs/actor')` to `actor` in your `custom_steps.js`.
2472
- Whenever you need to create `I` object (in page objects, custom steps, but not in tests) just call `actor()`;
2473
-
2474
- ## 0.2.0
2475
-
2476
- * **within** context hook added
2477
- * `--reporter` option supported
2478
- * [WebDriverIO] added features and methods:
2479
- - elements: `seeElement`, ...
2480
- - popups: `acceptPopup`, `cancelPopup`, `seeInPopup`,...
2481
- - navigation: `moveCursorTo`, `scrollTo`
2482
- - saving screenshots on failure; `saveScreenshot`
2483
- - cookies: `setCookie`, `seeCookie`, ...
2484
- - source: `seeInSource`
2485
- - form: `seeCheckboxIsChecked`, `selectOption` to support multiple selects
2486
- - keyboard: `appendField`, `pressKey`
2487
- - mouse: `rightClick`
2488
- * tests added
2489
- * [WebDriverIO] proxy configuration added by @petehouston
2490
- * [WebDriverIO] fixed `waitForText` method by @roadhump. Fixes #11
2491
- * Fixed creating output dir when it already exists on init by @alfirin
2492
- * Fixed loading of custom helpers