summaryrefslogtreecommitdiffstats
path: root/tests/auto/wasm/selenium/qwasmwindow.py
diff options
context:
space:
mode:
authorEven Oscar Andersen <[email protected]>2024-10-02 13:12:22 +0200
committerEven Oscar Andersen <[email protected]>2024-10-15 17:25:47 +0200
commitd69348ed4d659f9408ce74f3b08ee7e9104dde00 (patch)
treeb1c75017febb8106347d8c965ed72bec374e30f8 /tests/auto/wasm/selenium/qwasmwindow.py
parent9b11c3736e9ff23b0febce80c3f488099f1229fc (diff)
wasm: Fix tooltip visible
Fixes a problem where tooltips only worked for the first instance activated. Fixes: QTBUG-129234 Pick-to: 6.8 Change-Id: I45619b1ca8001b74b148b98a8795000630dcacf7 Reviewed-by: Morten Johan Sørvig <[email protected]>
Diffstat (limited to 'tests/auto/wasm/selenium/qwasmwindow.py')
-rw-r--r--tests/auto/wasm/selenium/qwasmwindow.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/wasm/selenium/qwasmwindow.py b/tests/auto/wasm/selenium/qwasmwindow.py
index b0356ae83d5..bf05aed9db4 100644
--- a/tests/auto/wasm/selenium/qwasmwindow.py
+++ b/tests/auto/wasm/selenium/qwasmwindow.py
@@ -57,6 +57,13 @@ class WidgetTestCase(unittest.TestCase):
w0 = Widget(self._driver, "w0")
w0.show()
+ w0.showToolTip()
+
+ #
+ # Wait for tooltip to disappear
+ #
+ time.sleep(60)
+ #time.sleep(3600)
self.assertEqual(w0.hasFocus(), True)
w1 = Widget(self._driver, "w1")
@@ -95,23 +102,28 @@ class WidgetTestCase(unittest.TestCase):
w0 = Widget(self._driver, "w0")
w0.show()
w0.showContextMenu()
+ w0.showToolTip()
w1 = Widget(self._driver, "w1")
w1.setNoFocusShow()
w1.show()
w1.showContextMenu()
+ w1.showToolTip()
w2 = Widget(self._driver, "w2")
w2.show()
w2.showContextMenu()
+ w2.showToolTip()
w3 = Widget(self._driver, "w3")
w3.setNoFocusShow()
w3.show()
w3.showContextMenu()
+ w3.showToolTip()
w3.activate();
w3.showContextMenu()
+ w3.showToolTip();
clearWidgets(self._driver)
@@ -725,6 +737,13 @@ class Widget:
'''
)
+ def showToolTip(self):
+ self.driver.execute_script(
+ f'''
+ instance.showToolTipWidget('{self.name}');
+ '''
+ )
+
class Window:
def __init__(self, parent=None, rect=None, title=None, element=None, visible=True, opengl=0):
self.driver = parent.driver