Increase timeouts for javascript tests

This commit is contained in:
Jay Kamat 2017-11-17 21:42:24 -05:00
parent 6c241f96ed
commit 6338810396
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -140,7 +140,8 @@ class JSTester:
**kwargs: Passed to jinja's template.render().
"""
template = self._jinja_env.get_template(path)
with self._qtbot.waitSignal(self.webview.loadFinished) as blocker:
with self._qtbot.waitSignal(self.webview.loadFinished,
timeout=2000) as blocker:
self.webview.setHtml(template.render(**kwargs))
assert blocker.args == [True]
@ -161,7 +162,8 @@ class JSTester:
url: The QUrl to load.
force: Whether to force loading even if the file is invalid.
"""
with self._qtbot.waitSignal(self.webview.loadFinished) as blocker:
with self._qtbot.waitSignal(self.webview.loadFinished,
timeout=2000) as blocker:
self.webview.load(url)
if not force:
assert blocker.args == [True]