codeceptjs
Advanced tools
Changelog
3.6.8
❤️ Thanks all to those who contributed to make this release! ❤️
🛩️ Features
export const config: CodeceptJS.MainConfig = {
tests: '**/*.e2e.test.ts',
retry: 4,
output: './output',
maskSensitiveData: true,
emptyOutputFolder: true,
...
I login {"username":"helloworld@test.com","password": "****"}
I send post request "https://localhost:8000/login", {"username":"helloworld@test.com","password": "****"}
› [Request] {"baseURL":"https://localhost:8000/login","method":"POST","data":{"username":"helloworld@test.com","password": "****"},"headers":{}}
› [Response] {"access-token": "****"}
I.sendDeleteRequestWithPayload('/api/users/1', { author: 'john' });
🐛 Bug Fixes
> codeceptjs dry-run --steps --grep "(?=.*Checkout process)"
Locator.build
complains the empty locator (#4543) - by @kobenguyentI.seeEmailAttachment
treats parameter as regular expression (#4629) - by @ngrafAdd hint to "I.seeEmailAttachment" that under the hood parameter is treated as RegExp.
When you don't know it, it can cause a lot of pain, wondering why your test fails with I.seeEmailAttachment('Attachment(1).pdf') although it looks just fine, but actually I.seeEmailAttachment('Attachment\\(1\\).pdf is required to make the test green, in case the attachment is called "Attachment(1).pdf" with special character in it.
📖 Documentation
Changelog
3.6.6
❤️ Thanks all to those who contributed to make this release! ❤️
🛩️ Features
Zero-configuration when paired with other helpers like REST, Playwright:
// inside codecept.conf.js
{
helpers: {
Playwright: {...},
SoftExpectHelper: {},
}
}
// in scenario
I.softExpectEqual('a', 'b')
I.flushSoftAssertions() // Throws an error if any soft assertions have failed. The error message contains all the accumulated failures.
run command
run workers command
🐛 Bug Fixes
I.executeScript
command is used with run-workers
(#4483) - by @code4muktesh// fix the validation of httpAgent config. we could now pass ca, instead of key/cert.
{
helpers: {
REST: {
endpoint: 'http://site.com/api',
prettyPrintJson: true,
httpAgent: {
ca: fs.readFileSync(__dirname + '/path/to/ca.pem'),
rejectUnauthorized: false,
keepAlive: true
}
}
}
}
📖 Documentation