codeceptjs 3.5.8 → 3.5.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/README.md +1 -1
  2. package/docs/build/Appium.js +18 -18
  3. package/docs/build/Nightmare.js +51 -52
  4. package/docs/build/Playwright.js +74 -75
  5. package/docs/build/Protractor.js +64 -65
  6. package/docs/build/Puppeteer.js +74 -75
  7. package/docs/build/TestCafe.js +54 -55
  8. package/docs/build/WebDriver.js +79 -80
  9. package/docs/changelog.md +1 -571
  10. package/docs/community-helpers.md +4 -8
  11. package/docs/examples.md +2 -8
  12. package/docs/helpers/Appium.md +18 -18
  13. package/docs/helpers/Nightmare.md +75 -77
  14. package/docs/helpers/Playwright.md +175 -177
  15. package/docs/helpers/Protractor.md +153 -155
  16. package/docs/helpers/Puppeteer.md +146 -148
  17. package/docs/helpers/TestCafe.md +124 -126
  18. package/docs/helpers/WebDriver.md +155 -157
  19. package/docs/webapi/amOnPage.mustache +1 -1
  20. package/docs/webapi/appendField.mustache +1 -1
  21. package/docs/webapi/attachFile.mustache +1 -1
  22. package/docs/webapi/blur.mustache +1 -1
  23. package/docs/webapi/checkOption.mustache +1 -1
  24. package/docs/webapi/clearCookie.mustache +1 -2
  25. package/docs/webapi/clearField.mustache +1 -1
  26. package/docs/webapi/click.mustache +1 -1
  27. package/docs/webapi/clickLink.mustache +1 -1
  28. package/docs/webapi/closeCurrentTab.mustache +1 -1
  29. package/docs/webapi/closeOtherTabs.mustache +1 -1
  30. package/docs/webapi/dontSee.mustache +1 -1
  31. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +1 -1
  32. package/docs/webapi/dontSeeCookie.mustache +1 -1
  33. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +1 -1
  34. package/docs/webapi/dontSeeElement.mustache +1 -1
  35. package/docs/webapi/dontSeeElementInDOM.mustache +1 -1
  36. package/docs/webapi/dontSeeInCurrentUrl.mustache +1 -1
  37. package/docs/webapi/dontSeeInField.mustache +1 -1
  38. package/docs/webapi/dontSeeInSource.mustache +1 -1
  39. package/docs/webapi/dontSeeInTitle.mustache +1 -1
  40. package/docs/webapi/doubleClick.mustache +1 -1
  41. package/docs/webapi/downloadFile.mustache +1 -1
  42. package/docs/webapi/dragAndDrop.mustache +1 -1
  43. package/docs/webapi/dragSlider.mustache +1 -1
  44. package/docs/webapi/fillField.mustache +1 -1
  45. package/docs/webapi/focus.mustache +1 -1
  46. package/docs/webapi/forceClick.mustache +1 -1
  47. package/docs/webapi/forceRightClick.mustache +1 -1
  48. package/docs/webapi/grabDataFromPerformanceTiming.mustache +1 -1
  49. package/docs/webapi/moveCursorTo.mustache +1 -1
  50. package/docs/webapi/openNewTab.mustache +1 -1
  51. package/docs/webapi/pressKey.mustache +1 -1
  52. package/docs/webapi/pressKeyDown.mustache +1 -1
  53. package/docs/webapi/pressKeyUp.mustache +1 -1
  54. package/docs/webapi/pressKeyWithKeyNormalization.mustache +1 -1
  55. package/docs/webapi/refreshPage.mustache +1 -1
  56. package/docs/webapi/resizeWindow.mustache +1 -1
  57. package/docs/webapi/rightClick.mustache +1 -1
  58. package/docs/webapi/saveElementScreenshot.mustache +1 -1
  59. package/docs/webapi/saveScreenshot.mustache +1 -1
  60. package/docs/webapi/say.mustache +1 -1
  61. package/docs/webapi/scrollIntoView.mustache +1 -1
  62. package/docs/webapi/scrollPageToBottom.mustache +1 -1
  63. package/docs/webapi/scrollPageToTop.mustache +1 -1
  64. package/docs/webapi/scrollTo.mustache +1 -1
  65. package/docs/webapi/see.mustache +1 -1
  66. package/docs/webapi/seeAttributesOnElements.mustache +1 -1
  67. package/docs/webapi/seeCheckboxIsChecked.mustache +1 -1
  68. package/docs/webapi/seeCookie.mustache +1 -1
  69. package/docs/webapi/seeCssPropertiesOnElements.mustache +1 -1
  70. package/docs/webapi/seeCurrentUrlEquals.mustache +1 -1
  71. package/docs/webapi/seeElement.mustache +1 -1
  72. package/docs/webapi/seeElementInDOM.mustache +1 -1
  73. package/docs/webapi/seeInCurrentUrl.mustache +1 -1
  74. package/docs/webapi/seeInField.mustache +1 -1
  75. package/docs/webapi/seeInPopup.mustache +1 -1
  76. package/docs/webapi/seeInSource.mustache +1 -1
  77. package/docs/webapi/seeInTitle.mustache +1 -1
  78. package/docs/webapi/seeNumberOfElements.mustache +1 -1
  79. package/docs/webapi/seeNumberOfVisibleElements.mustache +1 -1
  80. package/docs/webapi/seeTextEquals.mustache +1 -1
  81. package/docs/webapi/seeTitleEquals.mustache +1 -1
  82. package/docs/webapi/selectOption.mustache +1 -1
  83. package/docs/webapi/setCookie.mustache +1 -1
  84. package/docs/webapi/setGeoLocation.mustache +1 -1
  85. package/docs/webapi/switchTo.mustache +1 -1
  86. package/docs/webapi/switchToNextTab.mustache +1 -1
  87. package/docs/webapi/switchToPreviousTab.mustache +1 -1
  88. package/docs/webapi/type.mustache +1 -1
  89. package/docs/webapi/uncheckOption.mustache +1 -1
  90. package/docs/webapi/wait.mustache +1 -1
  91. package/docs/webapi/waitForClickable.mustache +1 -1
  92. package/docs/webapi/waitForDetached.mustache +1 -1
  93. package/docs/webapi/waitForElement.mustache +1 -1
  94. package/docs/webapi/waitForEnabled.mustache +1 -1
  95. package/docs/webapi/waitForFunction.mustache +1 -1
  96. package/docs/webapi/waitForInvisible.mustache +1 -1
  97. package/docs/webapi/waitForText.mustache +1 -1
  98. package/docs/webapi/waitForValue.mustache +1 -1
  99. package/docs/webapi/waitForVisible.mustache +1 -1
  100. package/docs/webapi/waitInUrl.mustache +1 -1
  101. package/docs/webapi/waitNumberOfVisibleElements.mustache +1 -1
  102. package/docs/webapi/waitToHide.mustache +1 -1
  103. package/docs/webapi/waitUrlEquals.mustache +1 -1
  104. package/lib/helper/Playwright.js +2 -2
  105. package/package.json +1 -1
  106. package/typings/promiseBasedTypes.d.ts +418 -1007
  107. package/typings/types.d.ts +418 -424
