@@ -34,6 +34,14 @@ Rectangle {
35 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
35 Component.onCompleted: theme.name = "Ubuntu.Components.Themes.SuruDark"
38+ id: clickThroughTester
40+ // SignalSpy does not seem to want to connect to the pressed signal. let's count them ourselves.
41+ property int pressCount: 0
42+ onPressed: pressCount++;
38 id: launcherLoader
46 id: launcherLoader
39 anchors.fill: parent
47 anchors.fill: parent
@@ -836,16 +844,20 @@ Rectangle {
836 dragLauncherIntoView();
844 dragLauncherIntoView();
837 verify(launcher.state == "visible");
845 verify(launcher.state == "visible");
847+ clickThroughTester.pressCount = 0;
839 mouseClick(root, root.width / 2, units.gu(1));
848 mouseClick(root, root.width / 2, units.gu(1));
840 waitUntilLauncherDisappears();
849 waitUntilLauncherDisappears();
841 verify(launcher.state == "");
850 verify(launcher.state == "");
851+ compare(clickThroughTester.pressCount, 1);
843 // and repeat, as a test for regression in lpbug#1531339
853 // and repeat, as a test for regression in lpbug#1531339
844 dragLauncherIntoView();
854 dragLauncherIntoView();
845 verify(launcher.state == "visible");
855 verify(launcher.state == "visible");
856+ clickThroughTester.pressCount = 0;
846 mouseClick(root, root.width / 2, units.gu(1));
857 mouseClick(root, root.width / 2, units.gu(1));
847 waitUntilLauncherDisappears();
858 waitUntilLauncherDisappears();
848 verify(launcher.state == "");
859 verify(launcher.state == "");
860+ compare(clickThroughTester.pressCount, 1);
851 function test_quicklist_positioning_data() {
863 function test_quicklist_positioning_data() {