@@ -146,6 +146,33 @@ Item {
146146 tryCompare(categoryListView, "atYBeginning", true)
147147 }
148148
149+ function test_navigationFilterPopupClosesWhenOptionSelected() {
150+ dash.setCurrentScope("LongPrimaryNavigation")
151+
152+ var dashContentList = findChild(dashContent, "dashContentList")
153+ var searchButton = findChild(dashContentList.currentItem, "search_button")
154+ verify(searchButton)
155+ var extraPanel = findChild(dashContentList.currentItem, "peExtraPanel")
156+ verify(extraPanel)
157+
158+ var primaryFilter = findChild(extraPanel, "primaryFilter")
159+ var expandingItem = findChild(primaryFilter, "expandingItem")
160+ verify(expandingItem)
161+ tryCompare(expandingItem, "expanded", false)
162+
163+ mouseClick(searchButton)
164+ expandingItem.expanded = true
165+ tryCompare(expandingItem, "expanded", true)
166+ tryCompareFunction(function() { return expandingItem.height == expandingItem.expandedHeight; }, true);
167+
168+ var optionsRepeater = findChild(expandingItem, "optionsRepeater")
169+ verify(optionsRepeater)
170+ verify(optionsRepeater.itemAt(0))
171+ tryCompare(optionsRepeater.itemAt(0), "visible", true)
172+ mouseClick(optionsRepeater.itemAt(0))
173+ tryCompare(expandingItem, "visible", false)
174+ }
175+
149176 function test_manage_dash_clickscope_unfavoritable() {
150177 // Show the manage dash
151178 touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));