279
279
compare(dashContentList.currentIndex, 0);
282
function test_manage_dash_search_temp_scope() {
283
// TODO Search is disabled for now in manage dash
286
// Show the manage dash
287
touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
288
var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
289
tryCompare(bottomEdgeController, "progress", 1);
292
var scopesList = findChild(dash, "scopesList");
293
var scopesListPageHeader = findChild(scopesList, "pageHeader");
294
var searchButton = findChild(scopesListPageHeader, "search_header_button");
295
mouseClick(searchButton);
300
// Click on a temp scope in the search
301
tryCompareFunction( function() { return findChild(scopesList, "scopesListCategorysearchA") != null; }, true);
302
var dashCategorysearchA = findChild(scopesList, "scopesListCategorysearchA");
303
tryCompareFunction( function() { return findChild(dashCategorysearchA, "delegate2") != null; }, true);
304
var cardTempScope = findChild(dashCategorysearchA, "delegate2");
306
waitForRendering(cardTempScope);
307
mouseClick(cardTempScope);
309
// Check the bottom edge (overview) is disabled from temp scope
310
var overviewDragHandle = findChild(dash, "overviewDragHandle");
311
compare(overviewDragHandle.enabled, false);
313
// Check temp scope is there
314
var dashTempScopeItem = findChild(dash, "dashTempScopeItem");
315
tryCompare(dashTempScopeItem, "x", 0);
316
tryCompare(dashTempScopeItem, "visible", true);
318
// Check the manage dash is gone
319
tryCompare(bottomEdgeController, "progress", 0);
322
var dashTempScopeItemHeader = findChild(dashTempScopeItem, "scopePageHeader");
323
var backButton = findChild(findChild(dashTempScopeItemHeader, "innerPageHeader"), "customBackButton");
324
mouseClick(backButton);
326
// Check temp scope is gone
327
tryCompare(dashTempScopeItem, "x", dash.width);
328
tryCompare(dashTempScopeItem, "visible", false);
330
// Original list is still on 0
331
var dashContentList = findChild(dash, "dashContentList");
332
compare(dashContentList.currentIndex, 0);
335
282
function test_manage_dash_open_no_favorites() {
336
283
// Make it so there are no scopes