codeceptjs 3.3.1 β†’ 3.3.4

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 (126) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +4 -25
  3. package/docs/api.md +4 -0
  4. package/docs/basics.md +2 -0
  5. package/docs/build/Appium.js +18 -28
  6. package/docs/build/JSONResponse.js +44 -3
  7. package/docs/build/Nightmare.js +53 -53
  8. package/docs/build/Playwright.js +95 -103
  9. package/docs/build/Protractor.js +66 -66
  10. package/docs/build/Puppeteer.js +74 -74
  11. package/docs/build/REST.js +8 -4
  12. package/docs/build/TestCafe.js +53 -53
  13. package/docs/build/WebDriver.js +84 -86
  14. package/docs/changelog.md +49 -0
  15. package/docs/helpers/Appium.md +212 -268
  16. package/docs/helpers/JSONResponse.md +24 -0
  17. package/docs/helpers/Nightmare.md +92 -141
  18. package/docs/helpers/Playwright.md +302 -413
  19. package/docs/helpers/Puppeteer.md +171 -231
  20. package/docs/helpers/REST.md +2 -0
  21. package/docs/helpers/TestCafe.md +125 -174
  22. package/docs/helpers/WebDriver.md +184 -247
  23. package/docs/plugins.md +41 -1
  24. package/docs/secrets.md +30 -0
  25. package/docs/webapi/amOnPage.mustache +1 -1
  26. package/docs/webapi/appendField.mustache +1 -1
  27. package/docs/webapi/attachFile.mustache +1 -1
  28. package/docs/webapi/checkOption.mustache +1 -1
  29. package/docs/webapi/clearCookie.mustache +1 -1
  30. package/docs/webapi/clearField.mustache +1 -1
  31. package/docs/webapi/click.mustache +1 -1
  32. package/docs/webapi/clickLink.mustache +1 -1
  33. package/docs/webapi/closeCurrentTab.mustache +1 -1
  34. package/docs/webapi/closeOtherTabs.mustache +1 -1
  35. package/docs/webapi/dontSee.mustache +1 -1
  36. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
  37. package/docs/webapi/dontSeeCookie.mustache +1 -1
  38. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
  39. package/docs/webapi/dontSeeElement.mustache +1 -1
  40. package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
  41. package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
  42. package/docs/webapi/dontSeeInField.mustache +1 -1
  43. package/docs/webapi/dontSeeInSource.mustache +1 -1
  44. package/docs/webapi/dontSeeInTitle.mustache +1 -1
  45. package/docs/webapi/doubleClick.mustache +1 -1
  46. package/docs/webapi/downloadFile.mustache +1 -1
  47. package/docs/webapi/dragAndDrop.mustache +1 -1
  48. package/docs/webapi/dragSlider.mustache +1 -1
  49. package/docs/webapi/executeAsyncScript.mustache +1 -1
  50. package/docs/webapi/executeScript.mustache +1 -1
  51. package/docs/webapi/fillField.mustache +1 -1
  52. package/docs/webapi/forceClick.mustache +1 -1
  53. package/docs/webapi/forceRightClick.mustache +1 -1
  54. package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
  55. package/docs/webapi/moveCursorTo.mustache +1 -1
  56. package/docs/webapi/openNewTab.mustache +1 -1
  57. package/docs/webapi/pressKey.mustache +1 -1
  58. package/docs/webapi/pressKeyDown.mustache +1 -1
  59. package/docs/webapi/pressKeyUp.mustache +1 -1
  60. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
  61. package/docs/webapi/refreshPage.mustache +1 -1
  62. package/docs/webapi/resizeWindow.mustache +1 -1
  63. package/docs/webapi/rightClick.mustache +1 -1
  64. package/docs/webapi/saveElementScreenshot.mustache +1 -1
  65. package/docs/webapi/saveScreenshot.mustache +1 -1
  66. package/docs/webapi/say.mustache +1 -1
  67. package/docs/webapi/scrollIntoView.mustache +1 -1
  68. package/docs/webapi/scrollPageToBottom.mustache +1 -1
  69. package/docs/webapi/scrollPageToTop.mustache +1 -1
  70. package/docs/webapi/scrollTo.mustache +1 -1
  71. package/docs/webapi/see.mustache +1 -1
  72. package/docs/webapi/seeAttributesOnElements.mustache +1 -1
  73. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
  74. package/docs/webapi/seeCookie.mustache +1 -1
  75. package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
  76. package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
  77. package/docs/webapi/seeElement.mustache +1 -1
  78. package/docs/webapi/seeElementInDOM.mustache +1 -1
  79. package/docs/webapi/seeInCurrentUrl.mustache +1 -1
  80. package/docs/webapi/seeInField.mustache +1 -1
  81. package/docs/webapi/seeInPopup.mustache +1 -1
  82. package/docs/webapi/seeInSource.mustache +1 -1
  83. package/docs/webapi/seeInTitle.mustache +1 -1
  84. package/docs/webapi/seeNumberOfElements.mustache +1 -1
  85. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
  86. package/docs/webapi/seeTextEquals.mustache +1 -1
  87. package/docs/webapi/seeTitleEquals.mustache +1 -1
  88. package/docs/webapi/selectOption.mustache +1 -1
  89. package/docs/webapi/setCookie.mustache +1 -1
  90. package/docs/webapi/setGeoLocation.mustache +1 -1
  91. package/docs/webapi/switchTo.mustache +1 -1
  92. package/docs/webapi/switchToNextTab.mustache +1 -1
  93. package/docs/webapi/switchToPreviousTab.mustache +1 -1
  94. package/docs/webapi/type.mustache +1 -1
  95. package/docs/webapi/uncheckOption.mustache +1 -1
  96. package/docs/webapi/wait.mustache +1 -1
  97. package/docs/webapi/waitForClickable.mustache +1 -1
  98. package/docs/webapi/waitForDetached.mustache +1 -1
  99. package/docs/webapi/waitForElement.mustache +1 -1
  100. package/docs/webapi/waitForEnabled.mustache +1 -1
  101. package/docs/webapi/waitForFunction.mustache +1 -1
  102. package/docs/webapi/waitForInvisible.mustache +1 -1
  103. package/docs/webapi/waitForText.mustache +1 -1
  104. package/docs/webapi/waitForValue.mustache +1 -1
  105. package/docs/webapi/waitForVisible.mustache +1 -1
  106. package/docs/webapi/waitInUrl.mustache +1 -1
  107. package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
  108. package/docs/webapi/waitToHide.mustache +1 -1
  109. package/docs/webapi/waitUrlEquals.mustache +1 -1
  110. package/lib/cli.js +1 -1
  111. package/lib/command/interactive.js +1 -1
  112. package/lib/command/run-workers.js +1 -1
  113. package/lib/command/workers/runTests.js +15 -0
  114. package/lib/helper/Appium.js +0 -10
  115. package/lib/helper/JSONResponse.js +44 -3
  116. package/lib/helper/Playwright.js +24 -32
  117. package/lib/helper/REST.js +8 -4
  118. package/lib/helper/WebDriver.js +5 -7
  119. package/lib/output.js +4 -0
  120. package/lib/plugin/customLocator.js +50 -3
  121. package/lib/plugin/retryFailedStep.js +1 -1
  122. package/lib/plugin/retryTo.js +1 -8
  123. package/lib/secret.js +30 -0
  124. package/lib/step.js +1 -1
  125. package/package.json +4 -4
  126. package/typings/types.d.ts +1016 -520
