codeceptjs
Advanced tools
Changelog
3.2.0
🛩️ Features:
Timeouts implemented
timeout
config option).
Scenario
and Feature
options)
Feature().timeout()
and Scenario().timeout()
calls has no effect and are deprecated// set timeout for every test in suite to 10 secs
Feature('tests with timeout', { timeout: 10 });
// set timeout for this test to 20 secs
Scenario('a test with timeout', { timeout: 20 }, ({ I }) => {});
// set step timeout to 5 secs
I.limitTime(5).click('Link');
stepTimeout
plugin introduced to automatically add timeouts for each step (#3059 by @nikocanvacom).retryTo plugin introduced to rerun a set of steps on failure:
// editing in text in iframe
// if iframe was not loaded - retry 5 times
await retryTo(() => {
I.switchTo('#editor frame');
I.fillField('textarea', 'value');
}, 5);
locale
configuration🐛 Bugfixes:
Changelog
3.1.3
🛩️ Features:
DataTableArgument
class to work with table data structures.const { DataTableArgument } = require('codeceptjs');
//...
Given('I have an employee card', (table) => {
const dataTableArgument = new DataTableArgument(table);
const hashes = dataTableArgument.hashes();
// hashes = [{ name: 'Harry', surname: 'Potter', position: 'Seeker' }];
const rows = dataTableArgument.rows();
// rows = [['Harry', 'Potter', Seeker]];
}
See updated BDD section for more API options. Thanks to @EgorBodnar
cjs
file extensions for config file: codecept.conf.cjs
. See #3052 by @kalvenschrauttest.file
and suite.file
properties to test
and suite
objects to use in helpers and plugins.🐛 Bugfixes:
test.artifacts
for failing tests. See #3033 by @jancorvus. Fixes #3032basicAuth
credentials to all opened browser contexts. See #3036 by @nikocanvacom. Fixes #3035webdriverio
default version to ^6.12.1
. See #3043 by @sridhareaswaranI.haveRequestHeaders
affects all tabs. See #3049 by @jancorvusRangeError: Invalid string length
in recorder.js
when running huge amount of tests.touchPerform
, hideDeviceKeyboard
, removeApp
by @mirao📖 Documentation:
Changelog
3.1.2
🛩️ Features:
coverage
plugin to generate code coverage for Playwright & Puppeteer. By @anirudh-modisubtitle
plugin to generate subtitles for videos recorded with Playwright. By @anirudh-modiconfig.tests
to accept array of file patterns. See #2994 by @monsterambaexports.config = {
tests: ['./*_test.js','./sampleTest.js'],
// ...
}
Feature()
. See #3011 by @PeterNgTr🐛 Bugfixes:
saveScreenshot
. See #3002 by @nlespiaucq🎱 Other:
puppeteerCoverage
plugin in favor of coverage
plugin.Changelog
3.1.1
grabNumberOfVisibleElements
, grabAttributeFrom
, grabAttributeFromAll
to allow id locators.Changelog
3.1.0
BrowserContext
is initialized before each test and closed after. This behavior matches recommendation from Playwright team to use different contexts for tests.🛩️ Features:
route
API of Playwright by @davertmik🐛 Bugfixes:
els[0]._clickablePoint is not a function
by @karunandrii.fillField
to check for invisible elements. See #2916 by @anne-open-xchangerun-multiple
using chunks. See #2900 by @andrenobertoChangelog
3.0.7
📖 Documentation fixes:
Nightmare helper
. See #2860 by @Arhellplaywright.md
. See #2848 by @johnhoodjrSharing Data Between Workers
section. See #2891 by @ngraf🛩️ Features:
Webdriver
. See #2741 by @gkushangScenario.skip
that it would be useful for building reports. See #2867 by @AlexKo4codeceptjs shell
command. See #2895 by @PeterNgTr:npx codeceptjs shell -c foo.conf.js
Bug fixes:
Changelog
3.0.6
electron
as a browser to config. See #2834 by @cbayer97launchPersistentContext
to be able to launch persistent remote browsers. See #2817 by @brunoqueiros. Fixes #2376.run-workers
. See #2857 by @haveac1gar. Fixes #2621, #2852gherkin.features
. See #2814 by @jbergeronjr"features": [
"./features/*.feature",
"./features/api_features/*.feature"
],
getQueueId
to reporter to rerun a specific promise. See #2837 by @jonataskfakerTransform
plugin to use faker data in Gherkin scenarios. See #2854 by @adrielcodecoScenario Outline: ...
Given ...
When ...
Then ...
Examples:
| productName | customer | email | anythingMore |
| {{commerce.product}} | Dr. {{name.findName}} | {{internet.email}} | staticData |
tunnelIdentifier
config option to provide tunnel for SauceLabs. See #2832 by @gurjeetbainsChangelog
3.0.5
Features:
codecept.conf.ts
configuration files. See #2750 by @elaichenkovI.sendPatchRequest('/api/users.json', secret({ "email": "user@user.com" }));
See #2786 by @PeterNgTr
Bug fixes:
codeceptjs shell
which was broken since 3.0.0. See #2743 by @stedmanDocumentation fixes:
Library updates:
Changelog
3.0.4
init
script by adding cross-spawn
package. By @vipulgupta2048run-multiple
. See #2730 by @wagoidChangelog
3.0.3
Cannot read property '$$' of null
when locating elements. See #2713 by @matthewjfnpx codeceptjs init
improved
waitForFunction
was not working with number values. See #2703 by @MumblesNZseleniumArgs
and seleniumInstallArgs
config options for plugin. See #2687 by @andrerleaoaddParameter
method in #2717 by @jancorvus. Fixes #2716--reporter-options
and --reporter <name>
commands to run-workers
command by in #2691 @Ameterezu