Fix selection test.

- update .trigger() to atom.commands.dispatch().
- update getSelection(index) to getSelections()[index].