mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 15:56:56 +02:00
@@ -214,14 +214,23 @@ describe('iD.History', function () {
|
||||
expect(history.redo().changes()).to.eql({});
|
||||
});
|
||||
|
||||
it('emits an redone event', function () {
|
||||
history.perform(action);
|
||||
it('does redo into an annotated state', function () {
|
||||
history.perform(action, 'annotation');
|
||||
history.on('redone', spy);
|
||||
history.undo();
|
||||
history.on('change', spy);
|
||||
history.redo();
|
||||
expect(history.undoAnnotation()).to.equal('annotation');
|
||||
expect(spy).to.have.been.called;
|
||||
});
|
||||
|
||||
it('does not redo into a non-annotated state', function () {
|
||||
history.perform(action);
|
||||
history.on('redone', spy);
|
||||
history.undo();
|
||||
history.redo();
|
||||
expect(spy).not.to.have.been.called;
|
||||
});
|
||||
|
||||
it('emits a change event', function () {
|
||||
history.perform(action);
|
||||
history.undo();
|
||||
|
||||
Reference in New Issue
Block a user