Skip parts of customContextMenu and sharedContextMenu tests on Windows

Pick-to: 6.9
Task-number: QTBUG-132436
Change-Id: I95e6178c4453e35bc392118d6758a91074b7951a
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Shawn Rutledge 2024-12-23 22:30:38 +01:00
parent 0794a0e06e
commit fcb3be5120
1 changed files with 9 additions and 0 deletions

View File

@ -72,6 +72,11 @@ void tst_QQuickContextMenu::customContextMenu()
QTRY_COMPARE(menu->isOpened(), !contextMenuTriggeredOnRelease);
QTest::mouseRelease(window, Qt::RightButton, Qt::NoModifier, tomatoCenter);
#ifdef Q_OS_WIN
if (qgetenv("QTEST_ENVIRONMENT").split(' ').contains("ci"))
QSKIP("Menu fails to open on Windows (QTBUG-132436)");
#endif
QTRY_COMPARE(menu->isOpened(), true);
// Popups are positioned relative to their parent, and it should be opened at the center:
@ -104,6 +109,10 @@ void tst_QQuickContextMenu::sharedContextMenu()
auto menus = window->findChildren<QQuickMenu *>();
QCOMPARE(menus.count(), 1);
QPointer<QQuickMenu> menu = menus.first();
#ifdef Q_OS_WIN
if (qgetenv("QTEST_ENVIRONMENT").split(' ').contains("ci"))
QSKIP("Menu fails to open on Windows (QTBUG-132436)");
#endif
QTRY_VERIFY(menu->isOpened());
QCOMPARE(menu->parentItem(), tomato);
QCOMPARE(menu->itemAt(0)->property("text").toString(), "Eat tomato");