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

Try stabilizing customize widgets e2e tests #32023

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,16 @@ async function addBlock( blockName ) {
);
await addBlockButton.click();

// TODO - remove this timeout when the test plugin for disabling CSS
// animations in tests works properly.
//
// This waits for the inserter panel animation to finish before
// attempting to insert a block. If the panel is still animating
// puppeteer can click on the wrong block.
//
// eslint-disable-next-line no-restricted-syntax
await page.waitForTimeout( 300 );

const blockOption = await find( {
role: 'option',
name: blockName,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use normal selectors here? And then we can just wait for the selector?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I guess that wouldn't work with the animation anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find does wait for the element, but yeah, the problem wasn't about that.

Expand Down