on xenial help sign in
fix tests (fake the MetaModifier as a proper broken keyboard would do)
commitbcd0928f653c2548864d709cad7ebb6afe8db657 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 15 Dec 2015, 17:08 (11 years ago) parent45a0389
1 file changed+8−6
tests/qmltests/tst_Shell.qml+8−6
tests/qmltests/tst_Shell.qml+8−6
@@ -1974,6 +1974,7 @@ Rectangle {
19741974 function test_superTabToCycleLauncher() {
19751975 loadShell("desktop");
19761976 shell.usageScenario = "desktop";
1977+ waitForRendering(shell);
19771978
19781979 var launcher = findChild(shell, "launcher");
19791980 var launcherPanel = findChild(launcher, "launcherPanel");
@@ -1983,24 +1984,25 @@ Rectangle {
19831984 compare(launcherPanel.highlightIndex, -2);
19841985 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
19851986
1987+ wait(2000)
19861988 // Use Super + Tab Tab to cycle to the first entry in the launcher
1987− keyPress(Qt.Key_Super_L);
1989+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
19881990 keyClick(Qt.Key_Tab);
19891991 tryCompare(launcher, "state", "visible");
19901992 tryCompare(launcherPanel, "highlightIndex", -1);
19911993 keyClick(Qt.Key_Tab);
19921994 tryCompare(launcherPanel, "highlightIndex", 0);
1993− keyRelease(Qt.Key_Super_L);
1995+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
19941996 tryCompare(launcher, "state", "");
19951997 tryCompare(launcherPanel, "highlightIndex", -2);
19961998 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
19971999
19982000 // No go back to the dash
1999− keyPress(Qt.Key_Super_L);
2001+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
20002002 keyClick(Qt.Key_Tab);
20012003 tryCompare(launcher, "state", "visible");
20022004 tryCompare(launcherPanel, "highlightIndex", -1);
2003− keyRelease(Qt.Key_Super_L);
2005+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
20042006 tryCompare(launcher, "state", "");
20052007 tryCompare(launcherPanel, "highlightIndex", -2);
20062008 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
@@ -2012,11 +2014,11 @@ Rectangle {
20122014 var shortcutHint = findChild(findChild(launcher, "launcherDelegate0"), "shortcutHint")
20132015
20142016 compare(launcher.state, "");
2015− keyPress(Qt.Key_Super_L);
2017+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
20162018 tryCompare(launcher, "state", "visible");
20172019 tryCompare(shortcutHint, "visible", true);
20182020
2019− keyRelease(Qt.Key_Super_L);
2021+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
20202022 tryCompare(launcher, "state", "");
20212023 tryCompare(shortcutHint, "visible", false);
20222024 }