Skip to content

Site Editor Pages e2es: Remove skipped test as it is already covered by other tests - #85259

Merged
andrewserong merged 3 commits into
trunkfrom
remove/skipped-pages-template-preview-e2e-test
Oct 21, 2026
Merged

andrewserong merged 3 commits into
trunkfrom
remove/skipped-pages-template-preview-e2e-test

Conversation

@andrewserong

Copy link
Copy Markdown
Contributor

What?

Remove the skipped create a new page, edit template and toggle page template preview test. Instead, add an additional step to one of the existing focus mode tests to cover the one bit of behaviour that isn't covered by other currently active tests.

This came up while reviewing #84621

Why?

The site editor has changed a fair bit since these tests were skipped back in #62799 and much of the same flows are covered by post-editor-template-mode.spec.js, post-content-focus-mode.spec.js and site-editor/multi-entity-saving.spec.js tests.

It seems the only thing we weren't covering was toggling the preview mode off again, so I've added that in.

How?

  • Delete the skipped test and its local function that is no-longer used after the removal
  • Extend the existing Post Content focus mode test with an additional step that switches the preview mode off again

Testing Instructions

Check that the e2es pass, and if you like, double-check that we haven't missed anything that needs coverage.

Use of AI Tools

Claude Code (Opus 5.5) to write the change, reviewed by me.

@andrewserong andrewserong self-assigned this Oct 21, 2026
@andrewserong andrewserong added the [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: 0 B

Total Size: 9.05 MB

4fd833e Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

Regression: updating a specific option will only change its value and will not corrupt others in /test/e2e/specs/editor/various/core-settings.spec.js, passed after 1 failed attempt.
Error: expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Array [
    "rewrite_rules",
-   "SERIALIZED DATA",
+   "",
  ]
    at forEach (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:46:26)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:43:35
refuses the drop and uploads nothing in /test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js, passed after 1 failed attempt.
Error: expect(received).toHaveLength(expected)

Expected length: 0
Received length: 1
Received array:  [{"_links": {"about": [{"href": "http://localhost:8889/wp-json/wp/v2/types/attachment"}], "author": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/users/1"}], "collection": [{"href": "http://localhost:8889/wp-json/wp/v2/media"}], "curies": [{"href": "https://api.w.org/{rel}", "name": "wp", "templated": true}], "replies": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/comments?post=223"}], "self": [{"href": "http://localhost:8889/wp-json/wp/v2/media/223", "targetHints": {"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]}}], "wp:attached-to": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/posts/222", "id": 222, "post_type": "post"}]}, "alt_text": "", "author": 1, "caption": {"rendered": ""}, "class_list": ["post-223", "attachment", "type-attachment", "status-inherit", "hentry", "entry"], "comment_status": "open", "date": "2026-10-21T07:08:37", "date_gmt": "2026-10-21T07:08:37", "description": {"rendered": "<p class=\"attachment\"><a href='/?url=http%3A%2F%2Flocalhost%3A8889%2Fwp-content%2Fuploads%2F2026%2F10%2F5094ca9b-7dad-4a87-9b80-fc78826f557c.png'><img loading=\"lazy\" decoding=\"async\" width=\"10\" height=\"10\" src=\"http://localhost:8889/wp-content/uploads/2026/10/5094ca9b-7dad-4a87-9b80-fc78826f557c.png\" class=\"attachment-medium size-medium\" alt=\"\" style=\"width:100%;height:100%;max-width:10px;\" /></a></p>
"}, "featured_media": 0, "filename": "5094ca9b-7dad-4a87-9b80-fc78826f557c.png", "filesize": 80, "guid": {"rendered": "http://localhost:8889/wp-content/uploads/2026/10/5094ca9b-7dad-4a87-9b80-fc78826f557c.png"}, "id": 223, "link": "http://localhost:8889/?attachment_id=223", "media_details": {"file": "2026/10/5094ca9b-7dad-4a87-9b80-fc78826f557c.png", "filesize": 80, "height": 10, "image_meta": {"alt": "", "aperture": "0", "camera": "", "caption": "", "copyright": "", "created_timestamp": "0", "credit": "", "focal_length": "0", "iso": "0", "keywords": [], "orientation": "0", "shutter_speed": "0", "title": ""}, "sizes": {}, "width": 10}, "media_type": "image", "meta": [], "mime_type": "image/png", "modified": "2026-10-21T07:08:37", "modified_gmt": "2026-10-21T07:08:37", "ping_status": "closed", "post": 222, "slug": "5094ca9b-7dad-4a87-9b80-fc78826f557c", "source_url": "http://localhost:8889/wp-content/uploads/2026/10/5094ca9b-7dad-4a87-9b80-fc78826f557c.png", "status": "inherit", "template": "", "title": {"rendered": "5094ca9b-7dad-4a87-9b80-fc78826f557c"}, "type": "attachment"}]
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js:71:45

4fd833e Run

@andrewserong

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review! 🙇

@andrewserong
andrewserong merged commit ea52fbe into trunk Oct 21, 2026
92 checks passed
@andrewserong
andrewserong deleted the remove/skipped-pages-template-preview-e2e-test branch October 21, 2026 22:38
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants