~aacid/unity8/fixLauncherUpDownKeys

« back to all changes in this revision

Viewing changes to tests/qmltests/Launcher/tst_Launcher.qml

  • Committer: Albert Astals Cid
  • Date: 2017-04-04 14:17:29 UTC
  • Revision ID: albert.astals@canonical.com-20170404141729-ehvmf8mtty5xg4ib
Hide quicklist when launcher index changes

While at it fix a few verify calls that wanted to be compare

Show diffs side-by-side

added added

removed removed

Lines of Context:
1018
1018
            // Doing longpress
1019
1019
            mousePress(clickedItem)
1020
1020
            tryCompare(clickedItem, "itemOpacity", 0) // Wait for longpress to happen
1021
 
            verify(quickList, "state", "open")
 
1021
            compare(quickList.state, "open")
1022
1022
 
1023
1023
            launcher.hide();
1024
1024
 
1038
1038
            // Doing RMB click
1039
1039
            mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
1040
1040
            tryCompare(quickListShape, "visible", true)
1041
 
            verify(quickList, "state", "open")
1042
 
            verify(dndArea, "dragging", false)
 
1041
            compare(quickList.state, "open")
 
1042
            compare(dndArea.dragging, false)
1043
1043
 
1044
1044
            // Click somewhere in the empty space to dismiss the quicklist
1045
1045
            mouseClick(launcher, launcher.width - units.gu(1), units.gu(1));
1046
1046
            tryCompare(quickListShape, "visible", false);
1047
 
            verify(quickList, "state", "")
 
1047
            compare(quickList.state, "")
1048
1048
        }
1049
1049
 
1050
1050
        function test_revealByEdgePush() {
1553
1553
 
1554
1554
            // Open quickList
1555
1555
            mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
1556
 
            verify(quickList, "state", "open")
 
1556
            compare(quickList.state, "open")
1557
1557
            compare(quickList.selectedIndex, -1)
1558
1558
 
1559
1559
            var qEntry = findChild(launcher, "quickListEntry0");
1568
1568
 
1569
1569
            tryCompare(quickList, "selectedIndex", -1)
1570
1570
        }
 
1571
 
 
1572
        function test_tabClosesQuickList() {
 
1573
            dragLauncherIntoView();
 
1574
            var clickedItem = findChild(launcher, "launcherDelegate2")
 
1575
            var quickList = findChild(launcher, "quickList")
 
1576
            var launcherPanel = findChild(launcher, "launcherPanel");
 
1577
 
 
1578
            // Initial state
 
1579
            tryCompare(quickList, "state", "")
 
1580
 
 
1581
            // Open quickList
 
1582
            mouseClick(clickedItem, clickedItem.width / 2, clickedItem.height / 2, Qt.RightButton)
 
1583
            compare(quickList.state, "open")
 
1584
            tryCompare(launcherPanel, "highlightIndex", 2);
 
1585
            keyClick(Qt.Key_Tab);
 
1586
            compare(quickList.state, "")
 
1587
            tryCompare(launcherPanel, "highlightIndex", 3);
 
1588
        }
1571
1589
    }
1572
1590
}