on xenial help sign in
Test the focus fence in the shutdown dialog
commit8560ba40aa1bdd78bcb0437d95a57f564e3c1997 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 22 Dec 2016, 10:30 (10 years ago) parentad3474c
1 file changed+20
tests/qmltests/tst_OrientedShell.qml+20
tests/qmltests/tst_OrientedShell.qml+20
@@ -1553,5 +1553,25 @@ Rectangle {
15531553 verify(surface);
15541554 return surface.activeFocus;
15551555 }
1556+
1557+ function test_tabCyclyingInShutdownDialog() {
1558+ loadShell("mako");
1559+
1560+ testCase.showPowerDialog();
1561+
1562+ var dialogs = findChild(orientedShell, "dialogs");
1563+ var buttons = findChildsByType(dialogs, "Button");
1564+
1565+ tryCompare(buttons[0], "activeFocus", true);
1566+
1567+ keyClick(Qt.Key_Tab);
1568+ tryCompare(buttons[1], "activeFocus", true);
1569+
1570+ keyClick(Qt.Key_Tab);
1571+ tryCompare(buttons[2], "activeFocus", true);
1572+
1573+ keyClick(Qt.Key_Tab);
1574+ tryCompare(buttons[0], "activeFocus", true);
1575+ }
15561576 }
15571577}