Skip to main content

2024.04.29 | AskUI SDK 0.18.0

· 2 min read
Johannes Dienst
Developer Advocate

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()


Fixes

  • @askui/jest-allure-circus accepts the testEnvironmentOptions addCodeInReport now
    • Upgrade the dependency to version 1.0.23
// Usage
const config: Config.InitialOptions = {
...
testEnvironment: '@askui/jest-allure-circus',
testEnvironmentOptions: {
addCodeInReport: false
},
};
...