on xenial help sign in
Add the first qml test.
commitb568bb35b19887071523dacfa8e3301746a9fe45 authorAndrea Azzarone <azzaronea@gmail.com> dateWed 21 Sep 2016, 16:28 (10 years ago) parent23f4dbd
2 files changed+14
qml/Launcher/LauncherPanel.qml+1 tests/qmltests/Launcher/tst_Launcher.qml+13
qml/Launcher/LauncherPanel.qml+1
@@ -864,6 +864,7 @@ Rectangle {
864864
865865 UbuntuShape {
866866 id: tooltipShape
867+ objectName: "tooltipShape"
867868 anchors.fill: tooltip
868869 opacity: tooltip.state === "open" && quickList.state != "open" ? 0.95 : 0
869870 visible: opacity > 0
tests/qmltests/Launcher/tst_Launcher.qml+13
@@ -1353,5 +1353,18 @@ Rectangle {
13531353 mouseWheel(launcherPanel, launcherPanel.width/2, launcherPanel.height/2, Qt.RightButton);
13541354 tryCompare(clickThroughSpy, "count", 0);
13551355 }
1356+
1357+ function test_tooltip() {
1358+ dragLauncherIntoView()
1359+ var item = findChild(launcher, "launcherDelegate0")
1360+ var tooltipShape = findChild(launcher, "tooltipShape")
1361+
1362+ // Initial state
1363+ compare(tooltipShape.visible, false)
1364+
1365+ // Move the mouse on the launcher icon
1366+ mouseMove(item, item.width / 2, item.height / 2, 2)
1367+ tryCompare(tooltipShape, "visible", true)
1368+ }
13561369 }
13571370}