feat: add document history transactions
This commit is contained in:
@@ -59,3 +59,15 @@ test('command events carry a document-scoped request context', () => {
|
||||
assert.ok(events.includes('command.completed'))
|
||||
assert.match(requestId, /^req-/)
|
||||
})
|
||||
|
||||
test('document mutations use the facade history boundary', () => {
|
||||
const facade = createMockFacade()
|
||||
facade.gui.command.execute({ commandId: 'new-document' })
|
||||
assert.equal(facade.app.document.getActive().label, 'Untitled document')
|
||||
assert.equal(facade.history.canUndo(), true)
|
||||
facade.history.undo()
|
||||
assert.equal(facade.app.document.getActive().label, 'Pump Housing')
|
||||
assert.equal(facade.history.canRedo(), true)
|
||||
facade.history.redo()
|
||||
assert.equal(facade.app.document.getActive().label, 'Untitled document')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user