on xenial help sign in
fix tests
commit40b536870d428d1b81e23db9c4652a51259ab243 authorMichael Zanetti <michael.zanetti@canonical.com> dateMon 9 Jan 2017, 12:46 (10 years ago) parentd11044c
4 files changed+3−9
qml/Launcher/Drawer.qml−3 qml/Launcher/LauncherDelegate.qml−1 qml/Launcher/LauncherPanel.qml−1 tests/qmltests/Launcher/tst_Launcher.qml+3−4
qml/Launcher/Drawer.qml−3
@@ -315,9 +315,6 @@ FocusScope {
315315
316316 interactive: true
317317 focus: index == aToZListView.currentIndex
318− onFocusChanged: print("drawer grid", index, "has focus", focus)
319−
320− onCurrentIndexChanged: print("grid currentIndex changed", currentIndex)
321318
322319 model: AppDrawerProxyModel {
323320 id: categoryModel
qml/Launcher/LauncherDelegate.qml−1
@@ -129,7 +129,6 @@ Item {
129129 anchors.fill: iconShape
130130 activeFocusOnTab: true
131131 StyleHints {
132− objectName: "focusRing"
133132 visible: root.highlighted
134133 radius: units.gu(2.55)
135134 }
qml/Launcher/LauncherPanel.qml−1
@@ -107,7 +107,6 @@ Rectangle {
107107 anchors.fill: parent
108108 anchors.margins: units.gu(.5)
109109 StyleHints {
110− objectName: "bfbFocusHighlight"
111110 visible: bfb.highlighted
112111 radius: 0
113112 }
tests/qmltests/Launcher/tst_Launcher.qml+3−4
@@ -369,18 +369,17 @@ Rectangle {
369369 function assertFocusOnIndex(index) {
370370 var launcherPanel = findChild(launcher, "launcherPanel");
371371 var launcherListView = findChild(launcher, "launcherListView");
372− var bfbFocusHighlight = findChild(launcher, "bfbFocusHighlight");
372+ var bfb = findChild(launcher, "buttonShowDashHome");
373373
374374 waitForRendering(launcher);
375375 tryCompare(launcherPanel, "highlightIndex", index);
376− compare(bfbFocusHighlight.visible, index === -1);
376+ compare(bfb.highlighted, index === -1);
377377 for (var i = 0; i < launcherListView.count; i++) {
378378 var item = findChild(launcher, "launcherDelegate" + i);
379379 // Delegates might be destroyed when not visible. We can't check if they paint a focus highlight.
380380 // Make sure the requested index does have focus. for the others, try best effort to check if they don't
381381 if (index === i || item) {
382− var focusRing = findChild(item, "focusRing")
383− tryCompare(focusRing, "visible", index === i);
382+ tryCompare(item, "highlighted", index === i);
384383 }
385384 }
386385 }