RTC: Fix tests related to publish undo stack#76206
Conversation
|
Size Change: +47 B (0%) Total Size: 6.87 MB
ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Still seeing one consistently failing test: Also seeing one flaky (failed once, then passed, seems unrelated to the changes here): Both in the Playwright - 5 shard. Overall an improvement on e2e results. Let's get this PR in and then focus on the others? |
|
Flaky tests detected in 2ebff44. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22746832738
|
…ests-ignore-save-updates
Co-authored-by: alecgeatches <alecgeatches@git.wordpress.org> Co-authored-by: chriszarate <czarate@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: e4892fb |
This updates the pinned hash from the `gutenberg` from `f4d8a5803aa2fbe26e7d9af4d17e80a622b7bab8` to `7b7fa2bc97a8029a302bd6511cf0d206b5953172`. The following changes are included: - Sort registry files by handle/ID. (WordPress/gutenberg#75755) - Obey undoIgnore flag in editEntityRecord (WordPress/gutenberg#76206) - RTC: Fix `post-editor-template-mode` E2E test (WordPress/gutenberg#76209) - Publish built Gutenberg plugin to the GitHub Container Registry (WordPress/gutenberg#75844) (WordPress/gutenberg#76273) - Connectors: Improve placeholder text and make it translatable (WordPress/gutenberg#75996) - Block context menu: context menu not closing for disconnecting unsynced pattern menu items (WordPress/gutenberg#75405) - Connectors: Improve responsive layout for small viewports (WordPress/gutenberg#76231) - theme.json schema: fix pseudo-class definition for button block (WordPress/gutenberg#76272) - Navigation block: fix submenu chevron toggle on touch devices (WordPress/gutenberg#76197) See #64595, #64393. git-svn-id: https://develop.svn.wordpress.org/trunk@61868 602fd350-edb4-49c9-b593-d223f7449a82
This updates the pinned hash from the `gutenberg` from `f4d8a5803aa2fbe26e7d9af4d17e80a622b7bab8` to `7b7fa2bc97a8029a302bd6511cf0d206b5953172`. The following changes are included: - Sort registry files by handle/ID. (WordPress/gutenberg#75755) - Obey undoIgnore flag in editEntityRecord (WordPress/gutenberg#76206) - RTC: Fix `post-editor-template-mode` E2E test (WordPress/gutenberg#76209) - Publish built Gutenberg plugin to the GitHub Container Registry (WordPress/gutenberg#75844) (WordPress/gutenberg#76273) - Connectors: Improve placeholder text and make it translatable (WordPress/gutenberg#75996) - Block context menu: context menu not closing for disconnecting unsynced pattern menu items (WordPress/gutenberg#75405) - Connectors: Improve responsive layout for small viewports (WordPress/gutenberg#76231) - theme.json schema: fix pseudo-class definition for button block (WordPress/gutenberg#76272) - Navigation block: fix submenu chevron toggle on touch devices (WordPress/gutenberg#76197) See #64595, #64393. Built from https://develop.svn.wordpress.org/trunk@61868 git-svn-id: http://core.svn.wordpress.org/trunk@61155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
What?
Fix flaky RTC-related tests that fail after publish.
Here's an example of manually testing the
should not create undo levels when publishingend-to-end test. I first try with RTC off, and a single CTRL+z undoes the text. But with RTC on, the first CTRL+z closes the side panel and the second CTRL+z removes the text:Screen.Recording.2026-03-05.at.10.08.51.AM.mov
This PR addresses ensures the Yjs UndoManager also respects the
undoIgnoreflag passed intoeditEntityRecord().Why?
Improve flaky end-to-end tests related to real-time collaboration.
How?
We have a
undoIgnoreflag passed toeditEntityRecord()which we use to decideisNewUndoLevelwhen in the Yjs undo manager when WordPress expects an undo level, e.g. when a new block is created. This helped us figure out when to add "missing" undo levels expected in tests, but we weren't checking it the opposite way and ensuring there was no undo level whenundoIgnorewastrue.Added a new origin
LOCAL_UNDO_IGNORED_ORIGINto pass whenundoIgnoreistrueso our undo manager can ignore save-related changes likecategoryandcontentupdates that are updated on "Publish" but not undoable.Testing Instructions
In
trunkwith RTC enabled (Settings -> Writing -> "Enable real-time collaboration" checkbox), recreate the e2e testshould not create undo levels when publishing:1in the post content. Do not add anything else.Repeat the same instructions in this PR. In step 4, you should see the post content disappear as expected in the automated test.