       it 'expands the selection to the beginning of the table', ->
         tableView.activateCellAtPosition([1,0])
 
-        tableView.trigger('table-edit:select-to-end-of-table')
-        tableView.trigger('table-edit:select-to-beginning-of-table')
+        atom.commands.dispatch(tableView.element, 'table-edit:select-to-end-of-table')
+        atom.commands.dispatch(tableView.element, 'table-edit:select-to-beginning-of-table')
 
         expect(tableView.getSelection()).toEqual([[0,0],[1,0]])
 

      it 'expands the selection to the beginning of the current row', ->
        tableView.activateCellAtPosition([0,1])

        tableView.trigger('table-edit:select-to-end-of-line')
        tableView.trigger('table-edit:select-to-beginning-of-line')

        expect(tableView.getSelection()).toEqual([[0,0],[0,1]])


      it 'collapse the selection back to the left', ->
        tableView.activateCellAtPosition([0,1])

        atom.commands.dispatch(tableView.element, 'core:select-right')
        atom.commands.dispatch(tableView.element, 'core:select-left')

        expect(tableView.getSelection()).toEqual([[0,1],[0,1]])

