@@ -320,14 +320,21 @@ Item {
320320 }
321321
322322 function assertFocusOnIndex(index) {
323+ var launcherPanel = findChild(launcher, "launcherPanel");
323324 var launcherListView = findChild(launcher, "launcherListView");
324325 var bfbFocusHighlight = findChild(launcher, "bfbFocusHighlight");
325326
326327 waitForRendering(launcher);
328+ tryCompare(launcherPanel, "highlightIndex", index);
327329 compare(bfbFocusHighlight.visible, index === -1);
328330 for (var i = 0; i < launcherListView.count; i++) {
329− var focusRing = findChild(findChild(launcher, "launcherDelegate" + i), "focusRing")
330− compare(focusRing.visible, index === i);
331+ var item = findChild(launcher, "launcherDelegate" + i);
332+ // Delegates might be destroyed when not visible. We can't check if they paint a focus highlight.
333+ // Make sure the requested index does have focus. for the others, try best effort to check if they don't
334+ if (index === i || item) {
335+ var focusRing = findChild(item, "focusRing")
336+ tryCompare(focusRing, "visible", index === i);
337+ }
331338 }
332339 }
333340
@@ -1129,7 +1136,6 @@ Item {
11291136 var last = launcherListView.count - 1;
11301137
11311138 compare(bfbFocusHighlight.visible, false);
1132−
11331139 launcher.openForKeyboardNavigation();
11341140 tryCompare(launcherPanel, "x", 0);
11351141 waitForRendering(launcher);
@@ -1154,6 +1160,7 @@ Item {
11541160
11551161 // The list should wrap around
11561162 keyClick(Qt.Key_Up);
1163+ waitForRendering(launcher);
11571164 assertFocusOnIndex(last);
11581165
11591166 keyClick(Qt.Key_Down);
@@ -1186,6 +1193,9 @@ Item {
11861193 // Go bar to top by wrapping around
11871194 keyClick(Qt.Key_Down);
11881195 assertFocusOnIndex(1);
1196+
1197+ keyClick(Qt.Key_Enter);
1198+ assertFocusOnIndex(-2);
11891199 }
11901200
11911201 function test_selectQuicklistItemByKeyboard() {