-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Block inserter search e2e test: scope list item lookup to the inserter panel #47066
Conversation
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.
Thank you, @jsnajdr!
The fix makes total sense. We should have used the scoped selector from the beginning.
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.
Great find, @jsnajdr 🙌
Size Change: 0 B Total Size: 1.33 MB ℹ️ View Unchanged
|
Flaky tests detected in faea1dc. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3893347308
|
Fixes #45332. There is a flaky e2e test, "passes the search value in the main inserter when clicking
Browse all
":Most recently seen in @tyxla's #47056 (comment) and also in #46467 (enabling concurrent mode) where I originally fixed it.
There's a situation that looks like this:
We enter a search term into a popover block inserter ("Verse"), then click "Browse all" and expect the search term to be transferred to the sidebar inserter panel.
But there is a brief moment in time where both inserters are shown. The panel is displayed synchronously after clicking on "Browse all", but the popover is hidden only a bit later, after a
setTimeout( fn, 0 )
insideuseFocusOutside
.Sometimes the test catches just that moment and then finds two block list items instead of just one. I'm fixing the test by scoping the list item lookup only to the sidebar panel.