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

E2E: stabilize failing tests in trunk #29836

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/e2e-tests/specs/editor/various/adding-blocks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,14 @@ describe( 'adding blocks', () => {
inserterMenuInputSelector
);
inserterMenuSearchInput.type( 'cover' );
// We need to wait a bit after typing otherwise we might an "early" result
// that is going to be "detached" when trying to click on it
// eslint-disable-next-line no-restricted-syntax
await page.waitForTimeout( 200 );
const coverBlock = await page.waitForSelector(
await page.waitForSelector(
'.block-editor-block-types-list .editor-block-list-item-cover'
);
await coverBlock.click();
// clicking may be too quick and may select a detached node.
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Tab' );
await page.keyboard.press( 'Enter' );

expect( await getEditedPostContent() ).toMatchSnapshot();
} );

Expand Down
23 changes: 7 additions & 16 deletions packages/e2e-tests/specs/experiments/navigation-editor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,26 +347,17 @@ describe( 'Navigation editor', () => {
);
await startEmptyButton.click();

// NOTE - the following code is commented out.
// In CI the editor doesn't seem to support variations.
// The following code can be re-introduced once that's resolved.
// Add an inner link block.
// const appender = await page.waitForSelector(
// 'button[aria-label="Add block"]'
// );
// await appender.click();
const appender = await page.waitForSelector(
Copy link
Contributor

Choose a reason for hiding this comment

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

@gwwar Thanks for switching this back. I'm curious - did the underlying issue (with variations not being available) get fixed here, or did it fix itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe from the server-side piece landing? WordPress/wordpress-develop#1015 (comment)

'button[aria-label="Add block"]'
);
await appender.click();

// Must be an exact match to the word 'Link' as other
// variations also contain the word 'Link'.
// const linkInserterItem = await page.waitForXPath(
// '//button[@role="option"]//span[.="Link"]'
// );
// await linkInserterItem.click();

const appender = await page.waitForSelector(
'button[aria-label="Add Link"]'
const linkInserterItem = await page.waitForXPath(
'//button[@role="option"]//span[.="Link"]'
);
await appender.click();
await linkInserterItem.click();

await page.waitForSelector( 'input[aria-label="URL"]' );

Expand Down