codeceptjs 3.3.7-beta.1 → 3.3.7

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