From 57148c4bae353779e55d6c751520a9152129120f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 13 Jun 2016 16:01:54 +0200 Subject: [PATCH] [autotests] Extend test for PlasmaShellSurface::setRole If the role is set to the same as before it should not emit the changed signal. --- src/wayland/autotests/client/test_plasmashell.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland/autotests/client/test_plasmashell.cpp b/src/wayland/autotests/client/test_plasmashell.cpp index d75ad87dd0..288cdb7cb8 100644 --- a/src/wayland/autotests/client/test_plasmashell.cpp +++ b/src/wayland/autotests/client/test_plasmashell.cpp @@ -206,6 +206,10 @@ void TestPlasmaShell::testRole() QCOMPARE(roleChangedSpy.count(), 1); QTEST(sps->role(), "serverRole"); + // try changing again should not emit the signal + ps->setRole(clientRole); + QVERIFY(!roleChangedSpy.wait(100)); + // set role back to normal ps->setRole(PlasmaShellSurface::Role::Normal); QCOMPARE(ps->role(), PlasmaShellSurface::Role::Normal);