- 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")