-
Notifications
You must be signed in to change notification settings - Fork 23
fix: Focus on click #1906
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
fix: Focus on click #1906
Conversation
(Also remove an unrelated test sysout that shouldn't have been committed in the first place.) Based on #1906
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a first look, the change seems fine, but I'd like to do some quick tests.
What I do not like is how the getChildrenTest
is modified. We are renaming it and adding multiple assertion for different use cases, increasing the maintenance complexity. I would prefer a separated test for the focus handling.
vaadin-testbench-shared/src/main/java/com/vaadin/testbench/TestBenchElement.java
Outdated
Show resolved
Hide resolved
…tBenchElement.java Co-authored-by: Marco Collovati <marco@vaadin.com>
That is about the other PR, but yes I fixed that there. |
Great. Let's merge that one and the update this according to the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks good.
I still do not like this clickingButtonWillFocusIt
that mixes tests for focus and children and would prefer separated tests.
But the important thing is that we have a test.
I was confused what you mean, but now fixed. It was remains of merge conflict. |
(cherry picked from commit 27a3232)
(cherry picked from commit 27a3232)
Mere JS call to click does not focus the element. Real life action of clicking element always focuses it. This is important if in the test story it is important that clicking Button e.g. blurs TextField, which in turn triggers value change in TextField.