diff --git a/autotests/integration/shell_client_test.cpp b/autotests/integration/shell_client_test.cpp
index 22b22068abdd6164575ea68c69cd4f57db6d535d..adfe9bb532281284d28a2dab1fb0b4060dbfae8e 100644
--- a/autotests/integration/shell_client_test.cpp
+++ b/autotests/integration/shell_client_test.cpp
@@ -26,6 +26,8 @@ along with this program. If not, see .
#include "wayland_server.h"
#include "workspace.h"
+#include
+
#include
#include
#include
@@ -961,6 +963,9 @@ void TestShellClient::testX11WindowId()
void TestShellClient::testAppMenu()
{
+ //register a faux appmenu client
+ QVERIFY (QDBusConnection::sessionBus().registerService("org.kde.kappmenu"));
+
QScopedPointer surface(Test::createSurface());
QScopedPointer shellSurface(Test::createShellSurface(Test::ShellSurfaceType::XdgShellV6, surface.data()));
auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue);
@@ -972,6 +977,8 @@ void TestShellClient::testAppMenu()
QCOMPARE(c->hasApplicationMenu(), true);
QCOMPARE(c->applicationMenuServiceName(), QString("service.name"));
QCOMPARE(c->applicationMenuObjectPath(), QString("object/path"));
+
+ QVERIFY (QDBusConnection::sessionBus().unregisterService("org.kde.kappmenu"));
}