Adding tests for undoAll / redoAll
Tests for mixing undoAll / redoAll with regular undo / redo
This commit is contained in:
parent
b298b58d9f
commit
a8e3ded102
@ -327,6 +327,28 @@ test("Undoing all actions", function () {
|
|||||||
UndoManager.redoAll();
|
UndoManager.redoAll();
|
||||||
|
|
||||||
deepEqual(model.toJSON(), {"t": 4}, "Calling redoAll was successful");
|
deepEqual(model.toJSON(), {"t": 4}, "Calling redoAll was successful");
|
||||||
|
|
||||||
|
UndoManager.undo();
|
||||||
|
UndoManager.undoAll();
|
||||||
|
UndoManager.undo(true);
|
||||||
|
|
||||||
|
deepEqual(model.toJSON(), {"t": 1}, "Mixing undoAll with undo doesn't cause any problems");
|
||||||
|
|
||||||
|
UndoManager.undoAll(); // back to the stack's beginning
|
||||||
|
|
||||||
|
UndoManager.redo();
|
||||||
|
UndoManager.redoAll();
|
||||||
|
UndoManager.redo(true);
|
||||||
|
|
||||||
|
deepEqual(model.toJSON(), {"t": 4}, "Mixing redoAll with redo doesn't cause any problems");
|
||||||
|
|
||||||
|
UndoManager.undoAll();
|
||||||
|
UndoManager.undoAll();
|
||||||
|
UndoManager.redoAll();
|
||||||
|
UndoManager.redoAll();
|
||||||
|
|
||||||
|
deepEqual(model.toJSON(), {"t": 4}, "Calling undoAll and redoAll multiple times doesn't cause any problems");
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user