From 64730f566f872b91f267e0f8ae2c4c3fda3d7dc3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 9 Nov 2015 07:39:24 +0100 Subject: [PATCH] tests: Make wait for loading work with downloads. --- tests/integration/quteprocess.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index 3d85828b8..b09475b2a 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -209,9 +209,10 @@ class QuteProc(testprocess.Process): """Wait until any tab has finished loading.""" url = 'http://localhost:{}/{}'.format(self._httpbin.port, path) pattern = re.compile( - r"load status for : LoadStatus.success".format(url)) - self.wait_for(category='webview', message=pattern, timeout=timeout) + r"(load status for : LoadStatus.success|fetch: " + r"PyQt5.QtCore.QUrl\('{url}'\) -> .*)".format(url=re.escape(url))) + self.wait_for(message=pattern, timeout=timeout) def get_session(self): """Save the session and get the parsed session data."""