   endRange = element(By.id('end-range'))
   deltaOutput = element(By.id('delta'))
 
-  browser.switchTo().frame('quill-1')
-  editor = element(By.className('editor-container'))
-  updateEditor = (switchBack = true) ->
-    browser.switchTo().defaultContent()
+  editor = element(By.className('ql-editor'))
+  updateEditor = ->
     browser.executeScript('quill.editor.checkUpdate()')
-    browser.switchTo().frame('quill-1') if switchBack
-
-  beforeEach( ->
-    browser.switchTo().defaultContent()
-    browser.switchTo().frame('quill-1')
-  )
 
   it('initial focus', ->
     editor.click()
-    updateEditor(false)
+    updateEditor()
     expect(startRange.getText()).toEqual('0')
     expect(endRange.getText()).toEqual('0')
   )

    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('line format', ->
    editor.sendKeys(protractor.Key.chord(protractor.Key.SHIFT, protractor.Key.ARROW_UP))
    updateEditor()
    expect(startRange.getText()).toEqual('0')
    expect(endRange.getText()).toEqual('30')

    element(By.css('.ql-align')).click()
    element(By.cssContainingText('.ql-align option', 'Center')).click()
    updateEditor()
    lines = element.all(By.css('.ql-editor div'))
    expect(lines.get(0).getOuterHtml().then(cleanLines)).toEqual(
      '<div style="text-align: center;"><span style="font-size: 32px;">Moby Dick</span></div>'
    )
    expect(lines.get(1).getOuterHtml().then(cleanLines)).toEqual(
      '<div style="text-align: center;"><b>Chapter 1. Loomings.</b></div>'
    )
    expectedDelta = {
      ops: [
        { retain: 9 }
