on xenial help sign in
Add the first qml test.
b568bb3Andrea Azzarone
qml/Launcher/LauncherPanel.qml+1
@@ -864,6 +864,7 @@ Rectangle {
864
864
865 UbuntuShape {
865 UbuntuShape {
866 id: tooltipShape
866 id: tooltipShape
867+ objectName: "tooltipShape"
867 anchors.fill: tooltip
868 anchors.fill: tooltip
868 opacity: tooltip.state === "open" && quickList.state != "open" ? 0.95 : 0
869 opacity: tooltip.state === "open" && quickList.state != "open" ? 0.95 : 0
869 visible: opacity > 0
870 visible: opacity > 0
tests/qmltests/Launcher/tst_Launcher.qml+13
@@ -1353,5 +1353,18 @@ Rectangle {
1353 mouseWheel(launcherPanel, launcherPanel.width/2, launcherPanel.height/2, Qt.RightButton);
1353 mouseWheel(launcherPanel, launcherPanel.width/2, launcherPanel.height/2, Qt.RightButton);
1354 tryCompare(clickThroughSpy, "count", 0);
1354 tryCompare(clickThroughSpy, "count", 0);
1355 }
1355 }
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+ }
1356 }
1369 }
1357}
1370}