         expect(symbolsView.loading).toHaveText 'Generating symbols...'
 
       waitsFor ->
-        setItemsSpy.callCount > 0
+        symbolsView.list.children('li').length > 0
 
       runs ->
         expect(symbolsView.loading).toBeEmpty()

        symbolsView = atom.workspaceView.find('.symbols-view').view()

      waitsFor ->
        setItemsSpy.callCount > 0

      runs ->
        setItemsSpy.reset()
        symbolsView.cancel()
        spyOn(symbolsView, 'generateTags').andCallThrough()
        atom.workspaceView.getActiveView().trigger "symbols-view:toggle-file-symbols"

      waitsFor ->
        setItemsSpy.callCount > 0

      runs ->
        expect(symbolsView.loading).toBeEmpty()
        expect(symbolsView.list.children('li').length).toBe 2
        expect(symbolsView.generateTags).not.toHaveBeenCalled()
        editor.getBuffer().emit 'saved'
        setItemsSpy.reset()
        symbolsView.cancel()
        atom.workspaceView.getActiveView().trigger "symbols-view:toggle-file-symbols"

      waitsFor ->
        setItemsSpy.callCount > 0

      runs ->
        expect(symbolsView.loading).toBeEmpty()

        expect(symbolsView.loading).toHaveText 'Loading symbols...'

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

      runs ->
        expect(symbolsView.loading).toBeEmpty()
