Opened 6 years ago
Last modified 7 days ago
#52895 accepted enhancement
Add end-to-end tests for wp-admin screens
| Reported by: | isabel_brison | Owned by: | lancewillett |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
#49507 adds e2e tests for the edit posts page. The goal is to write tests for all the admin, but we should be clear on which parts need most testing and what exactly to test. To kick things off, I'm making a list of all the pages, some of the tests we should write, and some questions that occurred to me. Feedback on what to add, change or remove is very welcome!
Dashboard:
- Quick draft section: add title, save draft, navigate to posts page and check it's there.
Updates page: not sure how we should test this one.
Categories:
- Add new category: add name, click add new category button, check if it appears in list
- Check that bulk deleting all categories leaves “uncategorized” untouched
- Add child category
- Delete category
- Search for category
- Search for non-existing category
Tags: same as categories.
Media:
- Add image to library
- Edit image alt text, title, desc
- Search for image
- Search for non-existing image
Pages: same as posts (see #49507)
Comments:
- Create post, view it, add a comment, check that it displays in comments page.
Themes:
- Search for a theme
- Activate a theme
- Delete a theme, then search for it
- Add new theme and activate it
Customize: this is pretty theme-dependent, so we should pick a theme and check a few flows on it.
Widgets and Menus: might not be worth writing tests yet as these screens are being re-written.
Theme editor:
- Add a line of CSS in the theme stylesheet and check for it in the front end?
Plugins: how should we test this page?
Users:
- Add new user
- Search for user
- change user role
- Check admin user can't change itself to subscriber
Profile: there are lots of options here, should we test changes to each of them? Some may not be relevant, e.g. profile pic just takes us to Gravatar.
Import: We could test whether the plugins install correctly, but any further than that should be unnecessary (the plugins should have their own tests)
Export/Export personal data: would it be worth trying to check the contents of the downloaded files?
Site health: there's no real interaction on this page, so maybe we can skip it.
Erase personal data: not sure how to test this one.
Settings: like profile, lots of options here. Test each individually?
Change History (236)
This ticket was mentioned in Slack in #core-test by isabelbrison. View the logs.
6 years ago
This ticket was mentioned in Slack in #core by isabelbrison. View the logs.
6 years ago
#4
@
6 years ago
Hello! The overview looks very good!
Here are some of my ideas on this:
Updates page:
- expected WordPress version is shown
- Plugins, Themes and Translations sections are present
Themes (additions to already suggested use cases):
- check that the current/default Theme is active
Theme editor (additions to already suggested use cases):
- just simply add "hello world" output on a homepage (it can be easier to assert)
Plugins:
- search for a plugin, install it, activate and deactivate
Profile:
- change default data and save changes
Export/Export personal data:
I think it is enough to check that a download is triggered.
Erase personal data:
- have a test user created in setUp of test data, search for this user, and check that this user appears in Requester. I do not think the real request needs to be executed and tested on this step
Settings:
I would check here all the defaults which are filled in for all Settings options.
This ticket was mentioned in PR #1231 on WordPress/wordpress-develop by JustinyAhin.
6 years ago
#5
- Keywords has-patch has-unit-tests added
Trac ticket: https://core.trac.wordpress.org/ticket/52895
#6
@
6 years ago
- Keywords has-patch has-unit-tests removed
I am drafting here https://github.com/WordPress/wordpress-develop/pull/1231 the Core categories tests
This ticket was mentioned in Slack in #core-test by justinahinon. View the logs.
6 years ago
This ticket was mentioned in Slack in #core-test by justinahinon. View the logs.
5 years ago
This ticket was mentioned in PR #1673 on WordPress/wordpress-develop by JustinyAhin.
5 years ago
#9
- Keywords has-patch has-unit-tests added
Related Trac ticket: https://core.trac.wordpress.org/ticket/52895.
This ticket was mentioned in PR #1672 on WordPress/wordpress-develop by JustinyAhin.
5 years ago
#10
Related Trac ticket: https://core.trac.wordpress.org/ticket/52895.
#11
@
5 years ago
I am going to split this ticket in multiple smaller tickets that will focus on specific parts to test.
#12
@
5 years ago
I believe this can then become a task, but I will defer to more experienced contributors :)
#13
follow-up:
↓ 14
@
5 years ago
Customize: this is pretty theme-dependent, so we should pick a theme and check a few flows on it.
There are several core options in the Customizer, like site identity, tagline, custom CSS, menus. But the loading and saving of all the registered options is Customizer code. Also the save as draft feature is core.
Does an end-to-end test mean that the main function of the page is tested, or that all the features on the page are tested?
#14
in reply to: ↑ 13
@
5 years ago
Replying to joyously:
Does an end-to-end test mean that the main function of the page is tested, or that all the features on the page are tested?
e2e testing is simulating a real world scenario to test functionality and performance from a user/product point-of-view. Click or do this workflow and then validate the expected result.
Yes, it is testing a feature and the functionality that delivers that feature. How? By running it in a complete way (end-to-end) which exercises that specific feature's software and systems to ensure all of the pieces are working together to deliver the expected behavior.
Does this make sense?
This ticket was mentioned in Slack in #core-media by sabernhardt. View the logs.
5 years ago
This ticket was mentioned in Slack in #core-test by ironprogrammer. View the logs.
4 years ago
This ticket was mentioned in PR #7712 on WordPress/wordpress-develop by @pavanpatil1.
2 years ago
#19
This ticket was mentioned in PR #7717 on WordPress/wordpress-develop by @pavanpatil1.
2 years ago
#20
This ticket was mentioned in PR #7732 on WordPress/wordpress-develop by @pavanpatil1.
2 years ago
#21
This ticket was mentioned in PR #7929 on WordPress/wordpress-develop by jayson31.
2 years ago
#22
This ticket was mentioned in PR #7946 on WordPress/wordpress-develop by @jayson31.
2 years ago
#23
Playwright e2e test for filtering media by type
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7947 on WordPress/wordpress-develop by @jayson31.
2 years ago
#24
playwright e2e test to filter media by date
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7957 on WordPress/wordpress-develop by @jayson31.
2 years ago
#25
Added Playwright e2e test to validate media list view
This ticket was mentioned in PR #7958 on WordPress/wordpress-develop by @jayson31.
2 years ago
#26
Added Playwright e2e test for bulk edit pages
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7959 on WordPress/wordpress-develop by @jayson31.
2 years ago
#27
Added Playwright e2e test to validate previewing a page
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7988 on WordPress/wordpress-develop by @jayson31.
2 years ago
#28
Added Playwright e2e test to validate taxonomy - Categories & Tags
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7991 on WordPress/wordpress-develop by @jayson31.
2 years ago
#29
Added Playwright e2e test for bulk delete of pages
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7992 on WordPress/wordpress-develop by @jayson31.
2 years ago
#30
Added Playwright e2e test for quick edit of pages
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7995 on WordPress/wordpress-develop by @jayson31.
2 years ago
#31
…antly from trash
Added Playwright e2e test for undo trashed post and delete posts permanently
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7997 on WordPress/wordpress-develop by @jayson31.
2 years ago
#32
Added Playwright e2e test for edit page
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #7998 on WordPress/wordpress-develop by @jayson31.
2 years ago
#33
Add Playwright e2e test to add a new page
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This ticket was mentioned in PR #8039 on WordPress/wordpress-develop by @juhise.
2 years ago
#34
This ticket was mentioned in PR #8040 on WordPress/wordpress-develop by @juhise.
2 years ago
#35
This ticket was mentioned in PR #8045 on WordPress/wordpress-develop by @juhise.
23 months ago
#36
This ticket was mentioned in Slack in #core-test by swissspidy. View the logs.
23 months ago
This ticket was mentioned in PR #8047 on WordPress/wordpress-develop by @juhise.
23 months ago
#38
This ticket was mentioned in PR #8049 on WordPress/wordpress-develop by @juhise.
23 months ago
#39
Trac ticket: https://core.trac.wordpress.org/ticket/52895
Also moved dashboard.test.js to dashboard directory
This ticket was mentioned in PR #8050 on WordPress/wordpress-develop by @juhise.
23 months ago
#40
This ticket was mentioned in PR #8051 on WordPress/wordpress-develop by @juhise.
23 months ago
#41
This ticket was mentioned in PR #8052 on WordPress/wordpress-develop by @juhise.
23 months ago
#42
Trac ticket: https://core.trac.wordpress.org/ticket/52895
It has test
- To trash a post
- To Restore post from trash
This ticket was mentioned in PR #8053 on WordPress/wordpress-develop by @juhise.
23 months ago
#43
E2E tests were running with twentytwentyone, made changes to work with current theme twentytwentyfour
Also made the changes in dashboard test to make it work with new activated theme
This ticket was mentioned in PR #8057 on WordPress/wordpress-develop by @juhise.
23 months ago
#44
This ticket was mentioned in PR #8066 on WordPress/wordpress-develop by @renishsurani.
23 months ago
#45
Added Playwright e2e test to validate theme editor
This ticket was mentioned in PR #8067 on WordPress/wordpress-develop by @renishsurani.
23 months ago
#46
Added Playwright e2e test to validate theme editor
This ticket was mentioned in PR #8075 on WordPress/wordpress-develop by @juhise.
23 months ago
#47
https://core.trac.wordpress.org/ticket/52895
It has tests to
- upload and install an older version of the plugin
- upload and update to a newer version of the plugin
- remove the installed plugin successfully'
This ticket was mentioned in PR #8082 on WordPress/wordpress-develop by @juhise.
23 months ago
#48
https://core.trac.wordpress.org/ticket/52895
It has tests to
- Add a new theme
- Activate a theme
- Delete a theme
This ticket was mentioned in PR #8089 on WordPress/wordpress-develop by @juhise.
23 months ago
#49
https://core.trac.wordpress.org/ticket/52895
It has tests to
- View the comment from backend
- Quick edit the comment
- Delete the comment
This ticket was mentioned in PR #8092 on WordPress/wordpress-develop by @juhise.
23 months ago
#50
This ticket was mentioned in PR #8095 on WordPress/wordpress-develop by @juhise.
23 months ago
#51
https://core.trac.wordpress.org/ticket/52895
It has tests to
- hide/show widgets using Screen Options
- move widgets using arrows
- collapse and expand widgets
This ticket was mentioned in PR #8099 on WordPress/wordpress-develop by @juhise.
23 months ago
#52
This ticket was mentioned in PR #8102 on WordPress/wordpress-develop by @juhise.
23 months ago
#53
22 months ago
#54
Thanks for the first pass on this. I think it needs to be expanded a bit before it's ready. I would like to see an additional type besides image that is uploaded and that test to ensure that the correct number of items is in the media directory before filtering and then at each step of the way (i.e. if an mp3 is uploaded along with the two images, check that there are 3 normally, 1 with audio, 0 with video, and 2 with image)
22 months ago
#56
This doesn't seem to actually test the filtering by date method. I think we need to upload the files and change the dates in order to do so
22 months ago
#57
One change that I would like to see is that the restoring of the default value should be moved into an afterAll action so that if the assertion fails for some reason, the default value is still restored.
22 months ago
#58
Hey @aaronjorbin
Thanks for the review. I agree that makes sense, somehow I missed this. I have added now in afterEach, please have a look.
afterAll can't be used as page fixtures are created per test basis
@jayson31 commented on PR #7946:
22 months ago
#59
Hi @aaronjorbin I have made the requested changes. Can you please recheck?
This ticket was mentioned in PR #8246 on WordPress/wordpress-develop by @juhise.
22 months ago
#60
Trac ticket: https://core.trac.wordpress.org/ticket/52895
This PR has test to
- create privacy page
- changes the Privacy Policy Page
- validates the Privacy Policy Guide Title
- copies WordPress text to clipboard
To make the "copies WordPress text to clipboard" test work, in Playwright config, this needs to be added
permissions: ['clipboard-read', 'clipboard-write'], // Allows clipboard read and write access
This ticket was mentioned in Slack in #core-test by krupajnanda. View the logs.
22 months ago
@swissspidy commented on PR #7946:
19 months ago
#62
Generally with Playwright one should avoid using CSS class locators as much as possible. Use methods such as getByRole instead.
@jayson31 commented on PR #7946:
19 months ago
#63
@swissspidy I have updated the locators except one as it does not have any additional attributes to refer to.
This ticket was mentioned in PR #12667 on WordPress/wordpress-develop by @csmcneill.
4 months ago
#64
e2e test that covers approving, unapproving, spamming, replying from the admin, and bulk spam via edit-comments.php — admin surfaces with no existing e2e coverage.
Comment moderation is one of the oldest admin workflows and currently has no e2e coverage. These tests self-provision their comments over the REST API, use role-based locators against the post-Reskin markup, and clean up after themselves.
This complements the in-flight quick-edit/delete work in #8089 rather than duplicating it — that PR covers viewing, quick-editing, and deleting; this one covers moderation state transitions and bulk actions.
Trac ticket: https://core.trac.wordpress.org/ticket/52895
## Verification
- Passes in this repository's local Docker environment against trunk (repeated runs).
- Also verified against WordPress 7.0.2 and 7.1-beta3 installs (wp-env) as part of a legacy-surface regression-testing effort for 7.1.
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude (Claude Code via Craft Agents)
Agent(s): Fable 5
Used for: Test authoring and cross-environment verification, with human review; reviewed and submitted by the author.
This ticket was mentioned in PR #12668 on WordPress/wordpress-develop by @csmcneill.
4 months ago
#65
Adds end-to-end coverage for scheduled post publishing: a true future-to-publish transition through WP-Cron, plus the Scheduled view of the posts list.
As far as I can tell, no e2e test currently exercises the actual cron transition — existing coverage stops at "the post is scheduled". The transition test schedules a post 60 seconds out by the server's own clock (read from an HTTP Date header, so host/container clock skew doesn't matter), lets the scheduled time pass, then drives wp-cron.php explicitly and asserts the status flip.
Two environment realities shaped the design and are documented in the spec:
- The scheduled wait issues no requests to the site. An ordinary request that observes a due event calls spawn_cron(), which takes the doing_cron lock and fires a non-blocking loopback request — and in this repository's Docker environment (and any environment that can't loop back to itself), that spawned request never executes, so the lock only shuts out wp-cron.php for the next minute. A quiet wait means the lock is free the moment the event is due.
- Driving wp-cron.php directly runs due events synchronously inside that request, making the transition deterministic instead of depending on loopback self-spawning.
Trac ticket: https://core.trac.wordpress.org/ticket/52895
## Verification
- Passes in this repository's local Docker environment against trunk (4 consecutive solo runs plus 3 consecutive runs composed with another spec).
- Also verified against WordPress 7.0.2 and 7.1-beta3 installs (wp-env) as part of a legacy-surface regression-testing effort for 7.1.
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude (Claude Code via Craft Agents)
Agent(s): Fable 5
Used for: Test authoring and cross-environment verification, with human review; reviewed and submitted by the author.
@csmcneill commented on PR #12667:
4 months ago
#66
Looking at the three failed PHPUnit tests, they all stopped at the Install WordPress step with service "cli" is not running, which suggests the Docker env's cli service never started on those runners. This means wp-cli had no container to run in and PHPUnit never executed. The previous run of this PR (same test-only diff) was fully green across the matrix.
@csmcneill commented on PR #12667:
4 months ago
#67
Looking at the three failed PHPUnit tests, they all stopped at the Install WordPress step with service "cli" is not running, which suggests the Docker env's cli service never started on those runners. This means wp-cli had no container to run in and PHPUnit never executed. The previous run of this PR (same test-only diff) was fully green across the matrix.
@csmcneill commented on PR #12668:
4 months ago
#68
The status-polling and time-sync requests can still trigger
spawn_cron()and take thedoing_cronlock, which can interfere with the explicitwp-cron.phpdrive and make the transition test less deterministic in non-loopback environments.
Adopted in 0b28beb —more details below.
Three commits on this branch since the last review:
89034a8 — wp_insert_post() coerces a post submitted as future into publish unless its date is at least MINUTE_IN_SECONDS ahead of the server clock, compared at whole-second resolution. The spec scheduled exactly sixty seconds out, so it only held when the insert landed inside the same clock second as the Date header it was derived from. It now schedules ninety seconds out and derives the wait from the date_gmt the server actually stored.
5fa66af — wp-cron.php runs every due event in timestamp order, and an install has a queue of unrelated core events already due ahead of anything a test creates. If one of those is slow, the drive is still working through them when its own lock expires, and it stops there. Recovery becomes available exactly when the lock expires, sixty seconds later — which made a sixty-second poll budget a dead heat rather than a limit. The budget now sits past WP_CRON_LOCK_TIMEOUT and the drive is reissued on a cadence just past it.
0b28beb — the point quoted above. Every request the spec makes now carries doing_wp_cron except the drives themselves, since spawn_cron() returns early when it is present.
On that last one: the effect is stronger than "less deterministic." A request that takes the doing_cron lock, holds it for WP_CRON_LOCK_TIMEOUT, and then delegates the actual run to a loopback request, so where loopback cannot be made, a one-second status poll against a sixty-five-second drive cadence plays out like this:
T+0 drive takes the lock
T+60 lock expires, the next poll takes it, delivers nothing
T+65 drive finds a fresh lock, is turned away, does nothing
T+120 lock expires, the next poll takes it again
T+130 drive turned away again
The transition never happens and no amount of budget rescues it. Worth saying plainly that the previous revision passed only because loopback _does_ work in the environment I validated it in — the poll's own spawned run was quietly doing the drive's job, which is exactly the dependency the explicit drive exists to remove.
I checked the switch rather than assuming it. Against a reproduction that starves the first drive with a slow event scheduled ahead of the post, the transition used to land at exactly +60s, from the poll's spawned run; it now lands at +66s, from the drive on its cadence. Same pass, different mechanism, and the mechanism was the point. Also 21/21 locally on 7.0.2 and 7.1-beta4, plus lint.
#69
@
4 months ago
I've been regression-testing the 7.1 betas against stable on the classic admin surfaces, and the functional specs from that effort are written to core's e2e conventions so they can land here. Three are open now, each on its own ticket so it can be reviewed and closed independently: comment moderation (#65771), scheduled post publishing through a real WP-Cron transition (#65772), and classic menus (#54892). Four more are staged behind review feedback: classic widgets in accessibility mode, permalink settings, the classic image editor, and role capabilities. All three open PRs pass the full CI matrix. Happy to adjust scope or split differently if there are existing plans under this ticket.
#70
@
5 weeks ago
- Milestone Awaiting Review → 7.2
- Owner set to
- Status new → accepted
I sorted the open PRs linked to this ticket: 37 open, against 13 E2E spec files in trunk today.
Summary
- In review now: 2
- Needs refresh: 31
- Recommend closing: 4
- Ready to commit: none yet
None of the 35 older PRs has current CI results, and none has changed since July 2026. The notes below come from reading each diff against trunk, not from running the tests.
In review now
Needs refresh
The same five problems recur, so a refresh should fix these first:
- Assertions missing
await, so they pass without checking anything. - "Select all" actions that touch content the test did not create.
- Changed settings or preferences left behind for the next test.
- Tests that only pass when run in order after an earlier test.
- Downloads from live services instead of fixtures in the repository.
Three are close and mostly need a run against trunk: PR 7992, PR 7998, and PR 8092.
Posts
| PR | Covers | Needed |
|---|---|---|
| 7929 | Save post as draft | Await the final title and status assertions. |
| 7988 | Categories and tags | Remove the duplicate parent selection; wait for created terms; clean up only its own terms. |
| 7995 | Undo trash, empty trash | Empty Trash is already covered. Keep the Undo link case and add it to the existing trash spec. |
| 8039 | Preview a post | Reopen the View menu between choices; use a unique post title. |
| 8040 | Bulk delete posts | Select only its own posts; await the header assertion; assert the exact count. |
| 8045 | Bulk edit posts | Select only its own posts; assert both changed status. |
| 8102 | Edit a post | Assert the new title after reload; fold into edit-posts.test.js.
|
Pages
| PR | Covers | Needed |
|---|---|---|
| 7958 | Bulk edit pages | Assert each seeded row changed, not any "Draft" text in the table. |
| 7959 | Preview a page | Await the cleanup call; replace expect( page.isVisible() ) with awaited locator assertions.
|
| 7991 | Bulk delete pages | Fix the role selectors, which contain stray spaces; assert both pages reached the trash. |
| 7992 | Quick edit a page | Run against trunk; confirm the accessible names still match. |
| 7997 | Edit a page | Await the final assertion; check the saved title after reopening. |
| 7998 | Add a page | Run against trunk; remove the commented-out modal handling. |
| 8051 | Save page as draft | Use the editor helpers instead of focus and arrow keys; assert the draft in the page list. |
| 8052 | Trash and restore a page | Make the restore case create its own trashed page; drop networkidle.
|
Media
| PR | Covers | Needed |
|---|---|---|
| 7717 | Delete media | Seed each case separately; assert which attachments were deleted. |
| 7946 | Filter by type | Delete uploaded media afterward. |
| 7947 | Filter by date | Both uploads share one month, so the filter is not tested. Seed two months and assert one is excluded. |
| 7957 | List view | Set grid view first; restore the view preference; delete uploaded media. |
| 8047 | Upload media | Update the expected heading to "Upload Media". |
PRs 7946, 7947, 7957, and 8047 each add the same JPG fixtures. They should share one copy.
Comments and users
| PR | Covers | Needed |
|---|---|---|
| 8089 | View, quick edit, delete a comment | Act on the comment it created, not the first row. |
| 7732 | Bulk delete users | Await user creation; delete only its own users. |
| 8057 | Create a user | Read the password with inputValue(); assert the login; stop depending on the earlier case.
|
Plugins and themes
| PR | Covers | Needed |
|---|---|---|
| 8050 | Activate, deactivate a plugin | Set the starting plugin state; remove early returns that pass without testing. |
| 8075 | Install, update, delete a plugin | Remove the dependence on the live update service and on test order. |
| 8082 | Install, activate, delete a theme | Replace the live theme download; assert activation; restore the previous theme. |
| 8067 | Theme editor | Activate a known theme, assert one flow, then restore the theme. |
Dashboard and settings
| PR | Covers | Needed |
|---|---|---|
| 8049 | Dismiss the welcome panel | Has conflicts. Drop the unrelated file move; restore the welcome panel preference. |
| 8095 | Dashboard widgets | Restore widget order and visibility; start waiting for the AJAX response before the click. |
| 8092 | Change the timezone | Run against trunk; confirm the setting is restored when the test fails. |
| 8246 | Privacy settings | Remove the hardcoded localhost URL and fixed sleep; restore the privacy page setting. |
Recommend closing
- PR 1672 (#54152): targets
masterand predates the move to Playwright.edit-posts.test.jsandempty-trash-restore-trashed-posts.test.jscover trash and restore. - PR 1673 (#54151): targets
masterand predates the move to Playwright. PR 8049 and PR 8095 above propose the same dashboard scenarios, so close this once those carry all four. - PR 8053: has conflicts. Its
(no title)fix is already indashboard.test.js. Switching the test theme from Twenty Twenty-One would need its own ticket. - PR 8099:
edit-posts.test.jsalready publishes a post and asserts its title in the list.
Next
Authors who want to refresh a PR: rebase on trunk and work through the "Needed" column. I'll review refreshed PRs as CI goes green.
@lancewillett commented on PR #12667:
5 weeks ago
#71
Review of 78e1603c71. Nothing blocking. All four cases cover behavior the PHPUnit AJAX tests do not: those assert response shape, not saved state or row behavior.
Four small changes requested in tests/e2e/specs/moderate-comments.test.js:
- Add
exact: trueto three role lookups.- Line 94:
name: 'Approve this comment'also substring-matches "Unapprove this comment". It works today only because the Pending view renders one of the two. - Line 166:
name: 'Comment'. - Line 242:
name: 'Apply'. - Lines 139 and 170 already use
exact: true.
- Line 94:
- Add a
messageto the reply poll at line 174. The other four polls have one; this one fails with a bare object diff. - Scope the visible-reply assertion (lines 202–206) to the reply's own row. Return the reply ID from the poll and assert inside
#comment-<replyId>. It is page-scoped now, and passes correctly only becausestrictSelectorsis on. - Back up or reword one claim in the PR description. "Bulk Spam: … without selecting unrelated comments" is not asserted. Either add a third pending comment that is left unchecked and assert it stays
hold, or drop the clause.
Not from this PR: on this head's run, login-localize-script.test.js:45 timed out and passed on retry in the "SCRIPT_DEBUG disabled" job. The four new tests passed first try in both jobs.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #12668:
5 weeks ago
#72
Review of dfc079cc85. Nothing blocking. The two PHPUnit tests are sound: both fire the registered hook with do_action_ref_array(), the same call wp-cron.php makes, with no mocks. Three changes requested.
1. Cover the status guard
check_and_publish_future_post() returns early when the post is not future:
Neither new test fails if that guard is removed, and no other test references the function. Add a third case beside the two in tests/phpunit/tests/cron.php: create a draft, fire publish_future_post with its ID, and assert it is still a draft.
2. Move the Scheduled view check from Playwright to PHPUnit
lists only scheduled posts in the Scheduled view covers no browser-only behavior. edit.php is server-rendered; the view link, the post_status=future filter, and the "Scheduled" label involve no JavaScript.
- Add the coverage to
tests/phpunit/tests/admin/wpPostsListTable.php, which has nofuturecase today. Assert the Scheduled view link, that apost_status=futurequery lists the scheduled post and excludes a published one, and that the date column shows "Scheduled". - Then remove
tests/e2e/specs/scheduled-posts.test.js. - Optional while there: a past-due
futurepost shows "Missed schedule" (class-wp-posts-list-table.php,column_date()). Nothing covers that label.
3. Small items
- In
test_scheduled_post_should_publish_when_due, also assertwp_next_scheduled( 'publish_future_post', array( $post_id ) )is false after publishing. - Add
@group postto the new cron tests; the function under test lives inpost.php. - Update the PR description to match: it says the browser case checks "scheduled post/date display", and after this change there is no browser case.
Not from this PR: on this head's run, login-localize-script.test.js:45 timed out and passed on retry in the "SCRIPT_DEBUG disabled" job.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #1672:
5 weeks ago
#73
Thanks for contributing these tests. Closing this older Puppeteer proposal as part of the #52895 backlog review. Current Playwright specs cover trashing and restoring posts in edit-posts.test.js and empty-trash-restore-trashed-posts.test.js.
The restored-title assertion here remains a useful improvement to carry into the existing restore test. Further work can build on those specs rather than reviving the old framework.
Context: https://core.trac.wordpress.org/ticket/52895#comment:70
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #1673:
5 weeks ago
#74
Thanks for contributing these dashboard scenarios. Closing this older Puppeteer proposal and carrying the useful cases forward through the Playwright refreshes in #8049 and #8095.
Those replacements are still unlanded. Preserve all four intents during their refresh: Welcome-panel visibility through Screen Options, dismissal, widget collapse/expand, and movement. In particular, #8095 currently skips the Welcome checkbox, so that case still needs attention.
This closes the older implementation, not the remaining coverage work. Context: https://core.trac.wordpress.org/ticket/52895#comment:70
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8053:
5 weeks ago
#75
Thanks for working on the E2E setup. Closing this as part of the #52895 backlog review: the (no title) assertions are already present in trunk, and the remaining switch from Twenty Twenty-One to Twenty Twenty-Four needs a separate proposal with a reason for changing the shared test theme.
The pending E2E refreshes can proceed with the existing theme. Context: https://core.trac.wordpress.org/ticket/52895#comment:70
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8099:
5 weeks ago
#76
Thanks for contributing this test. Closing it as duplicate coverage: edit-posts.test.js already creates and publishes a post and checks its title in the posts list. Maintaining that existing workflow gives us more useful coverage than another publication-notice check.
Context: https://core.trac.wordpress.org/ticket/52895#comment:70
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #12667:
5 weeks ago
#77
Addressed in 039c28cdc2: exact role matches, a diagnostic reply-poll message, and a visible-reply assertion scoped to the saved reply ID. Removed the unverified “without selecting unrelated comments” clause from the description.
All four moderation cases passed three repetitions without retries (12 passes). The focused E2E audit found no blockers.
Fresh CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #12668:
5 weeks ago
#78
Addressed in 2485b8b242: added the draft guard and event-cleanup assertions, added @group post, and moved Scheduled view/filter/date-label coverage into PHPUnit. Included the optional “Missed schedule” case and removed the Playwright spec. The description now reflects the PHP-only scope.
Randomized single-site and multisite runs both passed: 100 tests, 305 assertions. Removing the status guard made the new draft test fail as intended; restoring it passed. PHPCS and the unit-tests audit passed.
Fresh CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #12668:
5 weeks ago
#79
Re-review of 2485b8b242. Every change requested in the earlier review is in: the draft-guard case, the Scheduled view coverage moved to wpPostsListTable.php, the Playwright spec removed, the cleared-event assertion, @group post, and the description.
One nit, in test_prepare_items_should_only_include_scheduled_posts_when_filtered:
$this->assertSame( array( $scheduled_id ), $post_ids ); $this->assertNotContains( $published_id, $post_ids );
The second assertion can never fail once the first passes. Drop it, or keep it and add failure messages to both so the intent is clear.
CI was still running when I read this head: 9 passed, 65 pending, 0 failed.
This PR no longer adds an end-to-end test, so I removed the Trac #52895 link from the description. #65772 remains.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #12668:
5 weeks ago
#80
Addressed in 46d18b6215: removed the redundant assertion and unused ID variable, while keeping the published control fixture. The exact-ID assertion still verifies that only the scheduled post is listed.
The focused PHPUnit test and PHPCS passed.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7992:
5 weeks ago
#81
Review of 3be0acc33e. The spec is well built: an owned REST fixture, cleanup on failure, role-based lookups scoped to the fixture's row, and a reload to prove persistence. One change is needed for it to earn a separate browser test.
Assert a page-only path
The test edits only the title. tests/e2e/specs/edit-posts.test.js already covers that path for posts ("allows an existing post to be quick edited using the Quick Edit button"), through the same script and the same inline-save handler.
Quick Edit on pages does run page-only code, but this test asserts none of it:
src/js/_enqueues/admin/inline-edit-post.jsaddspost_parentto the fields for pages, and removes the page and its children from the Parent dropdown.wp_ajax_inline_save()mapspost_parentand returns the row at its hierarchy level.
A wrong Parent list or a wrong parent save would pass today. Requested, in tests/e2e/specs/pages/quick-edit-page.test.js:
- Create a parent page and a child page through REST.
- Open Quick Edit on the parent and assert the Parent select has no option for the parent itself or for its child.
- On a third page, set Parent to the parent page, save, reload, and assert the saved parent (REST) and the row's position under the parent.
- Keep the title edit as one step, and delete every page the test created.
Two small items:
- The fixture must be on the first list page, and global setup does not delete pages. Opening the list with a search for the fixture title removes that dependence.
- The describe block, the test, and the fixture title all read "Quick Edit page". A distinct fixture title makes failures easier to read.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7998:
5 weeks ago
#82
Review of a848fe256d. The assertions are strong: saved state read back through REST, then the page viewed on the front end. My concern is the layer, not the quality.
Recommendation: move the front-end check into the existing publish test, then close this PR
- Most of this test drives block editor UI: the title field, the empty paragraph, and the publish flow. Those are developed and tested in the Gutenberg repository.
- The page-specific core code on this path is the editor bootstrap for the
pagepost type.tests/e2e/specs/edit-posts.test.jsalready boots the same editor and publishes ("shows a single post after one is published with the correct title"). - One signal here is new and worth keeping: no existing spec checks that published content renders on the front end. That check is not page-specific.
Requested:
- In
tests/e2e/specs/edit-posts.test.js, in the publish test, visit the published post's link and assert the title heading is visible. - Close this PR once that lands.
If the spec is kept instead
- Lines 16–32: the
try/finallyruns a wait and anexpectinsidefinally. Ifadmin.createNewPost()throws, the error fromfinallyreplaces it and hides the cause. Capture the ID with a plain awaitedpage.waitForFunction()aftercreateNewPost(). - Lines 60–63: the lookup uses the block editor's placeholder text, "Empty block; start writing or type forward slash to choose a block". A package update that rewords it breaks this spec with no change in core behavior.
- Line 21: the URL lookup never matches on the normal path, as the comment above it says. It can go.
- Lines 4 and 9:
requirewhere the other specs useimport.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8092:
5 weeks ago
#83
Review of d7acfeb2fc. The restore logic is careful: it reloads a fresh form, restores through the form so UTC-offset choices survive, and asserts the result. My concern is the layer, not the quality.
Recommendation: move these assertions into the existing timezone spec, then close this PR
- No script touches the timezone field. Saving it is a plain form post to
options.php. tests/e2e/specs/general-settings-invalid-timezone.test.jsalready drives that same form and save. It setsEurope/Lisbon, saves, then posts an invalid value and asserts the select still holdsEurope/Lisbon.- That existing proof of a valid save is only implicit. It is also void when the site already holds
Europe/Lisbon, which the spec leaves behind after it runs.
This PR adds three things worth keeping: the "Settings saved." assertion, an explicit persisted-value assertion, and the restore hook.
Requested, in tests/e2e/specs/general-settings-invalid-timezone.test.js:
- After the first save, assert the "Settings saved." notice and
toHaveValue( 'Europe/Lisbon' ). - Move this PR's
beforeEachcapture andafterEachrestore into that describe block. - Start from a value other than
Europe/Lisbon, as this PR's target selection already does, so the valid save is always a real change. - Close this PR once that lands.
Small items, if the spec is kept instead
#setting-error-settings_updatedalso carries the error notices.page.getByText( 'Settings saved.' )says the same with less coupling.settings/settings.test.jsdoes not name the behavior under test.- Line 4 uses
requirewhere the other specs useimport.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7998:
5 weeks ago
#84
Closing this one, with thanks for the work on it and for the patience since 2024.
The reasoning is in the review above: most of this test drives block editor UI that is tested in the Gutenberg repository, and the existing publish test in tests/e2e/specs/edit-posts.test.js already boots the same editor.
The one new check here, that published content renders on the front end, is worth keeping. It belongs in that existing publish test and should be carried there in a separate change. The branch is left in place.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8092:
5 weeks ago
#85
Closing this one, with thanks for the work on it and for the patience since early 2025.
The reasoning is in the review above: saving the timezone is a plain form post that tests/e2e/specs/general-settings-invalid-timezone.test.js already drives.
Three things from this PR are worth keeping: the "Settings saved." assertion, the explicit persisted-value assertion, and the restore hook. They belong in that existing spec and should be carried there in a separate change. The branch is left in place.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7992:
5 weeks ago
#86
Updated in 5b92f3993526154f11c3f8cb22c945279ea54d9e: the case now exercises the page-only Parent control instead of repeating post-title editing. It saves the parent, reloads, and reopens Quick Edit to verify persistence. Both fixtures are cleaned up.
Scoped E2E audit passed; three local Chromium runs passed with retries disabled.
<sub>AI review · <code>gpt-6</code></sub>
This ticket was mentioned in PR #14206 on WordPress/wordpress-develop by @lancewillett.
5 weeks ago
#87
The existing publish test stops at the admin post list. Extend that same test to follow the View link and verify that the published title and body are visible on the front end.
Carries forward the useful render assertion from #7998 without adding a separate publish test. This covers posts; it does not claim page-specific coverage.
Trac: https://core.trac.wordpress.org/ticket/52895
Validation: the revised case passed three local Chromium runs with retries disabled. Scoped E2E and five-steps audits passed after correcting the View link’s accessible name. JavaScript syntax and whitespace checks passed.
<sub>AI review · <code>gpt-6</code></sub>
This ticket was mentioned in PR #14207 on WordPress/wordpress-develop by @lancewillett.
5 weeks ago
#88
The invalid-timezone tests currently leave the site using Lisbon and check only the form returned after submission. Capture and restore the original timezone, confirm successful saves, and reload settings to verify the last valid value persisted after an invalid submission.
Retains the three existing invalid inputs. Selects a different valid timezone when the site already uses Lisbon. Cleanup loads a fresh form and restores both named timezones and numeric UTC offsets. Carries forward the useful improvements from #8092 into the existing spec.
Trac: https://core.trac.wordpress.org/ticket/52895
Validation: all three cases passed three repetitions in local Chromium with retries disabled (9 checks). An already-Lisbon start passed and restored Lisbon. A deliberate failure away from settings still restored UTC+5:30; the probe was removed and original local settings restored. Scoped E2E/five-steps audit, JavaScript syntax and whitespace checks passed.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7992:
5 weeks ago
#89
Re-review of 5b92f39935. No blockers. The test now covers a path only pages have: it sets Parent through Quick Edit, saves, reloads, reopens Quick Edit, and asserts the saved parent. That exercises the post_parent field the script adds for pages and the handler's parent mapping, which the posts Quick Edit test cannot reach. Both E2E jobs passed on this head.
Dropping the title edit is fine; the posts test covers it. Checking the saved parent by reopening Quick Edit also proves the form is prefilled from the saved value.
One change recommended
Assert that the page is not offered as its own parent. The script removes the current page and its children from the Parent dropdown. Nothing asserts that yet, and it is the one piece of page-only script logic on this screen. After line 57:
await expect( parent.locator( `option[value="${ pageId }"]` ) ).toHaveCount( 0 );
Covering the child case too needs a third page created with parent: pageId, and the same assertion on its ID. Optional.
Small items, carried over
- Line 40: the fixture must be on the first list page, and global setup does not delete pages. Opening the list with a search for the fixture title removes that dependence.
- Lines 6 and 34: the describe block and the fixture title are both "Quick Edit page". A distinct fixture title makes failures easier to read.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #14206:
5 weeks ago
#90
Review of f15e270e3b. No blockers, and no changes requested to the test.
- Scope is right: it extends the existing publish test in
tests/e2e/specs/edit-posts.test.jsand adds no new spec. This is the first check in the suite that published content renders on the front end. - The assertions are sound: the row is hovered before the View link is clicked, the link is found by its full accessible name, and both the title heading and the body text are checked with exact matches. All are awaited.
- Theme dependence is covered: the heading assertion relies on Twenty Twenty-One, which global setup activates.
- CI: both E2E jobs passed on this head.
One change requested, to the description:
- Replace the footer with the AI disclosure section. The description ends with an "AI review" footer, which reads as a reviewer's sign-off on the author's own text. The pull request template asks for a "Use of AI Tools" section that says which tools were used and for what.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #14207:
5 weeks ago
#91
Review of e08b2a4110. No blockers, and no changes requested to the test.
- Scope is right: everything lands in the existing
tests/e2e/specs/general-settings-invalid-timezone.test.js. The three invalid inputs are kept. - The valid save is now proven every time: the test picks a timezone that differs from the starting value, uses a real
selectOption(), and asserts "Settings saved." Before, the proof was implicit and void when the site already heldEurope/Lisbon. - The rejection is now explicit: it asserts the "not valid" notice, the value on the response, and the value again on a fresh page load.
- State is restored:
afterEachreloads a fresh form, restores the captured value through the form, and asserts the result. Restoring through the form keeps UTC-offset choices intact. The spec no longer leaves the site onEurope/Lisbon. - CI: both E2E jobs passed on this head.
One change requested, to the description:
- Replace the footer with the AI disclosure section. The description ends with an "AI review" footer, which reads as a reviewer's sign-off on the author's own text. The pull request template asks for a "Use of AI Tools" section that says which tools were used and for what.
Track later, outside this diff: the spec still finds its controls by #timezone_string and #submit. Label and role lookups would match the newer specs.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7992:
5 weeks ago
#92
Added the self-parent assertion in e7ca5dcb9fce47dfa93c1ac5bdeb760aef63d9ae. It checks that the current page’s option is absent from the Parent select. The existing save/reload check remains. Three local Chromium runs passed with retries disabled.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8047:
5 weeks ago
#93
Refreshed on trunk and revised in 580731b64c. The successful upload case now sits beside the existing failure case and reuses a small JPEG fixture. It checks the completed title and Edit link; cleanup removes only its own attachment.
Both cases passed three local repetitions without retries. A deliberate failure after upload also cleaned up correctly. Ready for review of the revised scope and assertions; CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8047:
5 weeks ago
#94
Review of 580731b64c. No blockers.
- Scope is right: the successful upload is a second test in the existing
tests/e2e/specs/media-upload.test.js, beside the failure case. It adds no new spec and no new binary; it reusestests/phpunit/data/images/test-image.jpg. - It drives the real path: the Select Files button and file chooser, then the multipart POST to
async-upload.php. Filtering on the content type keeps the uploader's follow-up request to the same endpoint out of the match. - It asserts the visible result and ties it to the upload: the item title shows, and the Edit link points at the attachment ID the server returned.
- Cleanup is owned: the test deletes only the attachment it created, in
finally, so it also runs on failure. - CI: both E2E jobs passed on this head, and this test passed on its first attempt in both.
One small change requested
Lines 37–39 assert a boolean, so a failure prints only "expected true, received false":
expect( Number.isInteger( attachmentId ) && attachmentId > 0 ).toBe( true );
expect( attachmentId ).toBeGreaterThan( 0 ); fails with the actual value. NaN fails it too, which covers the error-response case.
Notes, no change needed
- If the upload succeeds but reading the ID fails, the attachment is left behind. The window is small, and the ID is read from both the response header and the body, so I would leave it.
- This is the first spec to read a fixture from
tests/phpunit/data. That is a reasonable trade against adding another image; a rename there would fail this test loudly.
Not from this PR: both E2E jobs retried login-localize-script.test.js:45 once (TimeoutError waiting for #login). That is the trunk failure tracked in Trac 66290.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8047:
5 weeks ago
#95
Addressed in 1d961daebb0eae5016fb9171ac1b5d79859ccc0b: the assertion now reports the attachment ID with toBeGreaterThan( 0 ). The focused upload test passed locally without retries.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8045:
5 weeks ago
#96
Refreshed on trunk and revised in ecd03aa414. The bulk-edit case now lives in the existing posts spec, uses owned REST fixtures, and checks both selected posts become drafts while an unselected control stays published.
Three repeated runs passed without retries. The full edited spec passed all six cases, and the scoped E2E audit found no blockers. Ready for independent review; CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8047:
5 weeks ago
#97
Re-reviewed at 1d961daebb. No open findings.
- The attachment ID check is now
expect( attachmentId ).toBeGreaterThan( 0 ), as requested. Nothing else in the diff changed. - CI is green. The new upload test passed on the first attempt in both E2E jobs.
- One E2E job retried
login-localize-script.test.js:45once (TimeoutErrorwaiting for#login). That is the trunk failure tracked in #66290, not something from this PR. The other job passed all 28 with no retry.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8045:
5 weeks ago
#99
Reviewed at ecd03aa414. No blockers and no requested changes.
What it covers
- One bulk-edit case added to the existing
edit-posts.test.js, with no new spec file. - The browser-only risk here is the Bulk Edit panel sending the right post IDs for the checked rows. The test covers it: two selected posts become drafts, and an unselected third post stays published.
- It asserts on saved state through REST as well as the list rows after a reload, so it does not depend on the notice alone.
- It creates its own three posts and deletes only those, in a
finallyblock.
Checked against trunk
- The
Bulk Editregion,Statusselect, andUpdatebutton matchclass-wp-posts-list-table.php. - The "2 posts updated." notice matches
edit.php.
CI
Green. Both E2E jobs passed all 28 tests with no retried test.
Optional nits, take or leave
- The new test sits outside the
Edit Postsdescribe block that holds every other test in the file. Moving it inside would match the file. - The bulk action select and Apply button use
.first()to pick the top copy.#bulk-action-selector-topand#doactionwould say that directly.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8040:
5 weeks ago
#100
Thanks for this. Bulk trash is worth keeping as an E2E case, in a smaller form than the separate spec here.
Why it earns a test
- The bulk form posts to its own handler, the
trashcase insrc/wp-admin/edit.php. The row Trash link that the existing specs click goes topost.phpinstead, so no current E2E test runs the bulk path. - That handler is a page script, so PHPUnit cannot reach it.
wp_trash_post()has unit tests; the form-to-handler path does not. - #8045 covers Bulk Edit, which opens a panel in JavaScript. Bulk trash submits the form directly, so #8045 does not cover it.
Requested shape
- One test in an existing spec, with no new file.
empty-trash-restore-trashed-posts.test.jsavoids a merge conflict with #8045, which appends toedit-posts.test.js. - Create three published posts through REST. Select two by ID, choose "Move to Trash", and apply.
- Assert the notice reads "2 posts moved to the Trash.", both selected posts have status
trashthrough REST, and the third is stillpublish. - Delete only the test's own posts in a
finallyblock. #8045 at ecd03aa414 is a good model for fixtures and cleanup.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7929:
5 weeks ago
#101
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
This proposal mainly exercises block-editor draft controls. We are keeping this effort focused on classic wp-admin integration; editor-specific draft behavior is better assessed in Gutenberg. This is a scope decision, not a claim that every assertion already has equivalent coverage.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8039:
5 weeks ago
#102
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
This proposal exercises the block editor’s device-preview controls and preview window. We are keeping this effort focused on classic wp-admin integration; editor-specific preview coverage is better assessed in Gutenberg.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8102:
5 weeks ago
#103
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
We are consolidating post-editing coverage in the existing tests/e2e/specs/edit-posts.test.js rather than adding a separate editor title-update spec. Any missing saved-title assertion can strengthen that existing workflow.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7958:
5 weeks ago
#104
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
This case repeats the shared bulk-edit status workflow being refreshed in #8045, without asserting a page-specific behavior. That PR is still awaiting human approval; this closure does not mean it has landed. A distinct page-only regression would justify revisiting this.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7959:
5 weeks ago
#105
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
This proposal exercises the block editor’s viewport-preview controls. We are keeping this effort focused on classic wp-admin integration; editor-specific preview coverage is better assessed in Gutenberg.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7991:
5 weeks ago
#106
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
We prefer one shared bulk-trash workflow rather than separate post and page copies of the same list-table action. #8040 is the remaining proposal for that coverage; it has not landed and its refresh is still pending a scope decision.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7997:
5 weeks ago
#107
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
We are consolidating shared editing behavior in the existing post-editing spec and reserving separate page tests for page-only behavior, such as the Parent control in #7992. This title-edit workflow does not establish a distinct page-only regression.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8051:
5 weeks ago
#108
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
This proposal checks block-editor draft notices and button state. We are keeping this effort focused on classic wp-admin integration; editor-specific draft behavior is better assessed in Gutenberg. This is a scope decision rather than a claim of complete replacement coverage.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8052:
5 weeks ago
#109
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
The existing tests/e2e/specs/empty-trash-restore-trashed-posts.test.js exercises the shared list-table trash/restore workflow for posts. We are consolidating that shared behavior rather than maintaining a separate page copy without a page-specific assertion.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7957:
5 weeks ago
#110
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
A standalone switch-to-list smoke test adds little beyond the substantive media-library workflows we plan to retain. #7717 is the candidate for list-based deletion coverage; it has not landed. A specific view-preference persistence regression would merit a focused follow-up.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8067:
5 weeks ago
#111
Thanks for contributing this test. We are closing this PR as part of the focused E2E backlog review for https://core.trac.wordpress.org/ticket/52895.
The current test proves only that an iframe is visible after opening Editor or Customize; it does not verify an editing outcome. The test setup also uses a classic theme. A future proposal should identify the intended editor and assert a concrete user-visible result.
We can reopen this if a concrete coverage gap warrants it. Your contribution remains available for follow-up work.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8040:
5 weeks ago
#112
Refreshed on trunk and revised in 114fb10f2f. One bulk-trash case now lives in the existing trash/restore spec, with REST fixtures, ID-scoped selection, persisted statuses, an unselected control, and owned cleanup.
All three cases passed three local repetitions without retries (9 checks). The scoped E2E audit found no blockers. Ready for review; CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8040:
5 weeks ago
#113
Reviewed at 114fb10f2f. No blockers and no requested changes.
- The diff matches the requested shape: one bulk trash test in
empty-trash-restore-trashed-posts.test.js, with the separate spec file removed. - It selects two of its own three posts by ID and applies "Move to Trash". It then checks the "2 posts moved to the Trash." notice, both saved statuses through REST, and that the third post is still listed and published.
- Cleanup deletes only the test's own posts, in a
finallyblock. - CI is green. Both E2E jobs passed all 32 tests with no retried test.
One optional nit: the new test sits outside the file's Empty Trash describe block.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7995:
5 weeks ago
#114
Refreshed on trunk and revised in b09fde8c35. The existing trash/restore spec now checks Undo restores the same post to published status. Existing Empty Trash and Restore cases remain unchanged.
All three cases passed three repetitions without retries (9 checks). Removing the Undo-specific action made the status assertion fail with draft instead of publish; the probe was removed.
The additions in this PR and #8040 apply cleanly in either order. Ready for review; CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7995:
5 weeks ago
#115
Reviewed at b09fde8c35. No blockers and no requested changes.
- One Undo test added to
empty-trash-restore-trashed-posts.test.js; the separate spec file is removed. Empty Trash was already covered there. - The test trashes its own post, clicks Undo, and asserts the saved status is
publish. An ordinary Restore returns a draft, so that assertion is what proves the Undo path ran. - The Undo link and both notices match
src/wp-admin/edit.php. - Cleanup deletes only the test's own post, in a
finallyblock. - CI is green, and the new test passed on the first attempt in both E2E jobs. One job retried
login-localize-script.test.js:45once (TimeoutErrorwaiting for#login). That is the trunk failure tracked in #66290, not something from this PR.
Two optional nits:
- The PR title still says "and delete posts permanently", which this PR no longer adds.
- The Undo locator could be scoped to
#message.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #12668:
5 weeks ago
#116
@lucatume Thanks for the detailed review. Addressed all six comments in 1cc2152251.
Three randomized local runs passed, including multisite: 101 tests and 306 assertions each. PHPCS passed, and the unit-tests audit found no blockers. Removing the missing-post guard fails the new check; restoring it passes. Ready for re-review once CI finishes.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8089:
5 weeks ago
#117
Refreshed on trunk in 946562fef6. This now adds one Quick Edit case to the existing moderation spec, reusing its REST fixtures and cleanup. It checks the editor’s initial content, the saved row, and persistence after reload. The old standalone file is removed.
All five moderation cases passed three times locally without retries: 15 checks in 31.6 seconds. Syntax and whitespace checks passed. The E2E and five-steps audits found no blockers. Fresh CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #12668:
5 weeks ago
#118
Re-reviewed at 1cc2152251. No open findings.
- The one commit since 46d18b6215 applies all six of @lucatume's suggestions as written, and changes nothing else.
- The due-publication test now unschedules the event before firing the hook, as
wp-cron.phpdoes. - The new missing-post test covers the
! $postguard incheck_and_publish_future_post(). - The request-global backups are gone; the base test setup resets
$_GET,$_POST, and$_REQUESTbefore each test. - CI is green: 74 checks passed, 16 skipped, none failed.
<sub>AI review · <code>claude-opus-5-5</code></sub>
#119
@
5 weeks ago
Update to comment:70. Of those 37 PRs: 1 landed, 5 are in review, 17 are closed, and 13 are still open.
Each PR was kept only where the risk is in the browser and no existing test covers it.
Landed
In review, CI green
- PR 7992: page Quick Edit saves a Parent.
- PR 8045: Bulk Edit changes only the selected posts.
- PR 7995: Undo returns a trashed post as published.
- PR 8040: bulk trash moves only the selected posts.
- PR 8047: a JPEG upload completes.
- PR 14206: a published post renders on the front end. Carries the one new check from PR 7998.
- PR 14207: the timezone setting persists and is restored. Carries the checks from PR 8092.
Closed
Each has a comment with the reason: it repeats a workflow an existing spec covers, or it tests block editor behavior that belongs in Gutenberg.
- 1672, 1673, 7929, 7957, 7958, 7959, 7991, 7997, 7998, 8039, 8051, 8052, 8053, 8067, 8092, 8099, 8102.
Still open
PR 12668 (#65772) became PHPUnit tests only and landed in [64314], so it left this ticket. The work also turned up #66290.
@lancewillett commented on PR #8089:
5 weeks ago
#120
Reviewed at 946562fef6. No blockers and no requested changes.
- One Quick Edit test added inside the existing
Moderate Commentsdescribe block inmoderate-comments.test.js; the standalone spec file is removed. - It reuses the spec's
createPostWithComment()helper and itsafterEachcleanup, so it acts only on a comment it created. - It asserts the edited text in the comment's own row after saving and again after a reload, so the check does not rest on the inline form closing.
- The "Quick edit this comment inline" and "Update Comment" labels match
class-wp-comments-list-table.phpandtemplate.php. - CI is green. Both E2E jobs passed all 32 tests with no retried test.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7988:
5 weeks ago
#121
Refreshed on trunk in 8ff8228745. The two specs are consolidated into seven cases: add, Quick Edit, and delete for categories/tags, plus category-parent persistence. REST prepares fixtures; cleanup targets only the test’s unique slugs.
The sorting and post-assignment cases are omitted from this admin-screen scope. This does not claim the editor-assignment flows have equivalent coverage elsewhere.
All seven cases passed three times locally without retries (21 checks, 34.5 seconds). Syntax/whitespace checks passed, and the E2E and five-steps audits found no blockers. CI is running.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7988:
5 weeks ago
#122
Review of 8ff8228745. No requested changes.
What I checked
- Scope: one new spec,
tests/e2e/specs/taxonomies.test.js, with seven cases: add, Quick Edit, and delete for categories and tags, plus a category added under a parent. - Why a browser test: each case goes through the admin scripts on the terms screen: the AJAX add form, the inline editor, and the delete confirmation. Each one checks the result again after a fresh page load, and delete and parent also confirm it over REST.
- Locators: checked against
WP_Terms_List_Table. The row title link carries noaria-label, so the exact-name match is right. The Quick Edit button and Delete control labels match the markup, and the Delete link has its button role on a freshly loaded page. - Isolation: every term uses a slug built from a per-test UUID. Cleanup looks up only those slugs and runs after a failed assertion too, child before parent.
CI
Run 38265100742 is green. Both E2E jobs passed 37 tests, and all seven new cases passed on the first attempt.
One existing test was retried in each job: login-localize-script.test.js:45 timed out waiting for #login, then passed. That is the failure tracked in Trac 66290, which #14205 fixes. This PR does not touch that spec or the install spec that causes it.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7717:
5 weeks ago
#123
Refreshed on trunk in 92351e2b2e. This now covers single deletion, bulk deletion with an unselected control, and grid type filtering carried forward from Jayson Rodrigues’s #7946. Existing fixtures replace the three duplicate images. Each test cleans up only its own attachment IDs.
Deletion assertions include trashed/private attachments, and grid assertions check both matching and excluded tiles after loading. All three cases passed three times locally without retries (9 checks, 12.9 seconds). Syntax/whitespace checks passed; the E2E and five-steps audits found no remaining blockers. Fresh CI is running.
#7946 remains open while this consolidation is reviewed. Its plain GET-based list filter is outside this browser scope.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7717:
5 weeks ago
#124
Review of 92351e2b2e. No requested changes.
What I checked
- Scope: one new spec,
tests/e2e/specs/media-library.test.js, with three cases: permanently delete one attachment, bulk delete two while a third stays, and filter the grid by audio and image. - Why a browser test: both delete cases depend on the confirmation dialog that the admin scripts attach, and the bulk case runs through the
upload.phpscreen handler. The grid filter is rendered entirely by the media scripts. - Assertions: each delete case checks the notice, the rows, and the REST response. The bulk case proves the unselected attachment survives. The grid case checks both directions and rechecks the hidden tile after the matching tile appears, so a loading state cannot satisfy it.
- Locators and strings: the delete label, both notices, the "Search media" and "Filter by type" labels, and the two fixture files all match trunk.
- Isolation: each test uploads its own attachments, titles them with a per-test UUID, and deletes only those IDs afterward, including after a failed assertion.
CI
Run 38265875156 is green. All three new cases passed on the first attempt in both E2E jobs.
One existing test was retried in the "SCRIPT_DEBUG disabled" job: login-localize-script.test.js:45 timed out waiting for #login, then passed. That is the failure tracked in Trac 66290, which #14205 fixes. This PR does not touch that spec or the install spec that causes it.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7946:
5 weeks ago
#125
Closing this in favor of #7717, which now carries the grid filter case from this PR alongside the media deletion tests.
What carried over: the grid view filter, switching between audio and images and checking that the matching attachment shows and the other does not. It follows the review feedback here: a second media type, and role-based locators.
What did not: the list view filter. That one is a plain page request with no script involved, so it fits better below the browser level.
Thank you, Jayson, for the original work. #7717 notes that the landing commit should give props to jayson31, jorbin, and swissspidy from this PR.
Trac ticket: https://core.trac.wordpress.org/ticket/52895
@lancewillett commented on PR #7732:
5 weeks ago
#126
Refreshed in 47a7fe3fe5282a7b1f6546126df463f56985924c. This now covers user creation followed by login in a fresh browser context, plus bulk deletion with an unselected control. The creation scenario carries forward @juhi123’s work in #8057; its contribution is recorded in the description for props.
Both cases passed three local single-site Chromium runs without retries (6 checks, 15.5 seconds). Scoped E2E and five-steps audits found no blockers. CI and independent review are next; #8057 remains open pending the consolidation decision.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7732:
5 weeks ago
#127
Review of 47a7fe3fe5. One requested change before this is ready.
Requested change: wait for the login page's focus script before filling the form
In run 38269173134, "creates a user who can log in" failed on its first attempt in the "SCRIPT_DEBUG enabled" job, then passed on retry. It passed first time in the other job.
- Observed: the Profile heading never appeared (
users.test.js:88). The page snapshot from the failure shows the login form still open, with the generated password in the "Username or Email Address" field and the Password field empty. - Cause:
wp-login.phpprintswp_attempt_focus(), which waits 200 ms and then callsfocus()andselect()on#user_login(src/wp-login.php:1620-1636).fill()focuses its target and then inserts text into whatever holds focus. When the timer fires between those two steps of the Password fill, the password replaces the username. - Fix: before the first
fill(), wait for the script to finish, for exampleawait expect( usernameField ).toBeFocused();. After that the timer cannot fire again, and both fills land where intended.
Label: intermittent test design, a race with the login page's delayed focus script.
Everything else checked out
- Create case: reads the password the admin script generates, turns off the notification email, and proves the account by logging in from a clean browser context.
- Bulk delete case: runs through the
users.phpconfirmation screen and checks the notice, the rows, and the REST response, with an unselected user as the control. - Strings and labels match trunk. Cleanup removes only the usernames each test created.
- CI: otherwise green; the bulk delete case passed first time in both jobs.
Separate from this PR: install.test.js:156 fills the same login form without that wait, so it carries the same race.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7732:
5 weeks ago
#128
Fixed the login timing issue in 64328ffa3ff27416691e50dbcef27749aa2cd58f. The test now waits for WordPress’s delayed username autofocus before filling either credential field. This prevents the focus timer from interrupting password entry.
Both cases passed three local repetitions without retries (6 checks, 17.3 seconds). The original local multisite configuration was restored. Fresh CI is running for this head.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8075:
5 weeks ago
#129
Refreshed in 076b40e352bd5d74ff21877c835cdbab49eeba97. Three independent cases cover upload with activation/deactivation, replacement with a newer version, and confirmed deletion. The activation/deactivation scenarios carry forward your work in #8050.
Two tiny fixture archives replace Akismet. Each case checks saved state and cleans up only its own fixture. All nine local checks passed without retries (55.8 seconds); scoped E2E and five-steps audits found no blockers.
Fresh CI and independent review are next. #8050 remains open pending the consolidation decision, with its contribution recorded in the description.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7732:
5 weeks ago
#130
Re-review of 64328ffa3f. The requested change is in; no open findings.
- The fix: the test now waits for the Username field to hold focus before either fill. Nothing else focuses that field: it has no
autofocusattribute, so the wait can only pass after the login page's delayed focus script has run. - CI: run 38280832574 is green. Both new cases passed on the first attempt in both E2E jobs.
One existing test was retried in each job: login-localize-script.test.js:45 timed out waiting for #login, then passed. That is the failure tracked in Trac 66290, which #14205 fixes. This PR does not touch that spec or the install spec that causes it.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8075:
5 weeks ago
#131
Review of 076b40e352. One small requested change; the tests themselves are sound.
Requested change: put the fixtures in the existing assets folder
This PR adds a new tests/e2e/test-data/ folder. Trunk already has tests/e2e/assets/ for E2E fixtures, used by media-upload.test.js:19 for sample.svg. Please move the two ZIP files and their note there, and update the path in uploadPlugin().
What I checked
- Scope: one new spec with three cases: upload, activate, and deactivate; replace an installed version with an uploaded one; delete after confirmation.
- Fixtures: I listed both archives without extracting them. Each is 251 bytes and holds one file,
e2e-test-plugin/e2e-test-plugin.php, with only a plugin header. They match the note in the PR, and they differ only in the version line. - Assertions: each case checks the screen and then the saved state over REST: status after activate and deactivate, version 1.0 then 2.0 after replace, and absence after delete and reload.
- Isolation: setup fails without touching anything if the fixture plugin is already installed. Cleanup deactivates and deletes only that plugin, and only when the test installed it.
- Strings: the install, update, replace, and delete messages match trunk.
CI
Run 38281150390 is green. All three new cases passed on the first attempt in both E2E jobs.
One existing test was retried in each job: login-localize-script.test.js:45, the failure tracked in Trac 66290, which #14205 fixes. Not from this PR.
For the human reviewers
This adds two binary files to the repository. They are tiny and reproducible from the note, and PHPUnit already keeps ZIP fixtures under tests/phpunit/data/filesystem/. Whether committed archives are acceptable for E2E is a committer's call.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8075:
5 weeks ago
#132
Moved the fixture archives and their documentation into the existing tests/e2e/assets/ directory in a54d88440c. Updated the upload path and regeneration instructions. All three local cases passed without retries (19.5 seconds); multisite was restored afterward.
@lancewillett commented on PR #8082:
5 weeks ago
#133
Refreshed in a496b67751a30d99174d85fc5bbdae92f4c389c6. Two independent cases now cover activation from the theme card and confirmed deletion from theme details. A local fixture replaces the live theme-directory dependency.
Both cases verify visible results and persisted state after reload. Cleanup restores the previous theme and removes only the fixture. Six local checks passed without retries (33.5 seconds); scoped E2E and five-steps audits found no blockers.
CI and independent review are next. Fixture packaging is still under discussion alongside #8075: committed ZIPs versus archives generated in memory.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8075:
5 weeks ago
#134
Re-review of a54d88440c. The requested change is in; no open findings.
- The move: both archives and their note now sit in
tests/e2e/assets/, and the spec and the rebuild script point there. The two archives are byte-identical to the ones I inspected at 076b40e352. - CI: run 38282114016 is green. All three new cases passed on the first attempt in both E2E jobs.
- Fixtures: committed archives are the chosen approach here; the description now gives the reasons.
One existing test was retried in one job: login-localize-script.test.js:45, the failure tracked in Trac 66290, which #14205 fixes. Not from this PR.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8082:
5 weeks ago
#135
Review of a496b67751. No requested changes.
What I checked
- Scope: one new spec with two cases: activate an installed theme from its card, and delete an inactive theme from its details view after confirming.
- Why a browser test: the theme grid, the details view, and the delete request are all driven by the admin scripts. Each case checks the screen, reloads, and then confirms the saved state over REST.
- Fixture: I listed the archive without extracting it. It is 2,524 bytes with three files: a
style.cssheader, a two-lineindex.phpthat runs nothing, and a screenshot that is byte-identical totests/phpunit/data/images/test-image.jpg. It matches the note in the PR. - Isolation: setup fails without touching anything if the fixture theme is already installed. Cleanup restores the theme that was active before, removes only the fixture, and then asserts both.
CI
Run 38282514842 is green. Both new cases passed on the first attempt in both E2E jobs.
One existing test was retried in each job: login-localize-script.test.js:45, the failure tracked in Trac 66290, which #14205 fixes. Not from this PR.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8095:
5 weeks ago
#136
Refreshed in bb6a3af777d6de63e766f910d095b7ef38e6251d. Five cases now verify saved dashboard preferences after reload: Welcome dismissal and checkbox visibility, widget visibility, collapse/expand, and movement down/up. This carries forward your Welcome dismissal scenario from #8049.
Each case uses a temporary administrator with isolated preferences. Cleanup removes the user and its Quick Draft auto-drafts. Existing Quick Draft tests are preserved unchanged.
The full spec passed three local repetitions without retries (27 checks, 59.9 seconds). Scoped E2E and five-steps audits found no remaining blockers. CI and independent review are next; #8049 remains open pending the consolidation decision.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8049:
5 weeks ago
#137
Closing this in favor of #8095, which now carries the welcome panel case from this PR alongside the other dashboard preference tests.
What carried over: dismissing the Welcome panel and checking it stays hidden after a reload. #8095 also covers showing and hiding it through Screen Options.
Thank you, Juhi, for the original work. Both PRs are yours, and #8095 notes that the landing commit should give props to juhise.
Trac ticket: https://core.trac.wordpress.org/ticket/52895
@lancewillett commented on PR #8246:
5 weeks ago
#138
Refreshed in c3b316f3ed184f90c337eef726db30bffe854c5a. Two focused cases cover creating/selecting a draft privacy page and copying suggested policy text to the real browser clipboard.
The creation test restores the original setting and removes only its new page. Clipboard checks exclude tutorials and toolbar text, including a second click while “Copied!” is visible. A temporary contamination probe failed as intended when that notice entered the clipboard.
All six local checks passed without retries (11 seconds). Scoped E2E and five-steps audits found no remaining blockers. CI and independent review are next.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8095:
5 weeks ago
#139
Review of bb6a3af777. No requested changes.
What I checked
- Scope: five new cases added to the existing
dashboard.test.js: dismiss the Welcome panel, show and hide it from Screen Options, and hide, collapse, and move the At a Glance widget. The existing Quick Draft cases are untouched. - Why a browser test: every case saves a preference through an admin script and an Ajax request. Each one reloads the page and checks the saved state, in both directions where there are two.
- Waiting on the save: each change waits for the matching
admin-ajax.phpresponse by its action name before reloading, so a reload cannot race the save. I checked the five action names against trunk. - Isolation: each case logs in as its own temporary administrator, so the shared admin's dashboard preferences never change. Cleanup deletes only that user, and its auto-drafts with it.
- Login: the setup waits for the Username field to hold focus before filling, which avoids the delayed focus race found on #7732.
- Order check: the move case uses the Move down and Move up buttons and compares the saved widget order, not pixel positions.
CI
Run 38283190343 is green. All five new cases passed on the first attempt in both E2E jobs.
One existing test was retried in one job: login-localize-script.test.js:45, the failure tracked in Trac 66290, which #14205 fixes. Not from this PR.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8246:
5 weeks ago
#140
Review of c3b316f3ed. Two requested changes; both are about what happens on a slow or failed run, not about what the tests check.
1. Move the settings restore and page deletion into afterEach
The first test changes a site-wide setting, the privacy policy page, and restores it in a finally block inside the test body. If the test times out, that block runs with no time budget of its own, so the restore and the page deletion may not finish. Every later spec would then see the wrong privacy page.
Please wrap the tests in a describe and do the restore and deletion in afterEach, as the other specs in this batch do. Hooks keep running after a timeout with their own budget.
2. Don't race the 3-second "Copied!" notice
The second pass through the copy loop first asserts that the notice is still visible. privacy-tools.js hides it 3,000 ms after the click. If the runner stalls for longer than that between the two passes, the assertion fails for a reason unrelated to the copy behavior.
Please make that step independent of the timer. Playwright's page.clock can pause time after the first click, so the notice cannot expire before the second one. The installed version, 1.61.1, supports it.
Everything else checked out
- Create case: the page ID comes from the redirect, and the test then checks the draft's title, status, and content, the saved setting, and the selected option on the settings screen.
- Copy case: it reads the real clipboard, resets it to a sentinel before each click, and compares against the text shown on the page. The second pass is what covers the toolbar text from Trac 58969.
- Labels and selectors match trunk, and the REST setting name exists there.
- CI: run 38283794786 is green. Both new cases passed on the first attempt in both E2E jobs, with no retried test in either job.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #8057:
5 weeks ago
#141
Closing this in favor of #7732, which now carries the user creation case from this PR alongside a bulk deletion test.
What carried over: creating a new user through the Add User screen. The standalone delete and role-edit cases were not carried forward; #7732 covers deletion through the bulk action.
Thank you, Juhi, for the original work. #7732 notes that the landing commit should give props to juhise.
Trac ticket: https://core.trac.wordpress.org/ticket/52895
@lancewillett commented on PR #8050:
5 weeks ago
#142
Closing this in favor of #8075, which now carries the activation and deactivation cases from this PR alongside the plugin upload and replacement tests.
What carried over: activating and deactivating a plugin from the Plugins screen. #8075 runs them against a small fixture plugin, so they no longer depend on a bundled one.
Thank you, Juhi, for the original work. Both PRs are yours, and #8075 notes that the landing commit should give props to juhise.
Trac ticket: https://core.trac.wordpress.org/ticket/52895
@lancewillett commented on PR #8246:
5 weeks ago
#143
Addressed both findings in c8cb31b05c:
- Moved settings restoration and owned-page deletion into
afterEach. A forced timeout after creation confirmed that the original setting and page IDs were restored. - Installed the browser clock before navigation and paused it before copying. A four-second real-time delay between copies passed, preserving the visible-notice regression scenario.
All six final local checks passed without retries (14 seconds). Both temporary probes were removed, and the scoped E2E audit found no new blockers. Fresh CI is running.
<sub>AI review · <code>gpt-6</code></sub>
This ticket was mentioned in PR #14220 on WordPress/wordpress-develop by @lancewillett.
5 weeks ago
#144
The login page focuses and selects the username field after a 200 ms timer. Filling credentials before that callback runs can move focus during the password fill.
Wait for the username field to receive focus before filling either credential. This uses the same synchronization as #7732 and leaves the installation and login assertions unchanged.
Testing
- Installation spec: three local repetitions passed without retries (25.9 seconds).
- Scoped E2E audit and five-steps review: no findings.
- JavaScript syntax and whitespace checks passed.
Use of AI Tools
Implemented and locally validated with Codex (GPT-6), including a separate scoped audit. Human review is pending.
@lancewillett commented on PR #8246:
5 weeks ago
#145
Re-reviewed at c8cb31b05c. Both earlier findings are fixed and I have no open findings.
- Cleanup: the privacy page setting restore and the page deletion now run in
afterEach, so a timed-out test still restores the site-wide setting. - Notice timer: the test installs and pauses the page clock before copying, so the 3-second "Copied!" notice can't expire between the two copy passes.
CI is green on this head. Both new cases passed on the first attempt in both E2E jobs: 33 passed with SCRIPT_DEBUG enabled, and 32 passed plus one retried test with it disabled. The retried test is login-localize-script.test.js:45, the existing timeout tracked in Trac 66290, not part of this PR.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #14220:
5 weeks ago
#146
Reviewed at a723c8f9f3. No open findings.
The change waits for the username field to be focused before filling the login form. wp-login.php focuses and selects that field 200 ms after load, so a fill that starts earlier can lose focus mid-way. This is the same wait #7732 uses, and nothing else in the spec changes.
CI is green on this head. All 31 E2E tests passed on the first attempt in both jobs, with no retried test.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #7947:
5 weeks ago
#147
Refreshed in c772be4234, addressing the concern that the original test never filtered anything.
The replacement uses the real PHP AJAX handler with attachments in different months and years, and checks exact returned IDs. It also covers no matches and “All dates.” This follows the batch audit's recommendation to cover the date-query behavior below the browser layer; date-dropdown JavaScript mapping is outside this patch.
Randomized single-site and multisite runs each passed six tests and 20 assertions. Removing either date constraint made the new tests fail. PHPCS and the scoped unit-tests audit passed. Original patch credit remains with @jayson31.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #7947:
5 weeks ago
#148
Reviewed at c772be4234. No open findings.
The new test creates three attachments dated July 2020, August 2020, and July 2021, calls the real query-attachments AJAX handler, and compares the exact IDs returned. It covers one month and year, a month with no matches, and "All dates".
Checked against trunk:
wp_ajax_query_attachments()acceptsyear,monthnum, andpost__in, so the test's query reachesWP_Queryunchanged.- The "All dates" case sends
falsefor both values, which is what the media grid's date filter sets for that option.
This answers the earlier comment that the original browser test never filtered by date. It does not cover the date dropdown's JavaScript, and the description says so.
CI is green on this head: 75 checks passed and 10 were skipped.
<sub>AI review · <code>claude-opus-5-5</code></sub>
#149
@
5 weeks ago
Updates:
Newly in review
- PR 7717: media deletion and grid filtering. Carries the filter-by-type case from PR 7946.
- PR 7732: user creation and bulk deletion. Carries the create-user case from PR 8057.
- PR 7988: category and tag workflows.
- PR 8075: plugin upload, replacement, and management. Carries the activate and deactivate case from PR 8050.
- PR 8082: theme activation and deletion.
- PR 8089: comment Quick Edit saves its changes.
- PR 8095: dashboard preferences persist. Carries the welcome panel case from PR 8049.
- PR 8246: privacy page creation and policy text copying.
- PR 7947: media date filtering. Now a PHPUnit test of the attachment AJAX handler, not an E2E test.
Still in review from comment:119
Closed since comment:119
Each was folded into a PR above, with a comment naming it.
Found along the way
#150
@
5 weeks ago
- Summary Overview of e2e tests to be written → Add end-to-end tests for wp-admin screens
@lancewillett commented on PR #14206:
5 weeks ago
#152
PR #14206 landed in https://core.trac.wordpress.org/changeset/64407
@lancewillett commented on PR #14207:
5 weeks ago
#153
Fixed in 9d6a06c4ca. The settings form displays UTC+0:30 and UTC−0:30 as UTC+0, so restoring its selected value silently changed the original offset—even while the test passed.
Setup and cleanup now preserve the stored timezone_string and gmt_offset through WP-CLI. The browser assertions remain unchanged. Repeated tests and offset-restoration probes passed, including cleanup after an intentional test failure.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #14220:
5 weeks ago
#155
PR #14220 landed in https://core.trac.wordpress.org/changeset/64408
@lancewillett commented on PR #8095:
5 weeks ago
#156
Fixed in 67b1753a360748c7c2b64b2597fa9fe08df9d1a5. Deleting the temporary administrator moved its Quick Draft auto-drafts to Trash instead of removing them; the passing tests left orphaned posts behind.
Cleanup now fetches only that user's auto-drafts and force-deletes each one before deleting the user. The dashboard assertions are unchanged. Both debug settings passed three full-spec repetitions, with no temporary users or orphaned posts remaining.
<sub>AI review · <code>gpt-6</code></sub>
@lancewillett commented on PR #8246:
5 weeks ago
#158
PR #8246 landed in https://core.trac.wordpress.org/changeset/64409
@lancewillett commented on PR #14207:
4 weeks ago
#160
PR #14207 landed in https://core.trac.wordpress.org/changeset/64584
@lancewillett commented on PR #7732:
4 weeks ago
#162
PR #7732 landed in https://core.trac.wordpress.org/changeset/64615
@lancewillett commented on PR #7947:
4 weeks ago
#164
PR #7947 landed in https://core.trac.wordpress.org/changeset/64616
@lancewillett commented on PR #7992:
4 weeks ago
#166
PR #7992 landed in https://core.trac.wordpress.org/changeset/64617
@lancewillett commented on PR #7995:
4 weeks ago
#168
@lancewillett commented on PR #8040:
4 weeks ago
#170
PR #8040 landed in https://core.trac.wordpress.org/changeset/64619
@lancewillett commented on PR #8045:
4 weeks ago
#172
PR #8045 landed in https://core.trac.wordpress.org/changeset/64620
@lancewillett commented on PR #8095:
4 weeks ago
#174
PR #8095 landed in https://core.trac.wordpress.org/changeset/64622
@lancewillett commented on PR #8047:
4 weeks ago
#176
PR #8047 landed in https://core.trac.wordpress.org/changeset/64623
@lancewillett commented on PR #8075:
4 weeks ago
#178
PR #8075 landed in https://core.trac.wordpress.org/changeset/64624
This ticket was mentioned in PR #14575 on WordPress/wordpress-develop by @lancewillett.
4 weeks ago
#179
The media upload test times out even when the JPEG uploads successfully. Since r64588, supported browsers upload through the REST API, but the test added in r64623 waits only for the classic multipart upload endpoint.
The failing trunk run shows successful REST creation and finalization, followed by the completed attachment UI. The test ignores those responses and exhausts its timeout.
Recognize either the REST media-creation response or the classic multipart response. Keep excluding the separate request for attachment markup. Capture the attachment ID for cleanup, retaining the existing completed-title and Edit-link assertions. No production changes or longer timeouts.
Validation
- Rebuilt WordPress with
npm run build:devand reproduced the original JPEG timeout on the REST path. - Full media-upload spec: 24 checks passed with retries disabled—three runs each on REST/classic uploads, with
SCRIPT_DEBUGenabled/disabled. - Traces confirmed the intended upload transport and successful attachment cleanup in all 12 JPEG cases.
- Scoped ESLint, repository JavaScript typecheck, and E2E audit passed.
- The baseline also encountered a separate WordPress.org connection warning in the pre-existing dismissal test; that test passed throughout the four fixed validation runs.
Use of AI tools
AI assistance: Yes
Tool: Codex
Model: GPT-6
Used for: CI trace investigation, the test fix, scoped E2E audit, and local validation. Human review is requested.
@lancewillett commented on PR #14575:
4 weeks ago
#181
PR #14575 landed in https://core.trac.wordpress.org/changeset/64658
@lancewillett commented on PR #8089:
3 weeks ago
#183
PR #8089 landed in https://core.trac.wordpress.org/changeset/64735
@lancewillett commented on PR #8089:
3 weeks ago
#184
PR #8089 landed in https://core.trac.wordpress.org/changeset/64735
@lancewillett commented on PR #8082:
3 weeks ago
#186
PR #8082 landed in https://core.trac.wordpress.org/changeset/64736
@lancewillett commented on PR #7717:
3 weeks ago
#188
PR #7717 landed in https://core.trac.wordpress.org/changeset/64737
@lancewillett commented on PR #7988:
3 weeks ago
#190
PR #7988 landed in https://core.trac.wordpress.org/changeset/64738
This ticket was mentioned in PR #15667 on WordPress/wordpress-develop by @shailu25.
11 days ago
#193
Trac ticket: #52895
Adds an admin e2e test for saving profile name fields from ticket #52895.
What
- Navigates to
profile.php - Updates First Name, Last Name, and Nickname
- Clicks Update Profile
- Asserts the “Profile updated.” notice and that values persist in the UI and via REST
- Restores the original profile data afterward
Why
Ticket #52895 asks for Profile coverage that changes default data and saves. Other overview areas already have e2e coverage; this fills a small remaining gap.
How
New Playwright spec: tests/e2e/specs/profile/update-profile.test.js, following existing admin e2e patterns (visitAdminPage, #message, REST restore).
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/profile/update-profile.test.js - Confirm the test passes and the admin profile name fields are restored
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15668 on WordPress/wordpress-develop by @shailu25.
11 days ago
#194
Trac ticket: #52895
Adds an admin e2e test for creating an Erase Personal Data request from ticket #52895.
What
- Creates a subscriber test user
- Opens
erase-personal-data.php - Submits a request by username with confirmation email unchecked
- Asserts “Request added successfully.” and that the requester email appears in the list
- Confirms the requester still appears after searching requests
- Cleans up the request and user afterward (does not run the actual erase)
Why
Ticket #52895 / comment feedback: create a test user, add an erasure request, and verify they appear under Requester—without executing the destructive erase.
How
New Playwright spec: tests/e2e/specs/erase-personal-data.test.js, following existing admin e2e patterns.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/erase-personal-data.test.js - Confirm the test passes and no leftover erase request / test user remains
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15687 on WordPress/wordpress-develop by @shailu25.
11 days ago
#195
Trac Ticket: #52895
Adds an admin e2e smoke test for the Updates screen from ticket #52895.
What
- Opens
update-core.php - Asserts the “WordPress Updates” heading
- Asserts “Current version:” with a version number
- Asserts the Plugins and Themes section headings (present even when up to date)
Why
Ticket #52895 / comment feedback suggested checking that the expected WordPress version is shown and that Plugins/Themes sections are present. This is a small, unblocked coverage gap.
How
New Playwright spec: tests/e2e/specs/updates.test.js. Translations are not asserted because that section is omitted on default en_US sites with no translation updates.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/updates.test.js - Confirm the test passes
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15688 on WordPress/wordpress-develop by @shailu25.
11 days ago
#196
Trac Ticket: #52895
Adds an admin e2e test for creating an Export Personal Data request from ticket #52895.
What
- Creates a subscriber test user
- Opens
export-personal-data.php - Submits a request by username with confirmation email unchecked
- Asserts “Request added successfully.” and that the requester email link appears in the list
- Confirms the requester email link still appears after searching requests
- Cleans up the request and user afterward (does not trigger a file download)
Why
Ticket #52895 covers Export Personal Data. Checking that a request is created and listed is a stable e2e path; asserting download contents is flaky and unnecessary for this coverage.
How
New Playwright spec: tests/e2e/specs/export-personal-data.test.js, matching the Erase Personal Data e2e patterns (including asserting the requester email link).
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/export-personal-data.test.js - Confirm the test passes and no leftover export request / test user remains
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15689 on WordPress/wordpress-develop by @shailu25.
11 days ago
#197
Trac Ticket: #52895
Adds an admin e2e test for editing attachment title, alternative text, and description from ticket #52895.
What
- Uploads a test image via the REST helpers already used in the Media Library e2e suite
- Opens the attachment edit screen
- Updates Title, Alternative Text, and Description
- Asserts the “Media file updated.” notice and that values persist in the UI and via REST
Why
Ticket #52895 lists editing image alt text, title, and description as Media coverage still needed. Existing media e2e covers upload/delete/filter, but not attachment detail edits.
How
New case in tests/e2e/specs/media-library.test.js, reusing the suite’s upload/cleanup helpers.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/media-library.test.js - Confirm the new “edits attachment title, alternative text, and description” test passes
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15690 on WordPress/wordpress-develop by @shailu25.
11 days ago
#198
Trac Ticket: #52895
Adds admin e2e coverage for the Pages list screen from ticket #52895.
What
- Creates published pages via REST helpers
- Asserts the page appears in
edit.php?post_type=pagesearch results - Views the page on the front end
- Opens it in the editor from the list table
- Moves a page to Trash from the list row action
- Force-deletes owned pages in cleanup
Why
Ticket #52895 says Pages should follow the same flows as Posts. Core already has posts list e2e and a Pages Quick Edit parent test; this fills the main list/view/edit/trash gap without duplicating Quick Edit.
How
New Playwright spec: tests/e2e/specs/pages/edit-pages.test.js, patterned after edit-posts.test.js but scoped with unique titles so Sample Page and other fixtures are left alone.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/pages/edit-pages.test.js - Confirm both tests pass
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15718 on WordPress/wordpress-develop by @shailu25.
11 days ago
#199
Trac Ticket: #52895
Adds remaining Categories/Tags e2e coverage from ticket #52895.
What
- Searches for a non-existing category/tag and asserts the empty-state message
- Bulk-deletes created categories and asserts Uncategorized remains, with no delete checkbox
Why
Ticket#52895 explicitly asks for:
- Search for non-existing category/tag
- Bulk deleting categories leaves Uncategorized untouched
Existing taxonomy e2e covered add/edit/delete/parent, but not these cases.
How
Extends tests/e2e/specs/taxonomies.test.js using the same helpers and cleanup pattern.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/taxonomies.test.js - Confirm the new search and Uncategorized bulk-delete tests pass
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15722 on WordPress/wordpress-develop by @shailu25.
11 days ago
#200
Trac ticket: #52895
Adds Media Library search e2e coverage from ticket #52895.
What
- Uploads a fixture image and searches for it in list mode
- Asserts the matching attachment row/title is shown
- Searches for a non-existing query and asserts “No media files found.”
- Seeds a non-matching fixture before the empty-search case so the assertion cannot pass vacuously
Why
Ticket #52895 asks for Media coverage of:
- Search for image
- Search for non-existing image
Existing media e2e covers upload/delete/type filter, but not these dedicated search flows.
How
New cases in tests/e2e/specs/media-library.test.js, reusing the suite’s upload/cleanup helpers.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/media-library.test.js - Confirm both new search tests pass:
searches for an existing imageshows an empty result when searching for missing media
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15726 on WordPress/wordpress-develop by @shailu25.
11 days ago
#201
Trac ticket: #52895
Adds Import screen e2e coverage from ticket #52895.
What
- Opens
import.phpand asserts popular importers are listed with Install Now actions - Installs the WordPress importer from that screen
- Asserts the action becomes Run WordPress / Run Importer after install
- Cleans up the importer plugin afterward
Why
Ticket #52895 says for Import: test whether the importer plugins install correctly; further import flows are unnecessary.
How
New Playwright spec: tests/e2e/specs/import.test.js. Install uses the Import screen UI (AJAX installer); timeout is raised like other network-backed plugin installs.
Testing instructions
- Start the local environment if needed:
npm run env:start - Ensure the environment can reach wordpress.org (plugin install)
- Run:
npm run test:e2e -- tests/e2e/specs/import.test.js - Confirm both tests pass and
wordpress-importeris removed afterward
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15729 on WordPress/wordpress-develop by @shailu25.
11 days ago
#202
Trac ticket: #52895
Adds Comments e2e coverage from ticket #52895.
What
- Creates a published post with comments open
- Views the post on the front end
- Submits a comment through the comment form
- Asserts the comment appears on the Comments admin screen
Why
Ticket #52895 says for Comments: create a post, view it, add a comment, and check that it displays on the comments page.
How
New Playwright spec: tests/e2e/specs/comments.test.js. Post creation and cleanup use the REST API; the comment is submitted through the front-end form while logged in as admin.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/comments.test.js - Confirm the test passes and the fixture post is removed afterward
Use of AI Tools
- Cursor
@lancewillett commented on PR #15722:
11 days ago
#205
PR #15722 landed in https://core.trac.wordpress.org/changeset/65322
@lancewillett commented on PR #15729:
11 days ago
#206
PR #15729 landed in https://core.trac.wordpress.org/changeset/65323
#207
@
11 days ago
Scope update for the list in the description, after reviewing the latest round of PRs. These items are out of scope for E2E tests:
- Updates page: a test can only check that the screen renders. The update checks call api.wordpress.org, so there is no behavior to cover offline.
- Bulk deleting categories leaves Uncategorized untouched: the default category has no checkbox, so it can never be part of a bulk action. A test for this can't fail.
- Pages, same as posts: pages use the same list table and editor as posts, which
edit-posts.test.jsalready covers. Only page-specific behavior needs its own test, like the parent selection in [64617]. - Import, installing plugins: this downloads from WordPress.org during the run. Tests should not depend on the live network (#63914).
New tests here should cover a behavior that no existing E2E or PHPUnit test covers, and clean up only what they create. Ideally new tests are in relation to a broken feature, bug/regression, versus just adding coverage for its own sake.
@shailu25 commented on PR #15726:
11 days ago
#208
Thanks @lancewillett - addressed in the latest commit:
- Removed the live WordPress.org importer install test
- Dropped the CSS-class locators and kept the role/text checks for the Import heading and Install WordPress now link
Ready for another look when you have a chance.
@shailu25 commented on PR #15718:
11 days ago
#209
Thanks @lancewillett - updated in the latest commit.
The bulk-delete test now only asserts that the selected categories are deleted and that the default category has no checkbox. Dropped the Uncategorized search and survival REST check, and renamed the test to match.
@shailu25 commented on PR #15689:
11 days ago
#210
Thanks @lancewillett - updated.
Switched the attachment fields to getByLabel( 'Add title' ), getByLabel( 'Alternative Text' ), and getByLabel( 'Description' ). Also merged trunk to clear the conflict with the media search tests.
@shailu25 commented on PR #15688:
11 days ago
#211
Thanks @lancewillett — updated.
Combined Export and Erase into one looped spec (tests/e2e/specs/personal-data-requests.test.js), following the taxonomies.test.js pattern. Closing #15668 in favor of this PR.
@shailu25 commented on PR #15668:
11 days ago
#212
Thanks @lancewillett — agreed.
Combined this with the export coverage into one looped spec in #15688 (personal-data-requests.test.js). Closing this PR in favor of that one.
@shailu25 commented on PR #15687:
11 days ago
#213
Thanks @lancewillett - agreed, this is only a render smoke check. Closing this PR.
@shailu25 commented on PR #15667:
11 days ago
#214
Thanks @lancewillett - updated.
Switched the name fields to getByLabel locators as suggested.
This ticket was mentioned in PR #15779 on WordPress/wordpress-develop by @shailu25.
11 days ago
#215
Trac ticket: #52895
Adds remaining Users e2e coverage from ticket #52895.
What
- Changes another user’s role from the user edit screen and asserts it persists in the UI and via REST
- Confirms an administrator cannot change their own role to Subscriber (no Role field on Profile; bulk Change shows the error notice and role is unchanged)
- Searches for an existing user and asserts the row is listed
- Searches for a missing user and asserts the empty-state message (with a non-matching fixture so ignoring search cannot pass)
Why
Ticket #52895 lists Users coverage for changing roles, preventing an admin from demoting itself, and searching for users. Existing users e2e covered create/login and bulk delete, but not these cases.
How
Extends tests/e2e/specs/users.test.js using the same create/cleanup helpers. Role is found by label; top bulk role controls keep their IDs because top/bottom share an accessible name (r65275).
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/users.test.js - Confirm the new role-change, self-demotion, and search tests pass
Use of AI Tools
- Cursor
This ticket was mentioned in PR #15782 on WordPress/wordpress-develop by @shailu25.
11 days ago
#216
Trac ticket: #52895
Adds Themes screen search coverage from ticket #52895.
What
- Searches installed themes for the uploaded E2E fixture and asserts its details control is listed
- Searches for a missing theme name and asserts the empty-state message (fixture remains installed so ignoring search cannot pass)
Why
Ticket #52895 lists searching for a theme. Existing themes e2e covers upload/activate/delete of a local fixture, but not installed-theme search. This stays on themes.php and does not hit the wordpress.org directory.
How
Extends tests/e2e/specs/themes.test.js, reusing the suite’s zip upload/cleanup. Locators use the “Search installed themes” searchbox and role/text for theme details.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/themes.test.js - Confirm the new installed-theme search tests pass
Use of AI Tools
- Cursor
@lancewillett commented on PR #15688:
10 days ago
#217
One small fix before this lands: Prettier wants the const row = page.getByRole( 'row' ).filter( … ) line in afterEach (line 47) split across chained lines. npx prettier --write tests/e2e/specs/personal-data-requests.test.js fixes it. The E2E specs on trunk all pass Prettier. I'll re-check the new head.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #15718:
10 days ago
#218
One small fix before this lands: Prettier reformats the missing template literal on line 175 of taxonomies.test.js across four lines. Pulling the suffix into its own variable keeps it readable: const suffix = randomUUID().slice( 0, 8 );, then ${ prefix }-missing-${ suffix } . The E2E specs on trunk all pass Prettier. I'll re-check the new head.
<sub>AI review · <code>claude-opus-5-5</code></sub>
@lancewillett commented on PR #15689:
10 days ago
#220
PR #15689 landed in https://core.trac.wordpress.org/changeset/65327
@shailu25 commented on PR #15718:
10 days ago
#221
@shailu25 commented on PR #15726:
10 days ago
#222
Thanks - I don't have a past Import-screen regression to point to, so I’ll close this.
@shailu25 commented on PR #15667:
10 days ago
#223
Thanks! I don’t have a profile-save regression beyond what Tests_User::test_edit_user_blank_password() already covers, so I’ll close this.
@shailu25 commented on PR #15688:
10 days ago
#224
@lancewillett commented on PR #15718:
10 days ago
#226
PR #15718 landed in https://core.trac.wordpress.org/changeset/65328
@lancewillett commented on PR #15688:
10 days ago
#228
PR #15688 landed in https://core.trac.wordpress.org/changeset/65330
@lancewillett commented on PR #15782:
10 days ago
#230
PR #15782 landed in https://core.trac.wordpress.org/changeset/65331
@shailu25 commented on PR #15779:
10 days ago
#231
Thanks! Addressed in https://github.com/WordPress/wordpress-develop/pull/15779/commits/b891c756c73b76e84540c8e80ea8915064475ece
kept the self-demotion bulk Change role and empty missing-user search tests, dropped the edit-screen role change and existing-user search cases, and removed the login autofocus assert from the self-demotion test.
@lancewillett commented on PR #15779:
10 days ago
#233
PR #15779 landed in https://core.trac.wordpress.org/changeset/65334
@lancewillett commented on PR #15779:
8 days ago
#234
@shail-mehta the self-demotion test from this PR (r65334) passed only on retry in three CI runs since it landed: 42433037418, 42432924177 and 42517217904.
Cause: the test fills the login form before WordPress's delayed autofocus runs. About 200 ms after load, wp-login.php focuses the username field and selects its text. When that lands while the password is being filled, the password goes into the username field. In all three failure snapshots, the username field holds the password UUID and the password field is empty, so the form never submits.
Fix: the other three login steps in the suite already wait for that focus: install.test.js, dashboard.test.js, and the "creates a user who can log in" test in this file. Please open a PR that does the same here:
const usernameField = page.getByLabel( 'Username or Email Address', { exact: true } ); // Wait for WordPress's delayed autofocus before entering credentials. await expect( usernameField ).toBeFocused(); await usernameField.fill( username );
I missed this in review.
<sub>AI review · <code>claude-opus-5-5</code></sub>
This ticket was mentioned in PR #15862 on WordPress/wordpress-develop by @shailu25.
8 days ago
#235
Trac ticket: #52895
Follow-up to r65334 / https://github.com/WordPress/wordpress-develop/pull/15779
What
- In the self-demotion Users e2e test, wait for WordPress's delayed login autofocus before filling credentials
Why
The self-demotion test from r65334 has been flaky in CI (runs 42433037418, 42432924177, 42517217904). It fills the login form before wp-login.php autofocuses the username field (~200ms after load). When that focus lands while the password is being typed, the password ends up in the username field and the form never submits.
How
Match the other login steps in the suite (creates a user who can log in, plus install.test.js / dashboard.test.js): assert the username field is focused, then fill username and password.
Testing instructions
- Start the local environment if needed:
npm run env:start - Run:
npm run test:e2e -- tests/e2e/specs/users.test.js - Confirm the self-demotion and other Users tests pass
Use of AI Tools
- Cursor
@lancewillett commented on PR #15862:
7 days ago
#236
PR #15862 landed in https://core.trac.wordpress.org/changeset/65380
Dropping some links I mentioned this morning on Dev Chat here, so everything is under one roof :)
Thanks :🙌