Working on adding pager.

This commit is contained in:
Michael Lazar
2016-03-03 18:28:14 -08:00
parent 201ef8e6df
commit ffbd6c1dfd
5 changed files with 83 additions and 6 deletions

View File

@@ -94,6 +94,23 @@ def test_submission_open(submission_page, terminal):
assert terminal.open_browser.called
def test_submission_pager(submission_page, terminal):
# View a submission with the pager
with mock.patch.object(terminal, 'open_pager'):
submission_page.controller.trigger(terminal.RETURN)
assert terminal.open_browser.called
# Move down to the first comment
with mock.patch.object(submission_page, 'clear_input_queue'):
submission_page.controller.trigger('j')
# View a comment with the pager
with mock.patch.object(terminal, 'open_pager'):
submission_page.controller.trigger(terminal.RETURN)
assert terminal.open_browser.called
def test_submission_vote(submission_page, refresh_token):
# Log in