on xenial help sign in
Dash manage hint should not be visible in previews+test
commit6bd9cff5784e69eb50c2ae28189dc03bea0f1411 authorAlbert Astals Cid <albert.astals@canonical.com> dateMon 16 Feb 2015, 10:14 (12 years ago) parent5291640
2 files changed+25−1
qml/Dash/Dash.qml+2−1 tests/qmltests/Dash/tst_Dash.qml+23
qml/Dash/Dash.qml+2−1
@@ -302,10 +302,11 @@ Showable {
302302 }
303303
304304 Image {
305+ objectName: "overviewHint"
305306 source: "graphics/overview_hint.png"
306307 anchors.horizontalCenter: parent.horizontalCenter
307308 opacity: !scopeItem.scope && (scopes.count == 0 || dashContent.pageHeaderTotallyVisible) &&
308− (overviewDragHandle.enabled || overviewDragHandle.status.progress != 0) ? 1 : 0
309+ (overviewDragHandle.enabled || bottomEdgeController.progress != 0) ? 1 : 0
309310 Behavior on opacity {
310311 enabled: bottomEdgeController.progress == 0
311312 UbuntuNumberAnimation {}
tests/qmltests/Dash/tst_Dash.qml+23
@@ -428,5 +428,28 @@ Item {
428428 tryCompare(bottomEdgeController, "progress", 0);
429429 tryCompare(dashContentList, "currentIndex", 1)
430430 }
431+
432+ function test_preview_no_show_manage_dash_hint() {
433+ var dashContentList = findChild(dash, "dashContentList");
434+ compare(dashContentList.currentIndex, 0);
435+ compare(dashContentList.currentItem.scopeId, "MockScope1");
436+
437+ tryCompareFunction(function() {
438+ var cardGrid = findChild(dashContentList, "dashCategory0");
439+ if (cardGrid != null) {
440+ var tile = findChild(cardGrid, "delegate0");
441+ return tile != null;
442+ }
443+ return false;
444+ },
445+ true);
446+ var tile = findChild(findChild(dashContentList, "dashCategory0"), "delegate0");
447+ waitForRendering(tile);
448+ mouseClick(tile);
449+
450+ var overviewHint = findChild(dash, "overviewHint");
451+ tryCompare(overviewHint, "opacity", 0);
452+ }
431453 }
454+
432455}