Add durable AI cancellation and undoable output application
This commit is contained in:
@@ -220,3 +220,9 @@ test('geometry conflict and view detach cancel only that gesture, without deleti
|
||||
assert.equal(sessions.getSnapshot().gesture, null); assert.equal(editor.getSnapshot().document.elements.get('a').geometry.x, 70);
|
||||
sessions.dispose();
|
||||
});
|
||||
|
||||
test('transport preparation cannot rewrite a committed document change or its identity',()=>{
|
||||
const editor=setup(undefined,{prepareIntent:intent=>({...intent,id:'another-operation',changes:[]})});
|
||||
const before=editor.getSnapshot(),result=editor.dispatch({type:'element.data',target:target('a'),patch:{text:'must not publish'}});
|
||||
assert.equal(result.code,'invalid_prepared_intent');assert.equal(editor.getSnapshot(),before);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user