bdd: Add "I wait for the javascript message" step
This commit is contained in:
parent
9f1aacc4f0
commit
17caf80f2a
@ -329,6 +329,12 @@ def wait_scroll_position_arg(quteproc, x, y):
|
||||
quteproc.wait_scroll_pos_changed(x, y)
|
||||
|
||||
|
||||
@bdd.when(bdd.parsers.parse('I wait for the javascript message "{message}"'))
|
||||
def javascript_message_when(quteproc, message):
|
||||
"""Make sure the given message was logged via javascript."""
|
||||
quteproc.wait_for_js(message)
|
||||
|
||||
|
||||
## Then
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ Feature: Various utility commands.
|
||||
Scenario: :jseval
|
||||
When I set general -> log-javascript-console to info
|
||||
And I run :jseval console.log("Hello from JS!");
|
||||
And I wait for "[:*] Hello from JS!" in the log
|
||||
And I wait for the javascript message "Hello from JS!"
|
||||
Then the message "No output or error" should be shown
|
||||
|
||||
Scenario: :jseval without logging
|
||||
@ -76,7 +76,7 @@ Feature: Various utility commands.
|
||||
Scenario: :jseval with --quiet
|
||||
When I set general -> log-javascript-console to info
|
||||
And I run :jseval --quiet console.log("Hello from JS!");
|
||||
And I wait for "[:*] Hello from JS!" in the log
|
||||
And I wait for the javascript message "Hello from JS!"
|
||||
Then "No output or error" should not be logged
|
||||
|
||||
Scenario: :jseval with a value
|
||||
|
Loading…
Reference in New Issue
Block a user