summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-11 15:21:54 +0200
committerJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-10-18 10:53:34 +0200
commit52484cc4b6696c8a5c1f69125d81eb0cede8cdb2 (patch)
tree4d5b0d4135104a7a623325fb761b615760630b98 /tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
parentdce8849037ee079d6b09dd4022aa80aa670caccd (diff)
Widget tests: Skip tests that fail on Wayland
Either by testing for platform name or window activation. After this gets in, we can enable widget tests in the Wayland bot, which hopefully will reduce the number of regressions in the Wayland plugin. Fixes: QTBUG-62188 Change-Id: I71ce8abd6b5891e5b953126b1c35345892585931 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp')
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 417d6e3124..f2d4379453 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -338,6 +338,9 @@ inline TestMenu tst_QMenuBar::initWindowWithComplexMenuBar(QMainWindow &w)
#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::accel()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
// create a popup menu with menu items set the accelerators later...
QMainWindow w;
const TestMenu menu = initWindowWithSimpleMenuBar(w);
@@ -356,6 +359,9 @@ void tst_QMenuBar::accel()
#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::activatedCount()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
// create a popup menu with menu items set the accelerators later...
QMainWindow w;
QFETCH( bool, forceNonNative );
@@ -555,6 +561,9 @@ void tst_QMenuBar::insertItem_QString_QObject()
#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_accelKeys()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
initWindowWithComplexMenuBar(w);
w.show();
@@ -631,6 +640,9 @@ void tst_QMenuBar::check_cursorKeys1()
if (qgetenv("XDG_CURRENT_DESKTOP") == "Unity")
QSKIP("This test is flaky on Ubuntu/Unity due to regression introduced by QTBUG-39362");
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
initWindowWithComplexMenuBar(w);
w.show();
@@ -668,6 +680,9 @@ void tst_QMenuBar::check_cursorKeys2()
if (qgetenv("XDG_CURRENT_DESKTOP") == "Unity")
QSKIP("This test is flaky on Ubuntu/Unity due to regression introduced by QTBUG-39362");
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
initWindowWithComplexMenuBar(w);
w.show();
@@ -704,6 +719,9 @@ void tst_QMenuBar::check_cursorKeys3()
if (qgetenv("XDG_CURRENT_DESKTOP") == "Unity")
QSKIP("This test is flaky on Ubuntu/Unity due to regression introduced by QTBUG-39362");
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
initWindowWithComplexMenuBar(w);
w.show();
@@ -733,6 +751,9 @@ void tst_QMenuBar::taskQTBUG56860_focus()
#if defined(Q_OS_DARWIN)
QSKIP("Native key events are needed to test menu action activation on macOS.");
#endif
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
QMenuBar *mb = w.menuBar();
mb->setNativeMenuBar(false);
@@ -861,6 +882,9 @@ void tst_QMenuBar::check_endKey()
#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_escKey()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
const TestMenu menu = initWindowWithComplexMenuBar(w);
w.show();
@@ -1051,6 +1075,9 @@ void tst_QMenuBar::allowActiveAndDisabled()
void tst_QMenuBar::check_altPress()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
if ( !qApp->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation) ) {
QSKIP(QString( "this is not supposed to work in the %1 style. Skipping." ).
arg(qApp->style()->objectName()).toLatin1());
@@ -1071,6 +1098,9 @@ void tst_QMenuBar::check_altPress()
// should close it and QMenuBar::activeAction() should be 0.
void tst_QMenuBar::check_altClosePress()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
const QStyle *style = QApplication::style();
if (!style->styleHint(QStyle::SH_MenuBar_AltKeyNavigation) ) {
QSKIP(("This test is not supposed to work in the " + style->objectName().toLatin1()
@@ -1101,6 +1131,9 @@ void tst_QMenuBar::check_altClosePress()
#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_shortcutPress()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
const TestMenu menu = initWindowWithComplexMenuBar(w);
w.show();
@@ -1144,6 +1177,9 @@ private:
#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::check_menuPosition()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow w;
Menu menu;
@@ -1266,6 +1302,9 @@ void tst_QMenuBar::task256322_highlight()
if (!QGuiApplication::platformName().compare(QLatin1String("minimal"), Qt::CaseInsensitive))
QSKIP("Highlighting does not work correctly for minimal platform");
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow win;
win.menuBar()->setNativeMenuBar(false); //we can't check the geometry of native menubars
QMenu menu;
@@ -1406,6 +1445,9 @@ void tst_QMenuBar::taskQTBUG4965_escapeEaten()
void tst_QMenuBar::taskQTBUG11823_crashwithInvisibleActions()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMenuBar menubar;
menubar.setNativeMenuBar(false); //we can't check the geometry of native menubars
@@ -1434,6 +1476,9 @@ void tst_QMenuBar::taskQTBUG11823_crashwithInvisibleActions()
void tst_QMenuBar::closeOnSecondClickAndOpenOnThirdClick() // QTBUG-32807, menu should close on 2nd click.
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow mainWindow;
mainWindow.resize(300, 200);
centerOnScreen(&mainWindow);
@@ -1689,6 +1734,9 @@ void tst_QMenuBar::slotForTaskQTBUG53205()
#if !defined(Q_OS_DARWIN)
void tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow mainWindow;
QWidget *centralWidget = new QWidget;
centralWidget->setFocusPolicy(Qt::StrongFocus);
@@ -1769,6 +1817,9 @@ void tst_QMenuBar::QTBUG_57404_existingMenuItemException()
void tst_QMenuBar::taskQTBUG55966_subMenuRemoved()
{
+ if (QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive))
+ QSKIP("Wayland: This fails. Figure out why.");
+
QMainWindow window;
QMenuBar *menubar = window.menuBar();
QMenu *parentMenu = menubar->addMenu("Parent menu");