BDD tests for :command-history-prev/next

ref #999
This commit is contained in:
Sebastian Frysztak 2016-10-06 21:02:15 +02:00
parent e73932a555
commit b8156a0c32

View File

@ -671,3 +671,38 @@ Feature: Various utility commands.
And I wait until the scroll position changed
And I run :click-element id link
Then the error "Element position is out of view!" should be shown
## :command-history-{prev,next}
Scenario: Calling previous command
When I run :set-cmd-text :message-info blah
And I run :command-accept
And I wait for "blah" in the log
And I run :set-cmd-text :
And I run :command-history-prev
And I run :command-accept
Then the message "blah" should be shown
Scenario: Browsing through commands
When I run :set-cmd-text :message-info blarg
And I run :command-accept
And I wait for "blarg" in the log
And I run :set-cmd-text :
And I run :command-history-prev
And I run :command-history-prev
And I run :command-history-next
And I run :command-accept
Then the message "blarg" should be shown
Scenario: Calling previous command when history is empty
Given I have a fresh instance
When I run :set-cmd-text :
And I run :command-history-prev
And I run :command-accept
Then the error "No command given" should be shown
Scenario: Calling next command when there's no next command
When I run :set-cmd-text :
And I run :command-history-next
And I run :command-accept
Then the error "No command given" should be shown