diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index 2291a503c..8526cfdd1 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -182,6 +182,14 @@ def javascript_message_logged(quteproc, message): message='[*] {}'.format(message)) +@bdd.then(bdd.parsers.re(r'(?Pregex )?"(?P[^"]+)" should ' + r'be logged')) +def should_be_logged(quteproc, is_regex, pattern): + if is_regex: + pattern = re.compile(pattern) + quteproc.wait_for(message=pattern) + + @bdd.then("no crash should happen") def no_crash(): """Don't do anything.