diff options
| author | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2015-09-28 12:39:59 -0500 |
| commit | 455f099b504ec07dd492ab31987ae05a6f6774c7 (patch) | |
| tree | 22b0c7fd8e492733b97e661750a2d79c46da451d /atom/packages/vim-mode/spec/vim-mode-spec.coffee | |
| parent | 24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a (diff) | |
Adds atom packages
Diffstat (limited to 'atom/packages/vim-mode/spec/vim-mode-spec.coffee')
| -rw-r--r-- | atom/packages/vim-mode/spec/vim-mode-spec.coffee | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/atom/packages/vim-mode/spec/vim-mode-spec.coffee b/atom/packages/vim-mode/spec/vim-mode-spec.coffee index 0f4d8b8..280e545 100644 --- a/atom/packages/vim-mode/spec/vim-mode-spec.coffee +++ b/atom/packages/vim-mode/spec/vim-mode-spec.coffee @@ -18,15 +18,20 @@ describe "VimMode", -> editorElement = atom.views.getView(editor) describe ".activate", -> - it "puts the editor in command-mode initially by default", -> + it "puts the editor in normal-mode initially by default", -> expect(editorElement.classList.contains('vim-mode')).toBe(true) - expect(editorElement.classList.contains('command-mode')).toBe(true) + expect(editorElement.classList.contains('normal-mode')).toBe(true) it "shows the current vim mode in the status bar", -> - statusBarTile = workspaceElement.querySelector("#status-bar-vim-mode") - expect(statusBarTile.textContent).toBe("Command") - atom.commands.dispatch(editorElement, "vim-mode:activate-insert-mode") - expect(statusBarTile.textContent).toBe("Insert") + statusBarTile = null + + waitsFor -> + statusBarTile = workspaceElement.querySelector("#status-bar-vim-mode") + + runs -> + expect(statusBarTile.textContent).toBe("Normal") + atom.commands.dispatch(editorElement, "vim-mode:activate-insert-mode") + expect(statusBarTile.textContent).toBe("Insert") it "doesn't register duplicate command listeners for editors", -> editor.setText("12345") @@ -44,7 +49,7 @@ describe "VimMode", -> it "removes the vim classes from the editor", -> atom.packages.deactivatePackage('vim-mode') expect(editorElement.classList.contains("vim-mode")).toBe(false) - expect(editorElement.classList.contains("command-mode")).toBe(false) + expect(editorElement.classList.contains("normal-mode")).toBe(false) it "removes the vim commands from the editor element", -> vimCommands = -> |