CodeceptJS v3.3.0 Release Notes
-
π©οΈ Features:
- β
API Testing introduced
- Introduced
JSONResponse
helper which connects to REST, GraphQL or Playwright helper - [REST] Added
amBearerAuthenticated
method - [REST] Added
haveRequestHeaders
method - Added dependency on
joi
andchai
- Introduced
- 0οΈβ£ [Playwright] Added
timeout
option to set timeout for all Playwright actions. If an action fails, Playwright keeps retrying it for a time set by timeout. - [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. - β‘οΈ [Playwright] Updated
restart
config option to include 3 restart strategies:- 'context' or false - restarts browser context but keeps running browser. Recommended by Playwright team to keep tests isolated.
- 'browser' or true - closes browser and opens it again between tests.
- '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
andkeepBrowserState
options. This behavior was default prior CodeceptJS 3.1
- β‘οΈ [Playwright] Extended methods to provide more options from engine. These methods were updated so additional options can be be passed as the last argument:
// use Playwright click options as 3rd argument I.click('canvas', '.model', { position: { x: 20, y: 40 } }) // check option also has options I.checkOption('Agree', '.signup', { position: { x: 5, y: 5 } })
- π
eachElement
plugin introduced. It allows you to iterate over elements and perform some action on them using direct engines API
await eachElement('click all links in .list', '.list a', (el) => { await el.click(); })
- π [Playwright] Added support to
playwright-core
package ifplaywright
is not installed. See #3190, fixes #2663. - [Playwright] Added
makeApiRequest
action to perform API requests. Requires Playwright >= 1.18 - β Added support to
codecept.config.js
for name consistency across other JS tools. See motivation at #3195 by @JiLiZART - π [ApiDataFactory] Added options arg to
have
method. See #3197 by @JJlokidoki - π Improved pt-br translations to include keywords: 'Funcionalidade', 'CenΓ‘rio', 'Antes', 'Depois', 'AntesDaSuite', 'DepoisDaSuite'. See #3206 by @danilolutz
- π [allure plugin] Introduced
addStep
method to add comments and attachments. See #3104 by @EgorBodnar
π π Bugfixes:
- π Fixed #3212: using Regex flags for Cucumber steps. See #3214 by @anils92
π π Documentation
- β Added Testomat.io reporter
- β Added api testing guides
- β Added internal api guides
- π [Appium] Fixed documentation for
performSwipe
- β‘οΈ [Playwright] update docs for
usePlaywrightTo
method by @dbudzins
- β
API Testing introduced