         expect(getAtomPanel()).toBeVisible()
         expect(projectFindView.pathsEditor.getText()).toBe('nested')
 
-        tree.name.trigger 'project-find:show-in-current-directory'
+        atom.commands.dispatch tree.name[0], 'project-find:show-in-current-directory'
         expect(projectFindView.pathsEditor.getText()).toBe('')
 
     it "populates the pathsEditor when triggered on a directory's name", ->
-      nested.trigger 'project-find:show-in-current-directory'
+      atom.commands.dispatch nested[0], 'project-find:show-in-current-directory'
 
       waitsForPromise ->
         activationPromise

        expect(getAtomPanel()).toBeVisible()
        expect(projectFindView.pathsEditor.getText()).toBe('nested')

        tree.files.find('> .file:eq(0)').view().name.trigger 'project-find:show-in-current-directory'
        expect(projectFindView.pathsEditor.getText()).toBe('')

  describe "finding", ->


    describe "serialization", ->
      it "serializes if the case and regex options", ->
        atom.commands.dispatch editorView[0], 'project-find:show'
        expect(projectFindView.caseOptionButton).not.toHaveClass('selected')
        projectFindView.caseOptionButton.click()
        expect(projectFindView.caseOptionButton).toHaveClass('selected')
