     it 'moves the active cell to the first row', ->
       tableView.activeCellPosition.row = 50
 
-      tableView.trigger('core:move-to-bottom')
+      atom.commands.dispatch(tableView.element, 'core:move-to-bottom')
 
       expect(tableView.activeCellPosition.row).toEqual(99)
 

      atom.config.set 'table-edit.pageMovesAmount', 20

    it 'moves the active cell 20 rows below', ->
      tableView.trigger('core:page-down')

      expect(tableView.activeCellPosition.row).toEqual(20)

    it 'stops to the last row without looping', ->
      tableView.activeCellPosition.row = 90

      tableView.trigger('core:page-down')

      expect(tableView.activeCellPosition.row).toEqual(99)


      tableView.activateCellAtPosition([2,0])

    it 'expands the selection by one cell to the top', ->
      atom.commands.dispatch(tableView.element, 'core:select-up')
      expect(tableView.getSelection()).toEqual([[1,0],[2,0]])

    it 'stops at the first row', ->
      atom.commands.dispatch(tableView.element, 'core:select-up')
      atom.commands.dispatch(tableView.element, 'core:select-up')
      atom.commands.dispatch(tableView.element, 'core:select-up')
      expect(tableView.getSelection()).toEqual([[0,0],[2,0]])

    it 'scrolls the view to make the added row visible', ->
      tableView.scrollTop(200)
      tableView.activateCellAtPosition([10,0])

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

      expect(tableView.body.scrollTop()).toEqual(180)

