~feng-kylin/unity8/fix-lp1413791

« back to all changes in this revision

Viewing changes to tests/qmltests/Dash/tst_Dash.qml

Merged with unity-team's shellRotation branch and fixed conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
315
315
 
316
316
            var scopesList = findChild(dash, "scopesList");
317
317
            spy.target = scopesList.scope;
318
 
            spy.signalName = "performQuery";
 
318
            spy.signalName = "queryPerformed";
319
319
 
320
320
            // Click on the store
321
321
            var scopesListPageHeader = findChild(scopesList, "pageHeader");
517
517
            tryCompare(dashTempScopeItem, "x", dash.width);
518
518
            tryCompare(dashTempScopeItem, "visible", false);
519
519
        }
 
520
 
 
521
        function test_UriDispatcher()
 
522
        {
 
523
            var dashContentList = findChild(dash, "dashContentList");
 
524
 
 
525
            UriHandler.opened("scopes://clickscope");
 
526
            tryCompare(dashContentList, "currentIndex", 1);
 
527
 
 
528
            // Show the manage dash
 
529
            touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
 
530
            var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
 
531
            tryCompare(bottomEdgeController, "progress", 1);
 
532
 
 
533
            // UriHandler changes to a scope and closes the manage scopes
 
534
            UriHandler.opened("scopes://MockScope1");
 
535
            tryCompare(dashContentList, "currentIndex", 0);
 
536
            tryCompare(bottomEdgeController, "progress", 0);
 
537
 
 
538
            // Show a preview
 
539
            var scopeLoader0 = findChild(dashContent, "scopeLoader0");
 
540
            var dashCategory0 = findChild(scopeLoader0, "dashCategory0");
 
541
            var delegate0 = findChild(dashCategory0, "delegate0");
 
542
            mouseClick(delegate0);
 
543
            tryCompare(dashContent, "subPageShown", true)
 
544
 
 
545
            // UriHandler changes to a scope and closes the manage scopes
 
546
            UriHandler.opened("scopes://clickscope");
 
547
            tryCompare(dashContentList, "currentIndex", 1);
 
548
            tryCompare(dashContent, "subPageShown", false);
 
549
 
 
550
            // Go to a temp scope
 
551
            touchFlick(dash, dash.width / 2, dash.height - 1, dash.width / 2, units.gu(2));
 
552
            var bottomEdgeController = findInvisibleChild(dash, "bottomEdgeController");
 
553
            tryCompare(bottomEdgeController, "progress", 1);
 
554
            var nonfavScopesListCategory = findChild(dash, "scopesListCategoryother");
 
555
            var nonfavScopesListCategoryList = findChild(nonfavScopesListCategory, "scopesListCategoryInnerList");
 
556
            tryCompare(nonfavScopesListCategoryList, "currentIndex", 0);
 
557
            mouseClick(nonfavScopesListCategoryList.currentItem);
 
558
            var dashTempScopeItem = findChild(dash, "dashTempScopeItem");
 
559
            tryCompare(dashTempScopeItem, "x", 0);
 
560
            tryCompare(dashTempScopeItem, "visible", true);
 
561
 
 
562
            // UriHandler changes to a scope and closes the temp scope
 
563
            UriHandler.opened("scopes://MockScope1");
 
564
            tryCompare(dashContentList, "currentIndex", 0);
 
565
            tryCompare(dashTempScopeItem, "x", dashTempScopeItem.width);
 
566
            tryCompare(dashTempScopeItem, "visible", false);
 
567
        }
520
568
    }
521
569
}