Avoid checking for scroll position in macro tests
This makes them simpler and more stable.
This commit is contained in:
parent
e23318fe91
commit
6051f93c02
@ -202,34 +202,30 @@ Feature: Keyboard input
|
|||||||
# Macros
|
# Macros
|
||||||
|
|
||||||
Scenario: Recording a simple macro
|
Scenario: Recording a simple macro
|
||||||
Given I open data/scroll/simple.html
|
When I run :record-macro
|
||||||
And I run :tab-only
|
|
||||||
When I run :scroll down with count 6
|
|
||||||
And I wait until the scroll position changed
|
|
||||||
And I run :record-macro
|
|
||||||
And I press the key "a"
|
And I press the key "a"
|
||||||
And I run :scroll up
|
And I run :message-info "foo 1"
|
||||||
And I run :scroll up
|
And I run :message-info "bar 1"
|
||||||
And I wait until the scroll position changed
|
|
||||||
And I run :record-macro
|
And I run :record-macro
|
||||||
And I run :run-macro with count 2
|
And I run :run-macro with count 2
|
||||||
And I press the key "a"
|
And I press the key "a"
|
||||||
And I wait until the scroll position changed to 0/0
|
Then the message "foo 1" should be shown
|
||||||
Then the page should not be scrolled
|
And the message "bar 1" should be shown
|
||||||
|
And the message "foo 1" should be shown
|
||||||
|
And the message "bar 1" should be shown
|
||||||
|
And the message "foo 1" should be shown
|
||||||
|
And the message "bar 1" should be shown
|
||||||
|
|
||||||
Scenario: Recording a named macro
|
Scenario: Recording a named macro
|
||||||
Given I open data/scroll/simple.html
|
When I run :record-macro foo
|
||||||
And I run :tab-only
|
And I run :message-info "foo 2"
|
||||||
When I run :scroll down with count 6
|
And I run :message-info "bar 2"
|
||||||
And I wait until the scroll position changed
|
|
||||||
And I run :record-macro foo
|
And I run :record-macro foo
|
||||||
And I run :scroll up
|
And I run :run-macro foo
|
||||||
And I run :scroll up
|
Then the message "foo 2" should be shown
|
||||||
And I wait until the scroll position changed
|
And the message "bar 2" should be shown
|
||||||
And I run :record-macro foo
|
And the message "foo 2" should be shown
|
||||||
And I run :run-macro foo with count 2
|
And the message "bar 2" should be shown
|
||||||
And I wait until the scroll position changed to 0/0
|
|
||||||
Then the page should not be scrolled
|
|
||||||
|
|
||||||
Scenario: Running an invalid macro
|
Scenario: Running an invalid macro
|
||||||
Given I open data/scroll/simple.html
|
Given I open data/scroll/simple.html
|
||||||
@ -264,17 +260,12 @@ Feature: Keyboard input
|
|||||||
Then "Leaving mode KeyMode.record_macro (reason: leave current)" should be logged
|
Then "Leaving mode KeyMode.record_macro (reason: leave current)" should be logged
|
||||||
|
|
||||||
Scenario: Ignoring non-register keys
|
Scenario: Ignoring non-register keys
|
||||||
Given I open data/scroll/simple.html
|
When I run :record-macro
|
||||||
And I run :tab-only
|
|
||||||
When I run :scroll down with count 2
|
|
||||||
And I wait until the scroll position changed
|
|
||||||
And I run :record-macro
|
|
||||||
And I press the key "<Menu>"
|
And I press the key "<Menu>"
|
||||||
And I press the key "c"
|
And I press the key "c"
|
||||||
And I run :scroll up
|
And I run :message-info "foo 3"
|
||||||
And I wait until the scroll position changed
|
|
||||||
And I run :record-macro
|
And I run :record-macro
|
||||||
And I run :run-macro
|
And I run :run-macro
|
||||||
And I press the key "c"
|
And I press the key "c"
|
||||||
And I wait until the scroll position changed to 0/0
|
Then the message "foo 3" should be shown
|
||||||
Then the page should not be scrolled
|
And the message "foo 3" should be shown
|
||||||
|
Loading…
Reference in New Issue
Block a user