-
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
Page - Quick Edit: add E2E tests #68151
Conversation
Size Change: 0 B Total Size: 1.84 MB ℹ️ View Unchanged
|
Flaky tests detected in f00aa86. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12437480511
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
ae8fc97
to
cc3c2ea
Compare
cc3c2ea
to
f00aa86
Compare
const selectElement = page.locator( | ||
'select:has(option[value="1"])' | ||
); | ||
await selectElement.selectOption( { value: '1' } ); |
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 re-selecting the same author (admin), and we don't test the edited state. Perhaps we add a new author as part of the test.
@@ -53,4 +61,356 @@ test.describe( 'Page List', () => { | |||
page.getByRole( 'searchbox', { name: 'Search' } ) | |||
).toHaveValue( 'Privacy' ); | |||
} ); | |||
|
|||
test.describe( 'Quick Edit Mode', () => { | |||
const fields = { |
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 cool :)
const dateEl = page.getByLabel( 'Edit Date' ); | ||
await dateEl.click(); | ||
const date = new Date(); | ||
const yy = Number( date.getFullYear() ); |
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.
Nit: for a moment, my mind read this as if the year was two-digits — which is not what we render on screen. Naming this year or yyyy would be clearer.
} ) | ||
).toBeVisible(); | ||
}, | ||
assertEditedState: async () => {}, |
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.
Not for this PR, but we could try to add a test for when the slug is actually editable.
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.
Thanks!
I've added some comments but they are not blockers.
What?
This pull request includes significant enhancements to the end-to-end tests for the site editor's page list functionality. The changes introduce new external dependencies, refactor existing test setup, and add comprehensive tests for the quick edit mode.
This PR adds E2E tests to cover the Quick Edit mode in the site editor's page list functionality.
These tests cover all the current implemented fields.
There are two tests that are blocked by #68173 and #67584. Once that this PR is merged, I will create a dedicated issue to ensure that we don't forget to implement them.