Applying & emitting increments on undo / redo

This commit is contained in:
Marcel Mraz 2024-12-11 21:35:21 +01:00
parent 59a0653fd4
commit 15d2942aaa
No known key found for this signature in database
GPG key ID: 4EBD6E62DC830CD2
18 changed files with 8287 additions and 8355 deletions

View file

@ -125,7 +125,7 @@ describe("collaboration", () => {
expect(h.elements).toEqual([expect.objectContaining(rect1Props)]);
});
const undoAction = createUndoAction(h.history, h.store);
const undoAction = createUndoAction(h.history);
act(() => h.app.actionManager.executeAction(undoAction));
// with explicit undo (as addition) we expect our item to be restored from the snapshot!
@ -157,7 +157,7 @@ describe("collaboration", () => {
expect(h.elements).toEqual([expect.objectContaining(rect1Props)]);
});
const redoAction = createRedoAction(h.history, h.store);
const redoAction = createRedoAction(h.history);
act(() => h.app.actionManager.executeAction(redoAction));
// with explicit redo (as removal) we again restore the element from the snapshot!