         atom.workspace.getActiveTextEditor().setGrammar(atom.grammars.grammarForScopeName('source.js'))
         atom.commands.dispatch(getEditorView(), "symbols-view:toggle-file-symbols")
         symbolsView = $(getWorkspaceView()).find('.symbols-view').view()
-        expect(symbolsView.loading).toBeVisible()
+
+      waitsFor "loading", ->
+        symbolsView.setLoading.callCount > 1
 
       waitsFor ->
         symbolsView.list.children('li').length is 1

  getEditorView = -> atom.views.getView(atom.workspace.getActiveTextEditor())

  beforeEach ->
    atom.project.setPaths([
      temp.mkdirSync("other-dir-")
      temp.mkdirSync('atom-symbols-view-')


      runs ->
        symbolsView = $(getWorkspaceView()).find('.symbols-view').view()

      waitsFor "loading", ->
        symbolsView.setLoading.callCount is 1

      waitsFor ->
        symbolsView.list.children('li').length > 0
