2024.04.29 | AskUI SDK 0.18.0
Introduction
We had a bunch of releases today which will help you be more effective and also to integrate AskUI better in your current toolchain.
Our docs lacked a comprehensive source of common challenges about detecting elements and how to address them. Thus we created a Recommended Practices page and a separate Custom Elements page. Let us know if something is missing!
We were also able to release more Convenience methods in this version. They are more expressive and also shorter to write. Read about them below and also how to migrate to the new syntax for clickText()
and clickButton()
.
Speaking of convenience: We also added an ESLint rule that checks for the correct usage of expect()
.
Last but not least we fixed a bug in our test environment implementation @askui/jest-allure-circus
. It is now compatible with jest-cucumber
. (Link to accompanying blog).
Breaking Changes
- Method signature changed for
clickText()
. API docs
// Before
await aui.clickText('Hello World');
// Now
await aui.clickText({text: 'Hello World', type: 'similar'});
- Method signature changed for
clickButton()
. API docs
// Before
await aui.click().button().withText('Submit').exec();
// Now
await aui.clickButton({label: 'Submit'});
New Features
New Convenience methods added to AskUI TypeScript SDK:
We expanded our npm package @askui/eslint-plugin-askui with a new rule that checks for the correct usage of expect()
- Upgrade the plugin to
1.3.0
- Add the following rule:
"@askui/askui/expect": "error"
- Check the README for a complete guide
Fixes
@askui/jest-allure-circus
accepts thetestEnvironmentOptions
addCodeInReport
now- Upgrade the dependency to version
1.0.23
- Upgrade the dependency to version
// Usage
const config: Config.InitialOptions = {
...
testEnvironment: '@askui/jest-allure-circus',
testEnvironmentOptions: {
addCodeInReport: false
},
};
...