From 4c1eff625fe855ad89429cb080b16085b7541087 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 24 Nov 2015 16:17:26 +0100 Subject: [PATCH] tests: Make inspector smoke test more reliable. Before we didn't wait until the inspector window was hidden, which caused the following tests to fail on our OS X buildbot: ==================================== ERRORS ==================================== _________ ERROR at teardown of test_fakekey_sending_key_to_the_website _________ [...] tests/integration/testprocess.py:186: InvalidLine ----------------------------- Captured stdout call ----------------------------- [...] INVALID: Traceback (most recent call last): IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/app.py", line 109, in IGNORED: target_arg=target_arg)) IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/app.py", line 263, in process_pos_args IGNORED: commandrunner.run_safely_init(cmd[1:]) IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/commands/runners.py", line 266, in run_safely_init IGNORED: self.run(text, count) IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/commands/runners.py", line 249, in run IGNORED: result.cmd.run(self._win_id, args) IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/commands/command.py", line 505, in run IGNORED: self.handler(*posargs, **kwargs) IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/browser/commands.py", line 1781, in fake_key IGNORED: tab='current') IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/utils/objreg.py", line 215, in get IGNORED: reg = _get_registry(scope, window, tab) IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/utils/objreg.py", line 202, in _get_registry IGNORED: return _get_tab_registry(window, tab) IGNORED: File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/utils/objreg.py", line 152, in _get_tab_registry IGNORED: raise RegistryUnavailableError('tab') INVALID: qutebrowser.utils.objreg.RegistryUnavailableError: tab [...] While this is a real issue, this test shouldn't affect the next one. Since we have to wait for windows getting focused but Xvfb doesn't do that, we skip this tests when running via Xvfb. --- tests/integration/features/misc.feature | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/features/misc.feature b/tests/integration/features/misc.feature index c7e8112e4..5da8d1a40 100644 --- a/tests/integration/features/misc.feature +++ b/tests/integration/features/misc.feature @@ -108,10 +108,13 @@ Feature: Various utility commands. And I run :inspector Then the error "Please enable developer-extras before using the webinspector!" should be shown. + @not_xvfb Scenario: Inspector smoke test When I set general -> developer-extras to true And I run :inspector + And I wait for "Focus object changed: " in the log And I run :inspector + And I wait for "Focus object changed: " in the log Then no crash should happen # :fake-key