   it('enter', ->
     editor.sendKeys(protractor.Key.RETURN)
     expectedDelta = { ops: [{ retain: 10 }, { insert: '\n' }] }
-    browser.switchTo().defaultContent()
-    expect(deltaOutput.getText()).toEqual(JSON.stringify(expectedDelta))
-    browser.switchTo().frame('quill-1')
+    expect(deltaOutput.getText()).toEqual(JSON.stringify(expectedDelta))
 
     editor.sendKeys(protractor.Key.RETURN)
     expectedDelta = { ops: [{ retain: 11 }, { insert: '\n' }] }
-    browser.switchTo().defaultContent()
-    expect(deltaOutput.getText()).toEqual(JSON.stringify(expectedDelta))
-    browser.switchTo().frame('quill-1')
+    expect(deltaOutput.getText()).toEqual(JSON.stringify(expectedDelta))
 
     text = 'Chapter 1. Loomings.'
     editor.sendKeys(text)
-    updateEditor(false)
+    updateEditor()
     # The previous newline inserts was assumed to be appended since the insertion character matches
     # the last character of the document. There is no such ambiguity here so the number of retains
     # is the same as the last delta
     expectedDelta = { ops: [{ retain: 11 }, { insert: "#{text}" }] }
     expect(deltaOutput.getText()).toEqual(JSON.stringify(expectedDelta))
-    browser.switchTo().frame('quill-1')
 
     editor.sendKeys(protractor.Key.RETURN)
     expectedDelta = { ops: [{ retain: 32 }, { insert: '\n' }] }
-    browser.switchTo().defaultContent()
-    expect(deltaOutput.getText()).toEqual(JSON.stringify(expectedDelta))
-    browser.switchTo().frame('quill-1')
+    expect(deltaOutput.getText()).toEqual(JSON.stringify(expectedDelta))
     expect(editor.getInnerHtml().then(cleanLines)).toEqual([
       '<div>The Whale</div>'
       '<div><br></div>'

    editor.sendKeys(keys...)
    editor.sendKeys(protractor.Key.chord(protractor.Key.META, 'b'))
    updateEditor()
    lines = element.all(By.css('.editor-container div'))
    expect(lines.get(1).getOuterHtml().then(cleanLines)).toEqual(
      '<div><b>Chapter 1. Loomings.</b></div>'
    )
    browser.switchTo().defaultContent()
    expectedDelta = {
      ops: [
        { retain: 10 }


  it('move cursor', ->
    editor.sendKeys(protractor.Key.ARROW_LEFT)
    updateEditor()
    expect(startRange.getText()).toEqual('1529')
    expect(endRange.getText()).toEqual('1529')
    [0..15].forEach( ->   # More than enough times to get back to the top
      editor.sendKeys(protractor.Key.ARROW_UP)
    )
    updateEditor()
    expect(startRange.getText()).toEqual('0')
    expect(endRange.getText()).toEqual('0')
    [0..3].forEach( ->
      editor.sendKeys(protractor.Key.ARROW_RIGHT)
    )
    updateEditor()
    expect(startRange.getText()).toEqual('4')
    expect(endRange.getText()).toEqual('4')
  )
