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

test: Wait for TypeaheadSelect to settle down before pressing keys #21411

Closed

Conversation

mvollmer
Copy link
Member

@mvollmer mvollmer commented Dec 9, 2024

The TypeaheadSelect template code will focus the text input 100ms after opening the menu. The tests generally aren't disturbed about that, except when simulating key presses, of course.

When the focus unexpectedly shifts back to the text input while navigating the menu items, the focused item is reset to either the first or last one.

The TypeaheadSelect template code will focus the text input 100ms
after opening the menu. The tests generally aren't disturbed about
that, except when simulating key presses, of course.

When the focus unexpectedly shifts back to the text input while
navigating the menu items, the focused item is reset to either the
first or last one.
@mvollmer
Copy link
Member Author

mvollmer commented Dec 9, 2024

This should help with #21399. (I pushed it there as well, but I am unsure of how to best resolve the conflict there.)

@mvollmer mvollmer requested a review from martinpitt December 9, 2024 10:05
@martinpitt
Copy link
Member

@mvollmer Thanks for looking into this! This fails everywhere, though?

The conflict on #21399 is easy enough to resolve, just add a node_modules label. I just didn't do that yet as it seemed a waste.

@mvollmer
Copy link
Member Author

mvollmer commented Dec 9, 2024

This fails everywhere, though?

Amazing... I must have been really confused when testing this locally.

@mvollmer mvollmer added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Dec 9, 2024
@mvollmer
Copy link
Member Author

mvollmer commented Dec 9, 2024

This fails everywhere, though?

Amazing... I must have been really confused when testing this locally.

Ahh... there actually is a difference with new PF. More yaks!

@mvollmer
Copy link
Member Author

mvollmer commented Dec 9, 2024

Alright, the focus shifting only happens with the PF update in #21399. Without it, the text input remains focused throughout the test and there should be no race.

@mvollmer mvollmer closed this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-test For doc/workflow changes, or experiments which don't need a full CI run,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants