Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow firing shortcut on components #1748

Open
mcollovati opened this issue Feb 13, 2024 · 0 comments
Open

Allow firing shortcut on components #1748

mcollovati opened this issue Feb 13, 2024 · 0 comments
Labels
enhancement UITest JUnit testing the UI

Comments

@mcollovati
Copy link
Contributor

In the UI Unit Test base class, there's the fireShortcut method that can be used to simulate a keyboard shortcut performed on the browser.
However, the method is meant to work with shortcuts attached to the UI (or the current modal component) created with the Shortcuts API, and it does not work with key down listener attached to a component through the KeyNotifier interface methods.

To trigger this kind of listeners, it would be good to add a similar fireShortcut() method on the base tester class (ComponentTester).
The implementation should just use ShortcutsKt._fireShortcut() providing the encapsulated component, after checking the component usability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement UITest JUnit testing the UI
Development

No branches or pull requests

1 participant