Repository navigation
Suggestion mode 9/9: end-to-end test suite - #82048
adamsilverstein wants to merge 216 commits into
Conversation
Cover the feature end to end: intent switching and shortcuts, inline typing, deletion and formatting, attribute and structural capture, review decisions, undo, persistence and the front end, accessibility announcements, and multi-author marker tinting.
|
Size Change: 0 B Total Size: 7.95 MB |
Cascade the trunk refresh up the Suggest mode stack.
|
Flaky tests detected in 459ed76. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/33450976453 Should save the changes in
|
There was a problem hiding this comment.
🟡 Changes recommended
Four moderate correctness and synchronization issues remain in the test suite.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds end-to-end coverage for Suggest mode workflows, persistence, accessibility, and editor safeguards.
Changes:
- Tests capture, review, undo, persistence, and clipboard flows.
- Covers restrictions, external content, overlays, and intent switching.
- Validates accessibility, navigation, marker reveal, and shortcuts.
File summaries
| File | Description |
|---|---|
test/e2e/specs/site-editor/suggestion-mode-intent-shortcuts.spec.ts |
Site Editor shortcut gating |
test/e2e/specs/editor/various/suggestion-mode-undo.spec.ts |
Undo ordering and cleanup |
test/e2e/specs/editor/various/suggestion-mode-summary.spec.ts |
Sidebar summary rendering |
test/e2e/specs/editor/various/suggestion-mode-review.spec.ts |
Accept and reject flows |
test/e2e/specs/editor/various/suggestion-mode-post-status.spec.ts |
Post-status restrictions |
test/e2e/specs/editor/various/suggestion-mode-persistence.spec.ts |
Persistence and front-end rendering |
test/e2e/specs/editor/various/suggestion-mode-overlay-retirement.spec.ts |
Overlay retirement invariants |
test/e2e/specs/editor/various/suggestion-mode-multi-block-format.spec.ts |
Multi-block formatting refusal |
test/e2e/specs/editor/various/suggestion-mode-marker-reveal.spec.ts |
Marker reveal and navigation |
test/e2e/specs/editor/various/suggestion-mode-list-view.spec.ts |
List View behavior |
test/e2e/specs/editor/various/suggestion-mode-external-content.spec.ts |
External content adoption |
test/e2e/specs/editor/various/suggestion-mode-experiment-off.spec.ts |
Disabled-experiment behavior |
test/e2e/specs/editor/various/suggestion-mode-code-editor.spec.ts |
Code Editor restrictions |
test/e2e/specs/editor/various/suggestion-mode-clipboard.spec.ts |
Clipboard sanitization |
test/e2e/specs/editor/various/suggestion-mode-a11y.spec.ts |
Marker accessibility |
Review details
Suppressed comments (2)
test/e2e/specs/editor/various/suggestion-mode-persistence.spec.ts:514
- This likewise publishes a pending cross-parent move at its proposed destination, so readers see an unaccepted structural change. Persist enough source-parent information to restore the original Group A placement, then assert that front-end location here.
expect( rendered.indexOf( 'Group A traveller' ) ).toBeGreaterThan(
rendered.indexOf( 'Group B first' )
);
expect( rendered.indexOf( 'Group A traveller' ) ).toBeGreaterThan(
rendered.indexOf( 'Group B second' )
);
test/e2e/specs/editor/various/suggestion-mode-review.spec.ts:1300
- A transform schedules two independent note saves, but this waits for only the first response and can leave Suggesting before the second note exists. Wait until both pending notes are observable before switching intent so the rejection actually covers both halves.
const suggestionSaved = suggestionSavedPromise( page );
await transformParagraphToQuote( page, editor );
await suggestionSaved;
- Files reviewed: 16/16 changed files
- Comments generated: 4
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…h transform notes The marker-reveal sampler stopped on a fixed deadline, so on a slow worker it could give up before the floating cards mounted and the overlap check passed vacuously. Stop it from the test once the cards are asserted and require it to have seen all three. A block transform saves two notes but the test waited for one response before leaving Suggesting; wait until both are pending so the decision always exercises grouped resolution. Point the two front-end move tests at the documented limitations they pin.
…s placed Headless Chromium only runs animation frames when something paints, so the frame sampler observed a handful of frames and could stop before the board placed the cards. Wait for each card's pointer events to come back, then sample the settled board explicitly and require all three cards.
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.78 MB From ⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
suggestion-mode
post-editor
site-editor
From 🏁 Flaky testsSome 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. should undo without broken temporary state in
|
Bold turned on before typing, and typing into a bold run. Claude-Session: https://claude.ai/code/session_018vwYjV5xvNjZT3oL9uthV9
Lint JavaScript failed on #82048 and the bundle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vwYjSVYv6ST6c14oqbUdD
…to end The filters read the suggestion status from note meta, which only a real decision and save produce.
Follows the wording change in the layers below.
…the caption Covers #87432, where the floating card of a suggestion on an image caption sits level with the top of the image and is scrolled out of view. Claude-Session: https://claude.ai/code/session_018vwYjTEP8WL7QZukPGELAH
The anchor lookup only matched a note's marker, so a suggestion fell back to the top of its block. On a tall block such as an image with a caption that put the card far from the suggested text, often out of view. Claude-Session: https://claude.ai/code/session_018vwYjTEP8WL7QZukPGELAH
Resizing an image by its drag handle lists the width, height and aspect ratio attributes one by one, and a crop or rotation lists the attachment id and URL. Pin the wording a reviewer should read instead. See #87433.
Covers italics beside an existing caption suggestion, and italics on a clean caption followed by typing. See #87434.
The save pass makes an accepted or rejected suggestion final, yet the notes sidebar kept asking to save the post. Pin the expected state, with and without a reply on the note, for issue #87430. Claude-Session: https://claude.ai/code/session_018vwYjVWRM5jZLuyWWjTNCE
Part of #73411
What's in this PR
Splits the Suggestion mode end-to-end suite out of the wiring PR (#80433). 30 spec files and no production code, covering:
post_contentand puts back for the editor, the front end rendering of pending suggestions, and suggestions outdated by someone else's saveIt also carries the e2e helper plugins the specs use, a typing performance spec for Suggesting, and the performance harness changes that let a metric be skipped on the comparison build.
Keeping them here means the wiring PR reviews as code and this one reviews as tests.
Testing
Suggestion mode stack
This rebuilds the manually-stacked Suggestion mode work (#73411) as a GitHub Stack of 9 small, independently reviewable PRs, each building on the one below it:
Each follow up fix now sits in the layer that owns the code it changes, rather than piling onto the top of the stack. Overlapping suggestions were briefly their own layer (#86206, now closed); that code sits in the layers that own it, mainly #80431 and #80433. The whole feature can be exercised end-to-end via the combined testing branch #78994 (Playground). Behind the "Suggestion Mode" experiment (Gutenberg > Experiments).
AI Use
Claude Code wrote these specs and carved them out into this PR. I will review and test.