Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/e2e/specs/editor/various/undo.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,19 @@ test.describe( 'undo', () => {
await editor.canvas.locator( '[data-type="core/paragraph"]' ).click();
await pageUtils.pressKeys( 'primary+a' );
await pageUtils.pressKeys( 'primary+b' );

// Real-time collaboration causes block CRDT content to be updated
// asynchronously, and the RTC undo manager relies on up-to-date CRDT
// content. Ensure the bold has been applied before trying to undo.
await expect.poll( editor.getBlocks ).toMatchObject( [
{
name: 'core/paragraph',
attributes: {
content: '<strong>test</strong>',
},
},
] );

await pageUtils.pressKeys( 'primary+z' );
await expect.poll( editor.getBlocks ).toMatchObject( [
{
Expand Down
Loading