               bufferView.toggle()
 
             runs ->
-            expect(bufferView.find('.status.status-added').length).toBe 1
-            expect(bufferView.find('.status.status-added').closest('li').find('.file').text()).toBe 'newsample.js'
+              expect(bufferView.element.querySelectorAll('.status.status-added').length).toBe 1
+              expect(bufferView.element.querySelector('.status.status-added').closest('li').querySelector('.file').textContent).toBe 'newsample.js'
 
     describe "when core.excludeVcsIgnoredPaths is set to true", ->
       beforeEach ->

            projectView.toggle()

          runs ->
          projectView.setMaxItems(Infinity)

          waitForPathsToDisplay(projectView)

          runs ->
            expect(Array.from(projectView.element.querySelectorAll('li')).find((a) -> a.textContent.includes("file.txt"))).toBeDefined()

            projectView.toggle()

          runs ->
            waitForPathsToDisplay(projectView)

          runs ->
            expect(Array.from(projectView.element.querySelectorAll('li')).find((a) -> a.textContent.includes("ignored.txt"))).not.toBeDefined()