package/docs/changelog.md CHANGED
@@ -7,6 +7,55 @@ layout: Section
7
7
 
8
8
  # Releases
9
9
 
10
+ ## 3.3.4
11
+
12
+ * Added support for masking fields in objects via `secret` function:
13
+
14
+ ```js
15
+ I.sendPostRequest('/auth', secret({ name: 'jon', password: '123456' }, 'password'));
16
+ ```
17
+ * Added [a guide about using of `secret`](/secrets) function
18
+ * **[Appium]** Use `touchClick` when interacting with elements in iOS. See [#3317](https://github.com/codeceptjs/CodeceptJS/issues/3317) by **[mikk150](https://github.com/mikk150)**
19
+ * **[Playwright]** Added `cdpConnection` option to connect over CDP. See [#3309](https://github.com/codeceptjs/CodeceptJS/issues/3309) by **[Hmihaly](https://github.com/Hmihaly)**
20
+ * [customLocator plugin] Allowed to specify multiple attributes for custom locator. Thanks to **[aruiz-caritsqa](https://github.com/aruiz-caritsqa)**
21
+
22
+ ```js
23
+ plugins: {
24
+ customLocator: {
25
+ enabled: true,
26
+ prefix: '$',
27
+ attribute: ['data-qa', 'data-test'],
28
+ }
29
+ }
30
+ ```
31
+ * [retryTo plugin] Fixed [#3147](https://github.com/codeceptjs/CodeceptJS/issues/3147) using `pollInterval` option. See [#3351](https://github.com/codeceptjs/CodeceptJS/issues/3351) by **[cyonkee](https://github.com/cyonkee)**
32
+ * **[Playwright]** Fixed grabbing of browser console messages and window resize in new tab. Thanks to **[mirao](https://github.com/mirao)**
33
+ * **[REST]** Added `prettyPrintJson` option to print JSON in nice way by **[PeterNgTr](https://github.com/PeterNgTr)**
34
+ * **[JSONResponse]** Updated response validation to iterate over array items if response is array. Thanks to **[PeterNgTr](https://github.com/PeterNgTr)**
35
+
36
+ ```js
37
+ // response.data == [
38
+ // { user: { name: 'jon', email: 'jon@doe.com' } },
39
+ // { user: { name: 'matt', email: 'matt@doe.com' } },
40
+ //]
41
+
42
+ I.seeResponseContainsKeys(['user']);
43
+ I.seeResponseContainsJson({ user: { email: 'jon@doe.com' } });
44
+ I.seeResponseContainsJson({ user: { email: 'matt@doe.com' } });
45
+ I.dontSeeResponseContainsJson({ user: 2 });
46
+ ```
47
+
48
+ ## 3.3.3
49
+
50
+ * Fixed `DataCloneError: () => could not be cloned` when running data tests in run-workers
51
+ * πŸ‡ΊπŸ‡¦ Added #StandWithUkraine notice to CLI
52
+
53
+
54
+ ## 3.3.2
55
+
56
+ * **[REST]** Fixed override of headers/token in `haveRequestHeaders()` and `amBearerAuthenticated()`. See [#3304](https://github.com/codeceptjs/CodeceptJS/issues/3304) by **[mirao](https://github.com/mirao)**
57
+ * Reverted typings change introduced in [#3245](https://github.com/codeceptjs/CodeceptJS/issues/3245). [More details on this](https://twitter.com/CodeceptJS/status/1519725963856207873)
58
+
10
59
  ## 3.3.1
11
60
 
12
61
  πŸ›©οΈ Features: