diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2017-08-09 12:51:40 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2017-08-09 15:18:57 +0000 |
commit | 068379a66f88b34545530a018c0826c2c09a100a (patch) | |
tree | d2ce6f6b4aa89ab1aabb2103256dfc0aab62cb59 /tests/auto/qquickmenubar | |
parent | 06d8845892f6b4b73418bd5ff9552eba71dbfa38 (diff) |
Fix failing tests in tst_menu and tst_qquickmenubar
As mentioned in the bug report for the failing tst_qquickmenubar test,
the window is sometimes opened at the bottom right corner of the screen
on the Ubuntu CI machines. However, even after centering the window
on the screen, the old setPos() call still caused the tests to fail.
So, we position the cursor past a different corner of the window, which
works.. though I don't know why.
Task-number: QTBUG-62363
Task-number: QTBUG-62383
Change-Id: I3649230002eaac5a6391daff24427e6f9f58cfa5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qquickmenubar')
-rw-r--r-- | tests/auto/qquickmenubar/BLACKLIST | 5 | ||||
-rw-r--r-- | tests/auto/qquickmenubar/tst_qquickmenubar.cpp | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/tests/auto/qquickmenubar/BLACKLIST b/tests/auto/qquickmenubar/BLACKLIST deleted file mode 100644 index 5ec6525d..00000000 --- a/tests/auto/qquickmenubar/BLACKLIST +++ /dev/null @@ -1,5 +0,0 @@ -# See qtbase/src/testlib/qtestblacklist.cpp for format - -# https://bugreports.qt.io/browse/QTBUG-62363 -[mouse] -ubuntu-16.04 ci diff --git a/tests/auto/qquickmenubar/tst_qquickmenubar.cpp b/tests/auto/qquickmenubar/tst_qquickmenubar.cpp index 5e4d075e..932e13bc 100644 --- a/tests/auto/qquickmenubar/tst_qquickmenubar.cpp +++ b/tests/auto/qquickmenubar/tst_qquickmenubar.cpp @@ -83,6 +83,7 @@ void tst_qquickmenubar::mouse() QVERIFY(window); QVERIFY(QTest::qWaitForWindowActive(window.data())); + centerOnScreen(window.data()); moveMouseAway(window.data()); QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>(); @@ -221,6 +222,7 @@ void tst_qquickmenubar::keys() QVERIFY(window); QVERIFY(QTest::qWaitForWindowActive(window.data())); + centerOnScreen(window.data()); moveMouseAway(window.data()); QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>(); @@ -408,6 +410,7 @@ void tst_qquickmenubar::mnemonics() QVERIFY(window); QVERIFY(QTest::qWaitForWindowActive(window.data())); + centerOnScreen(window.data()); moveMouseAway(window.data()); QQuickMenuBar *menuBar = window->property("header").value<QQuickMenuBar *>(); |