on xenial help sign in
Re-enable swiping for tablets if the password isn't needed; fix some autopilot issues
f789695Michael Terry
Greeter/Greeter.qml+2−3
@@ -34,7 +34,7 @@ Showable {
34
34
35 property alias dragHandleWidth: dragHandle.width
35 property alias dragHandleWidth: dragHandle.width
36 property alias model: greeterContentLoader.model
36 property alias model: greeterContentLoader.model
37− property bool locked: shown && !greeterContentLoader.promptless
37+ property bool locked: shown && !LightDM.Greeter.promptless
38
38
39 readonly property bool narrowMode: !multiUser && width <= units.gu(60)
39 readonly property bool narrowMode: !multiUser && width <= units.gu(60)
40 readonly property bool multiUser: LightDM.Users.count > 1
40 readonly property bool multiUser: LightDM.Users.count > 1
@@ -59,7 +59,6 @@ Showable {
59 anchors.fill: parent
59 anchors.fill: parent
60 property var model: LightDM.Users
60 property var model: LightDM.Users
61 property int currentIndex: 0
61 property int currentIndex: 0
62− property bool promptless: item ? item.promptless : false
63 property var infographicModel: LightDM.Infographic
62 property var infographicModel: LightDM.Infographic
64
63
65 source: required ? "GreeterContent.qml" : ""
64 source: required ? "GreeterContent.qml" : ""
@@ -113,7 +112,7 @@ Showable {
113 // UI element)
112 // UI element)
114 distanceThreshold: 0
113 distanceThreshold: 0
115
114
116− enabled: greeter.narrowMode
115+ enabled: greeter.narrowMode || !greeter.locked
117
116
118 direction: Direction.Leftwards
117 direction: Direction.Leftwards
119 }
118 }
Greeter/GreeterContent.qml−1
@@ -23,7 +23,6 @@ MouseArea {
23 id: root
23 id: root
24 anchors.fill: parent
24 anchors.fill: parent
25
25
26− property bool promptless: loginLoader.status == Loader.Ready && LightDM.Greeter.promptless
27 property bool ready: wallpaper.status == Image.Ready
26 property bool ready: wallpaper.status == Image.Ready
28 property bool leftTeaserPressed: teasingMouseArea.pressed &&
27 property bool leftTeaserPressed: teasingMouseArea.pressed &&
29 teasingMouseArea.mouseX < teasingMouseArea.width / 2
28 teasingMouseArea.mouseX < teasingMouseArea.width / 2
tests/autopilot/unity8/shell/tests/test_hud.py+5−5
@@ -37,7 +37,7 @@ class TestHud(UnityTestCase):
37
37
38 """
38 """
39 self.launch_unity()
39 self.launch_unity()
40− self.main_window.get_greeter().unlock()
40+ self.main_window.get_greeter().swipe()
41 window = self.main_window.get_qml_view()
41 window = self.main_window.get_qml_view()
42 hud_show_button = self.main_window.get_hud_show_button()
42 hud_show_button = self.main_window.get_hud_show_button()
43 hud = self.main_window.get_hud()
43 hud = self.main_window.get_hud()
@@ -58,7 +58,7 @@ class TestHud(UnityTestCase):
58
58
59 """
59 """
60 self.launch_unity()
60 self.launch_unity()
61− self.main_window.get_greeter().unlock()
61+ self.main_window.get_greeter().swipe()
62 window = self.main_window.get_qml_view()
62 window = self.main_window.get_qml_view()
63 hud_show_button = self.main_window.get_hud_show_button()
63 hud_show_button = self.main_window.get_hud_show_button()
64 hud = self.main_window.get_hud()
64 hud = self.main_window.get_hud()
@@ -81,7 +81,7 @@ class TestHud(UnityTestCase):
81 def test_hide_hud_click(self):
81 def test_hide_hud_click(self):
82 """Tapping the close button of the Hud must dismiss it."""
82 """Tapping the close button of the Hud must dismiss it."""
83 self.launch_unity()
83 self.launch_unity()
84− self.main_window.get_greeter().unlock()
84+ self.main_window.get_greeter().swipe()
85 hud = self.main_window.get_hud()
85 hud = self.main_window.get_hud()
86
86
87 self._launch_test_app_from_app_screen()
87 self._launch_test_app_from_app_screen()
@@ -97,7 +97,7 @@ class TestHud(UnityTestCase):
97
97
98 """
98 """
99 self.launch_unity()
99 self.launch_unity()
100− self.main_window.get_greeter().unlock()
100+ self.main_window.get_greeter().swipe()
101 hud = self.main_window.get_hud()
101 hud = self.main_window.get_hud()
102 window = self.main_window.get_qml_view()
102 window = self.main_window.get_qml_view()
103
103
@@ -114,7 +114,7 @@ class TestHud(UnityTestCase):
114 def test_launcher_hides_hud(self):
114 def test_launcher_hides_hud(self):
115 """Opening the Launcher while the Hud is active must close the Hud."""
115 """Opening the Launcher while the Hud is active must close the Hud."""
116 self.launch_unity()
116 self.launch_unity()
117− self.main_window.get_greeter().unlock()
117+ self.main_window.get_greeter().swipe()
118 hud = self.main_window.get_hud()
118 hud = self.main_window.get_hud()
119 launcher = self.main_window.get_launcher()
119 launcher = self.main_window.get_launcher()
120
120
tests/mocks/LightDM/single/GreeterPrivate.cpp+2−4
@@ -34,10 +34,8 @@ void GreeterPrivate::handleAuthenticate()
34{
34{
35 Q_Q(Greeter);
35 Q_Q(Greeter);
36
36
37− if (authenticationUser == "one") {
38− authenticated = true;
37+ authenticated = true;
39− Q_EMIT q->authenticationComplete();
38+ Q_EMIT q->authenticationComplete();
40− }
41}
39}
42
40
43void GreeterPrivate::handleRespond(QString const &response)
41void GreeterPrivate::handleRespond(QString const &response)