diff --git a/src/wayland/autotests/client/test_wayland_windowmanagement.cpp b/src/wayland/autotests/client/test_wayland_windowmanagement.cpp index 0069e8b5bc..396d8266cf 100644 --- a/src/wayland/autotests/client/test_wayland_windowmanagement.cpp +++ b/src/wayland/autotests/client/test_wayland_windowmanagement.cpp @@ -55,6 +55,7 @@ private Q_SLOTS: void testGeometry(); void testIcon(); void testPid(); + void testApplicationMenu(); void cleanup(); @@ -638,5 +639,22 @@ void TestWindowManagement::testPid() } +void TestWindowManagement::testApplicationMenu() +{ + using namespace KWayland::Client; + + const auto serviceName = QStringLiteral("org.kde.foo"); + const auto objectPath = QStringLiteral("/org/kde/bar"); + + m_windowInterface->setApplicationMenuPaths(serviceName, objectPath); + + QSignalSpy applicationMenuChangedSpy(m_window, &PlasmaWindow::applicationMenuChanged); + QVERIFY(applicationMenuChangedSpy.isValid()); + QVERIFY(applicationMenuChangedSpy.wait()); + + QCOMPARE(m_window->applicationMenuServiceName(), serviceName); + QCOMPARE(m_window->applicationMenuObjectPath(), objectPath); +} + QTEST_MAIN(TestWindowManagement) #include "test_wayland_windowmanagement.moc"