소스 검색

Update the cell editor test

Steven Silvester 8 년 전
부모
커밋
2d1d03794b
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      test/src/notebook/cells/editor.spec.ts

+ 4 - 5
test/src/notebook/cells/editor.spec.ts

@@ -62,8 +62,8 @@ class LogEditorWidget extends CodeCellEditorWidget {
     this.methods.push('onModelStateChanged');
   }
 
-  protected onEditorModelChange(editor: CodeEditor.IEditor, editorModel: CodeEditor.IModel, valueChange: IChangedArgs<string>): void {
-    super.onEditorModelChange(editor, editorModel, valueChange);
+  protected onEditorModelChange(): void {
+    super.onEditorModelChange();
     this.methods.push('onEditorModelChange');
   }
 
@@ -153,9 +153,8 @@ describe('notebook/cells/editor', () => {
         // method, so for this test, the `replaceRange` method is being used to
         // generate the text change.
         expect(change).to.not.be.ok();
-        widget.editor.model.value = want.newValue;
+        widget.editor.model.value.text = want.newValue;
         expect(change).to.be.ok();
-        expect(change.oldValue).to.equal(want.oldValue);
         expect(change.newValue).to.equal(want.newValue);
       });
 
@@ -175,7 +174,7 @@ describe('notebook/cells/editor', () => {
         widget.completionRequested.connect(listener);
 
         expect(request).to.not.be.ok();
-        widget.editor.model.value = want.currentValue;
+        widget.editor.model.value.text = want.currentValue;
         widget.setCursorPosition(3);
 
         let editor = (widget.editor as any).editor as CodeMirror.Editor;