on xenial help sign in
fix tests (fake the MetaModifier as a proper broken keyboard would do)
bcd0928Michael Zanetti
tests/qmltests/tst_Shell.qml+8−6
@@ -1974,6 +1974,7 @@ Rectangle {
1974 function test_superTabToCycleLauncher() {
1974 function test_superTabToCycleLauncher() {
1975 loadShell("desktop");
1975 loadShell("desktop");
1976 shell.usageScenario = "desktop";
1976 shell.usageScenario = "desktop";
1977+ waitForRendering(shell);
1977
1978
1978 var launcher = findChild(shell, "launcher");
1979 var launcher = findChild(shell, "launcher");
1979 var launcherPanel = findChild(launcher, "launcherPanel");
1980 var launcherPanel = findChild(launcher, "launcherPanel");
@@ -1983,24 +1984,25 @@ Rectangle {
1983 compare(launcherPanel.highlightIndex, -2);
1984 compare(launcherPanel.highlightIndex, -2);
1984 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
1985 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
1985
1986
1987+ wait(2000)
1986 // Use Super + Tab Tab to cycle to the first entry in the launcher
1988 // 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);
1988 keyClick(Qt.Key_Tab);
1990 keyClick(Qt.Key_Tab);
1989 tryCompare(launcher, "state", "visible");
1991 tryCompare(launcher, "state", "visible");
1990 tryCompare(launcherPanel, "highlightIndex", -1);
1992 tryCompare(launcherPanel, "highlightIndex", -1);
1991 keyClick(Qt.Key_Tab);
1993 keyClick(Qt.Key_Tab);
1992 tryCompare(launcherPanel, "highlightIndex", 0);
1994 tryCompare(launcherPanel, "highlightIndex", 0);
1993− keyRelease(Qt.Key_Super_L);
1995+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
1994 tryCompare(launcher, "state", "");
1996 tryCompare(launcher, "state", "");
1995 tryCompare(launcherPanel, "highlightIndex", -2);
1997 tryCompare(launcherPanel, "highlightIndex", -2);
1996 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
1998 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
1997
1999
1998 // No go back to the dash
2000 // No go back to the dash
1999− keyPress(Qt.Key_Super_L);
2001+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2000 keyClick(Qt.Key_Tab);
2002 keyClick(Qt.Key_Tab);
2001 tryCompare(launcher, "state", "visible");
2003 tryCompare(launcher, "state", "visible");
2002 tryCompare(launcherPanel, "highlightIndex", -1);
2004 tryCompare(launcherPanel, "highlightIndex", -1);
2003− keyRelease(Qt.Key_Super_L);
2005+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2004 tryCompare(launcher, "state", "");
2006 tryCompare(launcher, "state", "");
2005 tryCompare(launcherPanel, "highlightIndex", -2);
2007 tryCompare(launcherPanel, "highlightIndex", -2);
2006 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
2008 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
@@ -2012,11 +2014,11 @@ Rectangle {
2012 var shortcutHint = findChild(findChild(launcher, "launcherDelegate0"), "shortcutHint")
2014 var shortcutHint = findChild(findChild(launcher, "launcherDelegate0"), "shortcutHint")
2013
2015
2014 compare(launcher.state, "");
2016 compare(launcher.state, "");
2015− keyPress(Qt.Key_Super_L);
2017+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2016 tryCompare(launcher, "state", "visible");
2018 tryCompare(launcher, "state", "visible");
2017 tryCompare(shortcutHint, "visible", true);
2019 tryCompare(shortcutHint, "visible", true);
2018
2020
2019− keyRelease(Qt.Key_Super_L);
2021+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2020 tryCompare(launcher, "state", "");
2022 tryCompare(launcher, "state", "");
2021 tryCompare(shortcutHint, "visible", false);
2023 tryCompare(shortcutHint, "visible", false);
2022 }
2024 }