~ubuntu-branches/ubuntu/trusty/unity8/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/autopilot/unity8/shell/tests/test_lock_screen.py

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Michał Sawicz, Michael Hall, Christopher Lee, Nic, Nick Dedekind, Mirco Müller, Michael Zanetti, Daniel d'Andrada, Dimitri John Ledkov, Albert Astals, Ubuntu daily release
  • Date: 2013-12-20 03:23:08 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20131220032308-p3no0uoar5fzoead
Tags: 7.84+14.04.20131220-0ubuntu1
[ Michał Sawicz ]
* Clean up root project file. Introduce include/ and qml/ and move
  files around to be where they fit, also adapt everything else to
  match.

[ Michael Hall ]
* Update CODING to reflect the fact that only 14.04 is supported
  currently.

[ Christopher Lee ]
* Make use of helpers in all tests. (LP: #1260860). (LP: #1260860)

[ Nic ]
* Added kill time 30 to unity8 override. Added install path. (LP:
  #1260379)

[ Nick Dedekind ]
* Added parser for strftime in TimeFormatter. Moved TimeFormatter to
  Utils plugin.

[ Mirco Müller ]
* Support fullscreen for special-case extended snap-decision of the
  pin-unlock dialog.

[ Michael Zanetti ]
* Change the default behaviour of the Lockscreen to have a variable
  PIN length, requiring the user to confirm with OK.

[ Daniel d'Andrada ]
* Update CODING with instructions on how to run tests.

[ Dimitri John Ledkov ]
* Fix cross-compilation.

[ Albert Astals ]
* Vertical journal Comes from lp:~aacid/+junk/verticalJournal.
* Add code and tests for incremental inserting/removing from the end.

[ Ubuntu daily release ]
* Automatic snapshot from revision 603

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from __future__ import absolute_import
22
22
 
 
23
from unity8.process_helpers import unlock_unity
23
24
from unity8.shell import with_lightdm_mock
24
25
from unity8.shell.tests import UnityTestCase, _get_device_emulation_scenarios
25
26
 
40
41
    @with_lightdm_mock("single-pin")
41
42
    def test_can_unlock_pin_screen(self):
42
43
        """Must be able to unlock the PIN entry lock screen."""
43
 
        self.launch_unity()
 
44
        unity_proxy = self.launch_unity()
44
45
        greeter = self.main_window.get_greeter()
45
46
 
46
47
        if greeter.narrowMode:
47
 
            greeter.swipe()
 
48
            unlock_unity(unity_proxy)
48
49
            lockscreen = self._wait_for_lockscreen()
49
50
            self._enter_pincode("1234")
50
51
            self.assertThat(lockscreen.shown, Eventually(Equals(False)))
55
56
    @with_lightdm_mock("single-passphrase")
56
57
    def test_can_unlock_passphrase_screen(self):
57
58
        """Must be able to unlock the passphrase entry screen."""
58
 
        self.launch_unity()
 
59
        unity_proxy = self.launch_unity()
59
60
        greeter = self.main_window.get_greeter()
60
61
 
61
62
        if greeter.narrowMode:
62
 
            greeter.swipe()
 
63
            unlock_unity(unity_proxy)
63
64
            lockscreen = self._wait_for_lockscreen()
64
65
            self._enter_pin_passphrase("password")
65
66
            self.assertThat(lockscreen.shown, Eventually(Equals(False)))
70
71
    @with_lightdm_mock("single-pin")
71
72
    def test_pin_screen_wrong_code(self):
72
73
        """Entering the wrong pin code must not dismiss the lock screen."""
73
 
        self.launch_unity()
 
74
        unity_proxy = self.launch_unity()
74
75
        greeter = self.main_window.get_greeter()
75
76
 
76
77
        if greeter.narrowMode:
77
 
            greeter.swipe()
 
78
            unlock_unity(unity_proxy)
78
79
            lockscreen = self._wait_for_lockscreen()
79
80
            self._enter_pincode("4321")
80
81
            pinentryField = self.main_window.get_pinentryField()
89
90
    @with_lightdm_mock("single-passphrase")
90
91
    def test_passphrase_screen_wrong_password(self):
91
92
        """Entering the wrong password must not dismiss the lock screen."""
92
 
        self.launch_unity()
 
93
        unity_proxy = self.launch_unity()
93
94
        greeter = self.main_window.get_greeter()
94
95
 
95
96
        if greeter.narrowMode:
96
 
            greeter.swipe()
 
97
            unlock_unity(unity_proxy)
97
98
            lockscreen = self._wait_for_lockscreen()
98
99
            self._enter_pin_passphrase("foobar")
99
100
            pinentryField = self.main_window.get_pinentryField()