 
     describe "when the jumpy:clear event is triggered", ->
         it "clears the status bar", ->
-            editorView.trigger 'jumpy:clear'
+            textEditorElement.trigger 'jumpy:clear'
             expect(atom.workspaceView.statusBar
                 ?.querySelectorAll('#status-bar-jumpy').html()).toBe ''
 
     describe "when the jumpy:a event is triggered", ->
         it "updates the status bar with a", ->
-            editorView.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:a'
             expect(atom.workspaceView.statusBar
                 ?.querySelectorAll('#status-bar-jumpy .status').html()).toBe 'a'
         it "removes all labels that don't begin with a", ->
-            editorView.trigger 'jumpy:a'
-            expect(editorView.querySelectorAll('.jumpy.label:not(.irrelevant)')
+            textEditorElement.trigger 'jumpy:a'
+            expect(textEditorElement.querySelectorAll('.jumpy.label:not(.irrelevant)')
                 .length).toBe 26
 
     describe "when the jumpy:reset event is triggered", ->
         it "clears first entered key and lets a new jump take place", ->
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:reset'
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:e'
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:reset'
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:e'
             cursorPosition = editor.getCursorBufferPosition()
             expect(cursorPosition.row).toBe 0
             expect(cursorPosition.column).toBe 12
 
     describe "when the jumpy:reset event is triggered", ->
         it "updates the status bar", ->
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:reset'
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:reset'
             expect(atom.workspaceView.statusBar
                 ?.querySelectorAll('#status-bar-jumpy .status').html()).toBe 'Jump Mode!'
         it "resets all labels even those that don't begin with a", ->
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:reset'
-            expect(editorView.querySelectorAll('.jumpy.label:not(.irrelevant)')
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:reset'
+            expect(textEditorElement.querySelectorAll('.jumpy.label:not(.irrelevant)')
                 .length).toBe NUM_TOTAL_WORDS + NUM_CAMEL_SPECIFIC_MATCHES
 
     describe "when the a text selection has begun
         before a jumpy:toggle event is triggered", ->
         it "keeps the selection for subsequent jumps", ->
-            editorView.trigger 'jumpy:clear'
-            editorView.trigger 'jumpy:toggle'
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:a'
-            editor.selectRight()
-            editor.selectRight()
-            editorView.trigger 'jumpy:toggle'
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:e'
+            textEditorElement.trigger 'jumpy:clear'
+            textEditorElement.trigger 'jumpy:toggle'
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:a'
+            editor.selectRight()
+            editor.selectRight()
+            textEditorElement.trigger 'jumpy:toggle'
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:e'
             expect(editor.getSelection(0).getText()).toBe 'aa ab ac ad '
 
     describe "when the a text selection has begun
         before a jumpy:toggle event is triggered", ->
         it "keeps the selection for subsequent jumps", ->
-            editorView.trigger 'jumpy:clear'
-            editorView.trigger 'jumpy:toggle'
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:a'
-            editor.selectRight()
-            editor.selectRight()
-            editorView.trigger 'jumpy:toggle'
-            editorView.trigger 'jumpy:a'
-            editorView.trigger 'jumpy:e'
+            textEditorElement.trigger 'jumpy:clear'
+            textEditorElement.trigger 'jumpy:toggle'
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:a'
+            editor.selectRight()
+            editor.selectRight()
+            textEditorElement.trigger 'jumpy:toggle'
+            textEditorElement.trigger 'jumpy:a'
+            textEditorElement.trigger 'jumpy:e'
             expect(editor.getSelection(0).getText()).toBe 'aa ab ac ad '
 
     describe "when a character is entered that no label has a match for", ->
         it "displays a status bar error message", ->
-            editorView.trigger 'jumpy:z'
+            textEditorElement.trigger 'jumpy:z'
             expect(atom.workspaceView.statusBar
                 ?.querySelectorAll('#status-bar-jumpy')
                     .hasClass 'no-match').toBeTruthy()

                ?.querySelectorAll('#status-bar-jumpy .status')
                    .html() == 'No match!').toBeTruthy()
        it "eventually clears the status bar error message", ->
            editorView.trigger 'jumpy:toggle'
            editorView.trigger 'jumpy:z'
            editorView.trigger 'jumpy:a'
            expect(atom.workspaceView.statusBar
                ?.querySelectorAll '#status-bar-jumpy'
                    .hasClass 'no-match').toBeFalsy()

        and hotkeys are entered", ->
        it "jumps the cursor", ->
            editor.setCursorBufferPosition [1,1]
            textEditorElement.trigger 'jumpy:a'
            textEditorElement.trigger 'jumpy:c'
            cursorPosition = editor.getCursorBufferPosition()
            expect(cursorPosition.row).toBe 0
            expect(cursorPosition.column).toBe 6
            expect(editor.getSelectedText()).toBe ''
        it "jumps the cursor in folded regions", ->
            textEditorElement.trigger 'jumpy:clear'
            editor.setCursorBufferPosition [23, 20]
            editor.foldCurrentRow()
            textEditorElement.trigger 'jumpy:toggle'
            textEditorElement.trigger 'jumpy:d'
            textEditorElement.trigger 'jumpy:i'
            cursorPosition = editor.getCursorScreenPosition()
            expect(cursorPosition.row).toBe 23
            expect(cursorPosition.column).toBe 2
            textEditorElement.trigger 'jumpy:toggle'
            textEditorElement.trigger 'jumpy:d'
            textEditorElement.trigger 'jumpy:h'
            cursorPosition = editor.getCursorScreenPosition()
            expect(cursorPosition.row).toBe 22
            expect(cursorPosition.column).toBe 0
