codeceptjs
Advanced tools
Changelog
3.3.4
secret
function:I.sendPostRequest('/auth', secret({ name: 'jon', password: '123456' }, 'password'));
secret
functiontouchClick
when interacting with elements in iOS. See #3317 by @mikk150cdpConnection
option to connect over CDP. See #3309 by @Hmihalyplugins: {
customLocator: {
enabled: true,
prefix: '$',
attribute: ['data-qa', 'data-test'],
}
}
pollInterval
option. See #3351 by @cyonkeeprettyPrintJson
option to print JSON in nice way by @PeterNgTr// response.data == [
// { user: { name: 'jon', email: 'jon@doe.com' } },
// { user: { name: 'matt', email: 'matt@doe.com' } },
//]
I.seeResponseContainsKeys(['user']);
I.seeResponseContainsJson({ user: { email: 'jon@doe.com' } });
I.seeResponseContainsJson({ user: { email: 'matt@doe.com' } });
I.dontSeeResponseContainsJson({ user: 2 });
Changelog
3.3.3
DataCloneError: () => could not be cloned
when running data tests in run-workersChangelog
3.3.2
haveRequestHeaders()
and amBearerAuthenticated()
. See #3304 by @miraoChangelog
3.3.1
🛩️ Features:
step.*
for run-workers #3272. Thanks to @abhimanyupandiancodecept run
using glob patterns. By @jayudey-wfnpx codeceptjs run test-dir/*"
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. helpers: {
Playwright : {
url: "http://localhost",
colorScheme: "dark",
}
}
🐛 Bugfixes:
Cannot read property 'video' of undefined
📖 Documentation
Changelog
3.3.0
🛩️ Features:
JSONResponse
helper which connects to REST, GraphQL or Playwright helperamBearerAuthenticated
methodhaveRequestHeaders
methodjoi
and chai
timeout
option to set timeout for all Playwright actions. If an action fails, Playwright keeps retrying it for a time set by timeout.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.restart
config option to include 3 restart strategies:
keepCookies
and keepBrowserState
options. This behavior was default prior CodeceptJS 3.1// 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 APIawait eachElement('click all links in .list', '.list a', (el) => {
await el.click();
})
playwright-core
package if playwright
is not installed. See #3190, fixes #2663.makeApiRequest
action to perform API requests. Requires Playwright >= 1.18codecept.config.js
for name consistency across other JS tools. See motivation at #3195 by @JiLiZARThave
method. See #3197 by @JJlokidokiaddStep
method to add comments and attachments. See #3104 by @EgorBodnar🐛 Bugfixes:
📖 Documentation
performSwipe
usePlaywrightTo
method by @dbudzins