package/docs/changelog.md CHANGED
@@ -7,581 +7,11 @@ layout: Section
7
7
 
8
8
  # Releases
9
9
 
10
- ## 3.5.8
11
-
12
- Thanks all to those who contributed to make this release!
13
-
14
- 🐛 *Bug Fixes*
15
- fix(appium): type of setNetworkConnection() ([#3994](https://github.com/codeceptjs/CodeceptJS/issues/3994)) - by **[mirao](https://github.com/mirao)**
16
- fix: improve the way to show deprecated appium v1 message ([#3992](https://github.com/codeceptjs/CodeceptJS/issues/3992)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
17
- fix: missing exit condition of some wait functions - by **[kobenguyent](https://github.com/kobenguyent)**
18
-
19
- ## 3.5.7
20
-
21
- Thanks all to those who contributed to make this release!
22
-
23
- 🐛 *Bug Fixes*
24
- * Bump playwright to 1.39.0 - run `npx playwright install` to install the browsers as starting from 1.39.0 browsers are not installed automatically ([#3924](https://github.com/codeceptjs/CodeceptJS/issues/3924)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
25
- * fix(playwright): some wait functions draw error due to switchTo iframe ([#3918](https://github.com/codeceptjs/CodeceptJS/issues/3918)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
26
- * fix(appium): AppiumTestDistribution/appium-device-farm requires 'platformName' ([#3950](https://github.com/codeceptjs/CodeceptJS/issues/3950)) - by **[rock-tran](https://github.com/rock-tran)**
27
- * fix: autologin with empty fetch ([#3947](https://github.com/codeceptjs/CodeceptJS/issues/3947)) - by **[andonary](https://github.com/andonary)**
28
- * fix(cli): customLocator draws error in dry-mode ([#3940](https://github.com/codeceptjs/CodeceptJS/issues/3940)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
29
- * fix: ensure docs include **[returns](https://github.com/returns)** Promise<void> where appropriate ([#3954](https://github.com/codeceptjs/CodeceptJS/issues/3954)) - by **[fwouts](https://github.com/fwouts)**
30
- * fix: long text in data table cuts off ([#3936](https://github.com/codeceptjs/CodeceptJS/issues/3936)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
31
- ```
32
- #language: de
33
- Funktionalität: Faker examples
34
-
35
- Szenariogrundriss: Atualizar senha do usuÃĄrio
36
- Angenommen que estou logado via REST com o usuÃĄrio "<customer>"
37
- | protocol | https: |
38
- | hostname | https://cucumber.io/docs/gherkin/languages/ |
39
-
40
-
41
- Faker examples --
42
- Atualizar senha do usuÃĄrio {"product":"{{vehicle.vehicle}}","customer":"Dr. {{name.findName}}","price":"{{commerce.price}}","cashier":"cashier 2"}
43
- On Angenommen: que estou logado via rest com o usuÃĄrio "dr. {{name.find name}}"
44
- protocol | https:
45
- hostname | https://cucumber.io/docs/gherkin/languages/
46
-
47
- Dr. {{name.findName}}
48
- ✔ OK in 13ms
49
-
50
- ```
51
- * fix(playwright): move to waitFor ([#3933](https://github.com/codeceptjs/CodeceptJS/issues/3933)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
52
- * fix: relax grabCookie type ([#3919](https://github.com/codeceptjs/CodeceptJS/issues/3919)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
53
- * fix: proceedSee error when being called inside within ([#3939](https://github.com/codeceptjs/CodeceptJS/issues/3939)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
54
- * fix: rename haveRequestHeaders of ppt and pw helpers ([#3937](https://github.com/codeceptjs/CodeceptJS/issues/3937)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
55
- ```
56
- Renamed haveRequestHeaders of Puppeteer, Playwright helper so that it would not confuse the REST helper.
57
- Puppeteer: setPuppeteerRequestHeaders
58
- Playwright: setPlaywrightRequestHeaders
59
- ```
60
- * improvement: handle the way to load apifactory nicely ([#3941](https://github.com/codeceptjs/CodeceptJS/issues/3941)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
61
- ```
62
- With this fix, we could now use the following syntax:
63
-
64
- export = new Factory()
65
- .attr('name', () => faker.name.findName())
66
- .attr('job', () => 'leader');
67
-
68
- export default new Factory()
69
- .attr('name', () => faker.name.findName())
70
- .attr('job', () => 'leader');
71
-
72
- modules.export = new Factory()
73
- .attr('name', () => faker.name.findName())
74
- .attr('job', () => 'leader');
75
- ```
76
-
77
- 📖 *Documentation*
78
- * docs(appium): update to v2 ([#3932](https://github.com/codeceptjs/CodeceptJS/issues/3932)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
79
- * docs: improve BDD Gherkin docs ([#3938](https://github.com/codeceptjs/CodeceptJS/issues/3938)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
80
- * Other docs improvements
81
-
82
- đŸ›Šī¸ *Features*
83
- * feat(puppeteer): support trace recording - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
84
- ```
85
- [Trace Recording Customization]
86
- Trace recording provides complete information on test execution and includes screenshots, and network requests logged during run. Traces will be saved to output/trace
87
-
88
- trace: enables trace recording for failed tests; trace are saved into output/trace folder
89
- keepTraceForPassedTests: - save trace for passed tests
90
- ```
91
- * feat: expect helper ([#3923](https://github.com/codeceptjs/CodeceptJS/issues/3923)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
92
- ```
93
- * This helper allows performing assertions based on Chai.
94
- *
95
- * ### Examples
96
- *
97
- * Zero-configuration when paired with other helpers like REST, Playwright:
98
- *
99
- * ```js
100
- * // inside codecept.conf.js
101
- *{
102
- * helpers: {
103
- * Playwright: {...},
104
- * ExpectHelper: {},
105
- * }
106
-
107
- Expect Helper
108
- #expectEqual
109
- #expectNotEqual
110
- #expectContain
111
- #expectNotContain
112
- #expectStartsWith
113
- #expectNotStartsWith
114
- #expectEndsWith
115
- #expectNotEndsWith
116
- #expectJsonSchema
117
- #expectHasProperty
118
- #expectHasAProperty
119
- #expectToBeA
120
- #expectToBeAn
121
- #expectMatchRegex
122
- #expectLengthOf
123
- #expectTrue
124
- #expectEmpty
125
- #expectFalse
126
- #expectAbove
127
- #expectBelow
128
- #expectLengthAboveThan
129
- #expectLengthBelowThan
130
- #expectLengthBelowThan
131
- #expectDeepMembers
132
- #expectDeepIncludeMembers
133
- #expectDeepEqualExcluding
134
- #expectLengthBelowThan
135
- ```
136
- * feat: run-workers with multiple browsers output folders - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
137
- - ![Screenshot 2023-11-04 at 10 49 56](https://github.com/codeceptjs/CodeceptJS/assets/7845001/8eaecc54-de14-4597-b148-1e087bec3c76)
138
- - ![Screenshot 2023-11-03 at 15 56 38](https://github.com/codeceptjs/CodeceptJS/assets/7845001/715aed17-3535-48df-80dd-84f7024f08e3)
139
- * feat: introduce new Playwright methods - by **[hatufacci](https://github.com/hatufacci)**
140
- ```
141
- - grabCheckedElementStatus
142
- - grabDisabledElementStatus
143
- ```
144
- * feat: gherkin supports i18n ([#3934](https://github.com/codeceptjs/CodeceptJS/issues/3934)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
145
- ```
146
- #language: de
147
- Funktionalität: Checkout-Prozess
148
- Um Produkte zu kaufen
149
- Als Kunde
150
- MÃļchte ich in der Lage sein, mehrere Produkte zu kaufen
151
-
152
- **[i18n](https://github.com/i18n)**
153
- Szenariogrundriss: Bestellrabatt
154
- Angenommen ich habe ein Produkt mit einem Preis von <price>$ in meinem Warenkorb
155
- Und der Rabatt fÃŧr Bestellungen Ãŧber $20 beträgt 10 %
156
- Wenn ich zur Kasse gehe
157
- Dann sollte ich den Gesamtpreis von "<total>" $ sehen
158
-
159
- Beispiele:
160
- | price | total |
161
- | 10 | 10.0 |
162
- ```
163
- * feat(autoLogin): improve the check method ([#3935](https://github.com/codeceptjs/CodeceptJS/issues/3935)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
164
- ```
165
- Instead of asserting on page elements for the current user in check, you can use the session you saved in fetch
166
-
167
- autoLogin: {
168
- enabled: true,
169
- saveToFile: true,
170
- inject: 'login',
171
- users: {
172
- admin: {
173
- login: async (I) => { // If you use async function in the autoLogin plugin
174
- const phrase = await I.grabTextFrom('#phrase')
175
- I.fillField('username', 'admin'),
176
- I.fillField('password', 'password')
177
- I.fillField('phrase', phrase)
178
- },
179
- check: (I, session) => {
180
- // Throwing an error in `check` will make CodeceptJS perform the login step for the user
181
- if (session.profile.email !== the.email.you.expect@some-mail.com) {
182
- throw new Error ('Wrong user signed in');
183
- }
184
- },
185
- }
186
- }
187
- }
188
- Scenario('login', async ( {I, login} ) => {
189
- await login('admin') // you should use `await`
190
- })
191
- ```
192
-
193
- ## 3.5.6
194
-
195
- Thanks all to those who contributed to make this release!
196
-
197
- 🐛 *Bug Fixes*
198
- * fix: switchTo/within block doesn't switch to expected iframe ([#3892](https://github.com/codeceptjs/CodeceptJS/issues/3892)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
199
- * fix: highlight element doesn't work as expected ([#3896](https://github.com/codeceptjs/CodeceptJS/issues/3896)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
200
- ```
201
- verbose/ highlight TRUE TRUE -> highlight element
202
- verbose/ highlight TRUE FALSE -> no highlight element
203
- verbose/ highlight FALSE TRUE -> no highlight element
204
- verbose/ highlight FALSE FALSE -> no highlight element
205
- ```
206
- * fix: masked value issue in data table ([#3885](https://github.com/codeceptjs/CodeceptJS/issues/3885)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
207
- ```
208
- const accounts = new DataTable(['role', 'username', 'password']);
209
- accounts.add([
210
- 'ROLE_A',
211
- process.env['FIRST_USERNAME'],
212
- secret(process.env['FIRST_PASSWORD']),
213
- ]);
214
- accounts.add([
215
- 'ROLE_B',
216
- process.env['SECOND_USERNAME'],
217
- secret(process.env['SECOND_PASSWORD']),
218
- ]);
219
-
220
- Data(accounts)
221
- .Scenario(
222
- 'ScenarioTitle',
223
- ({ I, pageObject, current }) => {
224
- I.say("Given I'am logged in");
225
- I.amOnPage('/');
226
- loginPage.**sendForm**(current.username, current.password);
227
- )
228
-
229
-
230
- // output
231
- The test feature --
232
- The scenario | {"username":"Username","password": ***}
233
- 'The real password: theLoggedPasswordInCleartext'
234
- I.fillField('somePasswordLocator', '****')
235
- ✔ OK in 7ms
236
-
237
- The scenario | {"username":"theSecondUsername","password": ***}
238
- 'The real password: theLoggedPasswordInCleartext'
239
- I.fillField('somePasswordLocator', '****')
240
- ✔ OK in 1ms
241
- ```
242
-
243
- * fix: debug info causes error ([#3882](https://github.com/codeceptjs/CodeceptJS/issues/3882)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
244
-
245
- 📖 *Documentation*
246
- * fix: get rid of complaining when using session without await and returning nothing. ([#3899](https://github.com/codeceptjs/CodeceptJS/issues/3899)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
247
- * fix(FileSystem): a typo in writeToFile() ([#3897](https://github.com/codeceptjs/CodeceptJS/issues/3897)) - by **[mirao](https://github.com/mirao)**
248
-
249
- đŸ›Šī¸ *Features*
250
- * feat(translation): add more french keywords and fix deprecated waitForClickable ([#3906](https://github.com/codeceptjs/CodeceptJS/issues/3906)) - by **[andonary](https://github.com/andonary)**
251
- ```
252
- - Add some french keywords for translation
253
- - I.waitForClickable has the same "attends" than I.wait. Using "attends" leads to use the deprecated waitForClickable. Fix it by using different words.
254
- ```
255
-
256
- ## 3.5.5
257
-
258
- 🐛 Bug Fixes
259
- * fix(browserstack): issue with vendor prefix ([#3845](https://github.com/codeceptjs/CodeceptJS/issues/3845)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
260
- ```
261
- export const caps = {
262
- androidCaps: {
263
- appiumV2: true,
264
- host: "hub-cloud.browserstack.com",
265
- port: 4444,
266
- user: process.env.BROWSERSTACK_USER,
267
- key: process.env.BROWSERSTACK_KEY,
268
- 'app': `bs://c700ce60cf13ae8ed97705a55b8e022f1hjhkjh3c5827c`,
269
- browser: '',
270
- desiredCapabilities: {
271
- 'appPackage': data.packageName,
272
- 'deviceName': process.env.DEVICE || 'Google Pixel 3',
273
- 'platformName': process.env.PLATFORM || 'android',
274
- 'platformVersion': process.env.OS_VERSION || '10.0',
275
- 'automationName': process.env.ENGINE || 'UIAutomator2',
276
- 'newCommandTimeout': 300000,
277
- 'androidDeviceReadyTimeout': 300000,
278
- 'androidInstallTimeout': 90000,
279
- 'appWaitDuration': 300000,
280
- 'autoGrantPermissions': true,
281
- 'gpsEnabled': true,
282
- 'isHeadless': false,
283
- 'noReset': false,
284
- 'noSign': true,
285
- 'bstack:options' : {
286
- "appiumVersion" : "2.0.1",
287
- },
288
- }
289
- },
290
- }
291
- ```
292
-
293
- * switchTo/within now supports strict locator ([#3847](https://github.com/codeceptjs/CodeceptJS/issues/3847)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
294
-
295
- ```
296
- I.switchTo({ css: 'iframe[id^=number-frame]' }) // support the strict locator
297
-
298
- I.amOnPage('/iframe');
299
- within({
300
- frame: { css: '#number-frame-1234' }, // support the strict locator
301
- }, () => {
302
- I.fillField('user[login]', 'User');
303
- I.fillField('user[email]', 'user@user.com');
304
- I.fillField('user[password]', 'user@user.com');
305
- I.click('button');
306
- });
307
- ```
308
-
309
- * Improve the IntelliSense when using other languages ([#3848](https://github.com/codeceptjs/CodeceptJS/issues/3848)) - by **[andonary](https://github.com/andonary)**
310
- ```
311
- include: {
312
- Je: './steps_file.js'
313
- }
314
- ```
315
-
316
- * bypassCSP support for Playwright helper ([#3865](https://github.com/codeceptjs/CodeceptJS/issues/3865)) - by **[sammeel](https://github.com/sammeel)**
317
- ```
318
- helpers: {
319
- Playwright: {
320
- bypassCSP: true
321
- }
322
- ```
323
- * fix: missing requests when recording network ([#3834](https://github.com/codeceptjs/CodeceptJS/issues/3834)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
324
-
325
- đŸ›Šī¸ Features and Improvements
326
- * Show environment info in verbose mode ([#3858](https://github.com/codeceptjs/CodeceptJS/issues/3858)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
327
-
328
- ```
329
- Environment information:-
330
-
331
- codeceptVersion: "3.5.4"
332
- nodeInfo: 18.16.0
333
- osInfo: macOS 13.5
334
- cpuInfo: (8) arm64 Apple M1 Pro
335
- chromeInfo: 116.0.5845.179
336
- edgeInfo: 116.0.1938.69
337
- firefoxInfo: Not Found
338
- safariInfo: 16.6
339
- helpers: {
340
- "Playwright": {
341
- "url": "https://github.com",
342
- "show": false,
343
- "browser": "chromium",
344
- "waitForNavigation": "load",
345
- "waitForTimeout": 30000,
346
- "trace": false,
347
- "keepTraceForPassedTests": true
348
- },
349
- "CDPHelper": {
350
- "require": "./helpers/CDPHelper.ts"
351
- },
352
- "OpenAI": {
353
- "chunkSize": 8000
354
- },
355
- "ExpectHelper": {
356
- "require": "codeceptjs-expect"
357
- },
358
- "REST": {
359
- "endpoint": "https://reqres.in",
360
- "timeout": 20000
361
- },
362
- "AllureHelper": {
363
- "require": "./helpers/AllureHelper.ts"
364
- }
365
- }
366
- plugins: {
367
- "screenshotOnFail": {
368
- "enabled": true
369
- },
370
- "tryTo": {
371
- "enabled": true
372
- },
373
- "retryFailedStep": {
374
- "enabled": true
375
- },
376
- "retryTo": {
377
- "enabled": true
378
- },
379
- "eachElement": {
380
- "enabled": true
381
- },
382
- "pauseOnFail": {}
383
- }
384
- ***************************************
385
- If you have questions ask them in our Slack: http://bit.ly/chat-codeceptjs
386
- Or ask them on our discussion board: https://codecept.discourse.group/
387
- Please copy environment info when you report issues on GitHub: https://github.com/Codeception/CodeceptJS/issues
388
- ***************************************
389
- CodeceptJS v3.5.4 #StandWithUkraine
390
- ```
391
-
392
- * some typings improvements ([#3855](https://github.com/codeceptjs/CodeceptJS/issues/3855)) - by **[nikzupancic](https://github.com/nikzupancic)**
393
- * support the puppeteer 21.1.1 ([#3856](https://github.com/codeceptjs/CodeceptJS/issues/3856)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
394
- * fix: support secret value for some methods ([#3837](https://github.com/codeceptjs/CodeceptJS/issues/3837)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
395
-
396
- ```
397
- await I.amOnPage('/form/field_values');
398
- await I.dontSeeInField('checkbox[]', secret('not seen one'));
399
- await I.seeInField('checkbox[]', secret('see test one'));
400
- await I.dontSeeInField('checkbox[]', secret('not seen two'));
401
- await I.seeInField('checkbox[]', secret('see test two'));
402
- await I.dontSeeInField('checkbox[]', secret('not seen three'));
403
- await I.seeInField('checkbox[]', secret('see test three'));
404
- ```
405
-
406
- đŸ›Šī¸ **Several bugfixes and improvements for Codecept-UI**
407
- * Mask the secret value in UI
408
- * Improve UX/UI
409
- * PageObjects are now showing in UI
410
-
411
- ## 3.5.4
412
-
413
- 🐛 Bug Fixes:
414
- * **[Playwright]** When passing `userDataDir`, it throws error after test execution ([#3814](https://github.com/codeceptjs/CodeceptJS/issues/3814)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
415
- * [CodeceptJS-CLI] Improve command to generate types ([#3788](https://github.com/codeceptjs/CodeceptJS/issues/3788)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
416
- * Heal plugin fix ([#3820](https://github.com/codeceptjs/CodeceptJS/issues/3820)) - by **[davert](https://github.com/davert)**
417
- * Fix for error in using `all` with `run-workers` ([#3805](https://github.com/codeceptjs/CodeceptJS/issues/3805)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
418
- ```js
419
- helpers: {
420
- Playwright: {
421
- url: 'https://github.com',
422
- show: false,
423
- browser: 'chromium',
424
- waitForNavigation: 'load',
425
- waitForTimeout: 30_000,
426
- trace: true,
427
- keepTraceForPassedTests: true
428
- },
429
- },
430
- multiple: {
431
- profile1: {
432
- browsers: [
433
- {
434
- browser: "chromium",
435
- }
436
- ]
437
- },
438
- },
439
- ```
440
- * Highlight elements issues ([#3779](https://github.com/codeceptjs/CodeceptJS/issues/3779)) ([#3778](https://github.com/codeceptjs/CodeceptJS/issues/3778)) - by **[philkas](https://github.com/philkas)**
441
- * Support `&nbsp` symbol in `I.see` method ([#3815](https://github.com/codeceptjs/CodeceptJS/issues/3815)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
442
-
443
- ```js
444
- // HTML code uses &nbsp; instead of space
445
- <div class="dJHe_" style="color: rgb(255, 255, 255);">My&nbsp;Text!</div>
446
-
447
- I.see("My Text!") // this test would work with both &nbsp; and space
448
- ```
449
-
450
- 📖 Documentation
451
- * Improve the configuration of electron testing when the app is build with electron-forge ([#3802](https://github.com/codeceptjs/CodeceptJS/issues/3802)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
452
-
453
- ```js
454
- const path = require("path");
455
-
456
- exports.config = {
457
- helpers: {
458
- Playwright: {
459
- browser: "electron",
460
- electron: {
461
- executablePath: require("electron"),
462
- args: [path.join(__dirname, ".webpack/main/index.js")],
463
- },
464
- },
465
- },
466
- // rest of config
467
- }
468
- ```
469
-
470
- đŸ›Šī¸ Features
471
-
472
- #### **[Playwright]** new features and improvements
473
- * Parse the response in recording network steps ([#3771](https://github.com/codeceptjs/CodeceptJS/issues/3771)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
474
-
475
- ```js
476
- const traffics = await I.grabRecordedNetworkTraffics();
477
- expect(traffics[0].url).to.equal('https://reqres.in/api/comments/1');
478
- expect(traffics[0].response.status).to.equal(200);
479
- expect(traffics[0].response.body).to.contain({ name: 'this was mocked' });
480
-
481
- expect(traffics[1].url).to.equal('https://reqres.in/api/comments/1');
482
- expect(traffics[1].response.status).to.equal(200);
483
- expect(traffics[1].response.body).to.contain({ name: 'this was another mocked' });
484
- ```
485
- * Grab metrics ([#3809](https://github.com/codeceptjs/CodeceptJS/issues/3809)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
486
-
487
- ```js
488
- const metrics = await I.grabMetrics();
489
-
490
- // returned metrics
491
-
492
- [
493
- { name: 'Timestamp', value: 1584904.203473 },
494
- { name: 'AudioHandlers', value: 0 },
495
- { name: 'AudioWorkletProcessors', value: 0 },
496
- { name: 'Documents', value: 22 },
497
- { name: 'Frames', value: 10 },
498
- { name: 'JSEventListeners', value: 366 },
499
- { name: 'LayoutObjects', value: 1240 },
500
- { name: 'MediaKeySessions', value: 0 },
501
- { name: 'MediaKeys', value: 0 },
502
- { name: 'Nodes', value: 4505 },
503
- { name: 'Resources', value: 141 },
504
- { name: 'ContextLifecycleStateObservers', value: 34 },
505
- { name: 'V8PerContextDatas', value: 4 },
506
- { name: 'WorkerGlobalScopes', value: 0 },
507
- { name: 'UACSSResources', value: 0 },
508
- { name: 'RTCPeerConnections', value: 0 },
509
- { name: 'ResourceFetchers', value: 22 },
510
- { name: 'AdSubframes', value: 0 },
511
- { name: 'DetachedScriptStates', value: 2 },
512
- { name: 'ArrayBufferContents', value: 1 },
513
- { name: 'LayoutCount', value: 0 },
514
- { name: 'RecalcStyleCount', value: 0 },
515
- { name: 'LayoutDuration', value: 0 },
516
- { name: 'RecalcStyleDuration', value: 0 },
517
- { name: 'DevToolsCommandDuration', value: 0.000013 },
518
- { name: 'ScriptDuration', value: 0 },
519
- { name: 'V8CompileDuration', value: 0 },
520
- { name: 'TaskDuration', value: 0.000014 },
521
- { name: 'TaskOtherDuration', value: 0.000001 },
522
- { name: 'ThreadTime', value: 0.000046 },
523
- { name: 'ProcessTime', value: 0.616852 },
524
- { name: 'JSHeapUsedSize', value: 19004908 },
525
- { name: 'JSHeapTotalSize', value: 26820608 },
526
- { name: 'FirstMeaningfulPaint', value: 0 },
527
- { name: 'DomContentLoaded', value: 1584903.690491 },
528
- { name: 'NavigationStart', value: 1584902.841845 }
529
- ]
530
- ```
531
-
532
- * Grab WebSocket (WS) messages ([#3789](https://github.com/codeceptjs/CodeceptJS/issues/3789)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
533
- * `flushWebSocketMessages`
534
- * `grabWebSocketMessages`
535
- * `startRecordingWebSocketMessages`
536
- * `stopRecordingWebSocketMessages`
537
-
538
- ```js
539
- await I.startRecordingWebSocketMessages();
540
- I.amOnPage('https://websocketstest.com/');
541
- I.waitForText('Work for You!');
542
- I.flushNetworkTraffics();
543
- const wsMessages = I.grabWebSocketMessages();
544
- expect(wsMessages.length).to.equal(0);
545
- ```
546
-
547
- ```js
548
- await I.startRecordingWebSocketMessages();
549
- await I.amOnPage('https://websocketstest.com/');
550
- I.waitForText('Work for You!');
551
- const wsMessages = I.grabWebSocketMessages();
552
- expect(wsMessages.length).to.greaterThan(0);
553
- ```
554
-
555
- ```js
556
- await I.startRecordingWebSocketMessages();
557
- await I.amOnPage('https://websocketstest.com/');
558
- I.waitForText('Work for You!');
559
- const wsMessages = I.grabWebSocketMessages();
560
- await I.stopRecordingWebSocketMessages();
561
- await I.amOnPage('https://websocketstest.com/');
562
- I.waitForText('Work for You!');
563
- const afterWsMessages = I.grabWebSocketMessages();
564
- expect(wsMessages.length).to.equal(afterWsMessages.length);
565
- ```
566
-
567
- * Move from `ElementHandle` to `Locator`. This change is quite major, but it happened under hood, so should not affect your code. ([#3738](https://github.com/codeceptjs/CodeceptJS/issues/3738)) - by **[KobeNguyenT](https://github.com/KobeNguyenT)**
568
-
569
10
  ## 3.5.3
570
11
 
571
12
  đŸ›Šī¸ Features
572
13
 
573
- * **[Playwright]** Added commands to check network traffic [#3748](https://github.com/codeceptjs/CodeceptJS/issues/3748) - by **[ngraf](https://github.com/ngraf)** **[KobeNguyenT](https://github.com/KobeNguyenT)**
574
- * `startRecordingTraffic`
575
- * `grabRecordedNetworkTraffics`
576
- * `blockTraffic`
577
- * `mockTraffic`
578
- * `flushNetworkTraffics`
579
- * `stopRecordingTraffic`
580
- * `seeTraffic`
581
- * `grabTrafficUrl`
582
- * `dontSeeTraffic`
583
-
584
- Examples:
14
+ * **[Playwright]** Provide new steps to check network traffic [#3748](https://github.com/codeceptjs/CodeceptJS/issues/3748) - by **[ngraf](https://github.com/ngraf)** **[KobeNguyenT](https://github.com/KobeNguyenT)**
585
15
 
586
16
  ```js
587
17
  // recording traffics and verify the traffic
@@ -31,6 +31,9 @@ Please **add your own** by editing this page.
31
31
  * [codeceptjs-bshelper](https://github.com/PeterNgTr/codeceptjs-bshelper) - a helper which updates `Test Names` & `Test Results` on Browserstack
32
32
  * [codeceptjs-tbhelper](https://github.com/testingbot/codeceptjs-tbhelper) - a helper which updates `Test Names` & `Test Results` on TestingBot
33
33
 
34
+ ## Integrations
35
+ * [codeceptjs-testrail](https://github.com/PeterNgTr/codeceptjs-testrail) - a plugin to integrate with [Testrail](https://www.gurock.com/testrail)
36
+
34
37
  ## Visual-Testing
35
38
  * [codeceptjs-resemblehelper](https://github.com/puneet0191/codeceptjs-resemblehelper) - a helper which helps with visual testing using resemble.js.
36
39
  * [codeceptjs-applitoolshelper](https://www.npmjs.com/package/codeceptjs-applitoolshelper) - a helper which helps interaction with [Applitools](https://applitools.com)
@@ -39,10 +42,8 @@ Please **add your own** by editing this page.
39
42
  ## Reporters
40
43
  * [codeceptjs-rphelper](https://github.com/reportportal/agent-js-codecept) is a CodeceptJS helper which can publish tests results on ReportPortal after execution.
41
44
  * [codeceptjs-xray-helper](https://www.npmjs.com/package/codeceptjs-xray-helper) is a CodeceptJS helper which can publish tests results on [XRAY](https://confluence.xpand-it.com/display/XRAYCLOUD/Import+Execution+Results+-+REST).
42
- * [codeceptjs-xray-cloud-helper](https://www.npmjs.com/package/codeceptjs-xray-cloud-helper) is a helper that automatically retrieves the result of CodeceptJS tests and sends them to XRAY/JIRA(cloud version) via [XRAY Cloud API](https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST+v2#ImportExecutionResultsRESTv2-XrayJSONresults).
43
45
  * [codeceptjs-slack-reporter](https://www.npmjs.com/package/codeceptjs-slack-reporter) Get a Slack notification when one or more scenarios fail.
44
46
  * [codeceptjs-browserlogs-plugin](https://github.com/pavkam/codeceptjs-browserlogs-plugin) Record the browser logs for failed tests.
45
- * [codeceptjs-testrail](https://github.com/PeterNgTr/codeceptjs-testrail) - a plugin to integrate with [Testrail](https://www.gurock.com/testrail)
46
47
 
47
48
  ## Browser request control
48
49
  * [codeceptjs-resources-check](https://github.com/luarmr/codeceptjs-resources-check) Load a URL with Puppeteer and listen to the requests while the page is loading. Enabling count the number or check the sizes of the requests.
@@ -54,9 +55,4 @@ Please **add your own** by editing this page.
54
55
  ## Other
55
56
 
56
57
  * [codeceptjs-cmdhelper](https://github.com/thiagodp/codeceptjs-cmdhelper) allows you to run commands in the terminal/console
57
- * [eslint-plugin-codeceptjs](https://www.npmjs.com/package/eslint-plugin-codeceptjs) Eslint rules for CodeceptJS.
58
- * [codeceptjs-datalayer-helper](https://github.com/kobenguyent/codeceptjs-datalayer-helper) CodeceptJS DataLayer helper helps you to get the datalayer JavaScript array that is used to store information and send this data to the tag manager.
59
- * [codeceptjs-a11y-helper](https://github.com/kobenguyent/codeceptjs-a11y-helper) accessibility tests integrated with CodeceptJS - Playwright-axe
60
- * [codeceptjs-lighthouse-helper](https://github.com/kobenguyent/codeceptjs-lighthouse-helper) lighthouse audit integrated with CodeceptJS - Playwright
61
- * [Snowplow Data analytics](https://www.npmjs.com/package/@viasat/codeceptjs-snowplow-helper) - Test your Snowplow events implementations with CodeceptJS and Snowplow Micro.
62
- * [codeceptjs-failure-logger](https://github.com/kobenguyent/codeceptjs-failure-logger) - Log failed CodeceptJS tests to file
58
+ * [eslint-plugin-codeceptjs](https://www.npmjs.com/package/eslint-plugin-codeceptjs) Eslint rules for CodeceptJS.
package/docs/examples.md CHANGED
@@ -16,7 +16,6 @@ Playground repository where you can run tests in different helpers on a basic si
16
16
 
17
17
  Tests repository demonstrate usage of
18
18
 
19
- * Playwright helper
20
19
  * Puppeteer helper
21
20
  * WebDriver helper
22
21
  * TestCafe plugin
@@ -29,6 +28,7 @@ Tests repository demonstrate usage of
29
28
  CodeceptJS repo contains basic tests (both failing and passing) just to show how it works.
30
29
  Our team uses it to test new features and run simple scenarios.
31
30
 
31
+
32
32
  ## [CodeceptJS Cucumber E2E Framework](https://github.com/gkushang/codeceptjs-e2e)
33
33
 
34
34
  This repository contains complete E2E framework for CodeceptJS with Cucumber and SauceLabs Integration
@@ -146,10 +146,4 @@ This is necessary if all integrations with TMS and CI/CD are already configured,
146
146
  * HTTP request client with session support and unit tests
147
147
  * Exemplary code control
148
148
  * Ready to launch in a CI/CD system as is
149
- * OOP, Test data models and builders, endpoint decorators
150
-
151
- ## [Playwright fun with CodeceptJS](https://github.com/PeterNgTr/codeceptjs-playwright-fun)
152
- * Tests are written in TS
153
- * CI/CD with Github Actions
154
- * Page Object Model is applied
155
- * ReportPortal Integration
149
+ * OOP, Test data models and builders, endpoint decorators