-
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
Remove insert block delay from e2e tests #22377
Conversation
Size Change: +12 B (0%) Total Size: 833 kB
ℹ️ View Unchanged
|
One interesting remark here is that all the failing tests are for "container blocks" being inserted which suggests clearly that the "async" behavior that was introduced is in the "InnerBlocks" component. |
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.
Makes sense.
Based on the code and where in the flow the error occurs, I can't see why this change would be the cause, but noting that I've seen quite a few build failures lately occurring within the Example: https://travis-ci.com/github/WordPress/gutenberg/jobs/336142279
|
@@ -2,7 +2,6 @@ | |||
* Internal dependencies | |||
*/ | |||
import { searchForBlock } from './search-for-block'; | |||
import { getAllBlocks } from './get-all-blocks'; | |||
|
|||
/** | |||
* Opens the inserter, searches for the given term, then selects the first |
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.
Noting that the changes in 4d23115 included a revision to the function documentation: "It then waits briefly for the block list to update.". It wasn't reverted here.
Moved to issue (with a couple debugging leads) at #22430 |
Really nice! Glad we were able to fix it. @youknowriad Could you explain why |
It's called synchronously unlike |
Ah, so the e2e tests were querying for bit of DOM that only existed after the side effect executed. And now the effect is executed before that point. Makes sense. 👍 Very helpful to know about that distinction for the future, too. |
Exactly |
This delay was added in #21368 to stabilize e2e tests but ideally, it's not needed and may hide real bugs.