codeceptjs 3.5.7-beta.1 → 3.5.8

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