Simplify some utilcmds tests
This commit is contained in:
parent
21d2d04f45
commit
460389c30d
@ -30,24 +30,28 @@ Feature: Miscellaneous utility commands exposed to the user.
|
|||||||
## :repeat
|
## :repeat
|
||||||
|
|
||||||
Scenario: :repeat simple
|
Scenario: :repeat simple
|
||||||
When I run :repeat 5 scroll-px 10 0
|
When I run :repeat 2 message-info repeat-test
|
||||||
And I wait until the scroll position changed to 50/0
|
Then the message "repeat-test" should be shown
|
||||||
# Then already covered by above And
|
And the message "repeat-test" should be shown
|
||||||
|
|
||||||
Scenario: :repeat zero times
|
Scenario: :repeat zero times
|
||||||
When I run :repeat 0 scroll-px 10 0
|
When I run :repeat 0 message-error "repeat-test 2"
|
||||||
And I wait 0.01s
|
# If we have an error, the test will fail
|
||||||
Then the page should not be scrolled
|
Then no crash should happen
|
||||||
|
|
||||||
## :run-with-count
|
## :run-with-count
|
||||||
|
|
||||||
Scenario: :run-with-count
|
Scenario: :run-with-count
|
||||||
When I run :run-with-count 2 scroll down
|
When I run :run-with-count 2 message-info "run-with-count test"
|
||||||
Then "command called: scroll ['down'] (count=2)" should be logged
|
Then the message "run-with-count test" should be shown
|
||||||
|
And the message "run-with-count test" should be shown
|
||||||
|
|
||||||
Scenario: :run-with-count with count
|
Scenario: :run-with-count with count
|
||||||
When I run :run-with-count 2 scroll down with count 3
|
When I run :run-with-count 2 message-info "run-with-count test 2" with count 2
|
||||||
Then "command called: scroll ['down'] (count=6)" should be logged
|
Then the message "run-with-count test 2" should be shown
|
||||||
|
And the message "run-with-count test 2" should be shown
|
||||||
|
And the message "run-with-count test 2" should be shown
|
||||||
|
And the message "run-with-count test 2" should be shown
|
||||||
|
|
||||||
## :message-*
|
## :message-*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user