summaryrefslogtreecommitdiff
path: root/tests/helpers/fixtures.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-05-22 17:46:45 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-05-22 17:50:24 +0200
commit9b8767b64eea1498e383ae9ef790cb377bfb7508 (patch)
treea1dd76aa27f3239d74bc5c832611c24f8971c302 /tests/helpers/fixtures.py
parent31af9cc54b835064ddd1eb12ab38293e1eb902a1 (diff)
downloadqutebrowser-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.py3
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