diff --git a/tests/integration/features/conftest.py b/tests/integration/features/conftest.py index f071398d4..a2630417e 100644 --- a/tests/integration/features/conftest.py +++ b/tests/integration/features/conftest.py @@ -64,6 +64,14 @@ def wait_until_loaded(quteproc, path): quteproc.wait_for_load_finished(path) +@bdd.when(bdd.parsers.re(r'I wait for (?Pregex )?"' + r'(?P[^"]+)" in the log')) +def wait_in_log(quteproc, is_regex, pattern): + if is_regex: + pattern = re.compile(pattern) + quteproc.wait_for(message=pattern) + + @bdd.then(bdd.parsers.parse("{path} should be loaded")) def path_should_be_loaded(httpbin, path): requests = httpbin.get_requests()