diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-05-22 17:46:45 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-05-22 17:50:24 +0200 |
commit | 9b8767b64eea1498e383ae9ef790cb377bfb7508 (patch) | |
tree | a1dd76aa27f3239d74bc5c832611c24f8971c302 /tests/helpers/fixtures.py | |
parent | 31af9cc54b835064ddd1eb12ab38293e1eb902a1 (diff) | |
download | qutebrowser-9b8767b64eea1498e383ae9ef790cb377bfb7508.tar.gz qutebrowser-9b8767b64eea1498e383ae9ef790cb377bfb7508.zip |
tests: Make sure WidgetContainer.expose() sets focus on widget
This is needed to convert the searched string into a selection properly.
Fixes #5363
See #5393
Diffstat (limited to 'tests/helpers/fixtures.py')
-rw-r--r-- | tests/helpers/fixtures.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/helpers/fixtures.py b/tests/helpers/fixtures.py index 51fd98272..eb4186894 100644 --- a/tests/helpers/fixtures.py +++ b/tests/helpers/fixtures.py @@ -64,14 +64,17 @@ class WidgetContainer(QWidget): self._qtbot = qtbot self.vbox = QVBoxLayout(self) qtbot.add_widget(self) + self._widget = None def set_widget(self, widget): self.vbox.addWidget(widget) widget.container = self + self._widget = widget def expose(self): with self._qtbot.waitExposed(self): self.show() + self._widget.setFocus() @pytest.fixture |