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. |
|
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 |
| 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.
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.