-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Migrate site editor multi-entity save flow tests #52372
Conversation
// Select the header template part via list view. | ||
await page.click( '.edit-site-header-edit-mode__list-view-toggle' ); | ||
const headerTemplatePartListViewButton = await page.waitForXPath( | ||
'//a[contains(@class, "block-editor-list-view-block-select-button")][contains(., "header")]' | ||
); | ||
headerTemplatePartListViewButton.click(); | ||
await page.click( 'button[aria-label="Close"]' ); |
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.
This step wasn't relevant to the tests, so I omitted it from migration.
Size Change: 0 B Total Size: 1.42 MB ℹ️ View Unchanged
|
Flaky tests detected in 7c5755c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5476935542
|
.getByRole( 'button', { name: 'Open save panel' } ) | ||
).toBeVisible(); | ||
|
||
await editor.saveSiteEditorEntities(); |
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.
Should we delete template parts before/after the tests to avoid the changes to persist between tests?
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.
A good idea. Added the template cleanup to the tests since we only change the templates now.
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.
This is looking good to me, just a minor comment, but thanks for migrating this, little by little we'll be rid of the puppeteer tests!
Thank you, @MaggieCabrera 🙇 |
What?
Part of #38851.
PR migrates Site Editor parts of
specs/site-editor/multi-entity-saving.test.js
e2e test to Playwright.Why?
specs/site-editor/multi-entity-saving.test.js
test has been failing a lot lately. The Puppeteer artifacts aren't helpful with debugging, and Playwright tests are more stable, in my experience.editor
andsite-editor
tests separately, I decided to split the test and migration efforts.Recent failures
Testing Instructions
CI checks are green, and puppies are happy 🐶
Puppeteer artifact
Based on this screenshot, a selected block is a paragraph but renders the Excerpt block controls. I am unsure how the tests ended in this block editor state.