Unity 8
 All Classes Functions Properties
unity8.shell.tests.test_lock_screen.TestLockscreen Class Reference
Inheritance diagram for unity8.shell.tests.test_lock_screen.TestLockscreen:
Collaboration diagram for unity8.shell.tests.test_lock_screen.TestLockscreen:

Public Member Functions

def test_can_unlock_pin_screen
 
def test_can_unlock_passphrase_screen
 
def test_pin_screen_wrong_code
 
def test_passphrase_screen_wrong_password
 
- Public Member Functions inherited from unity8.shell.tests.UnityTestCase
def setUpClass
 
def setUp
 
def launch_unity
 
def patch_lightdm_mock
 
def assertUnityReady
 
def get_dash
 
def main_window
 

Static Public Attributes

tuple scenarios = _get_device_emulation_scenarios()
 

Additional Inherited Members

- Public Attributes inherited from unity8.shell.tests.UnityTestCase
 touch
 
 unity_geometry_args
 
 grid_size
 

Detailed Description

Tests for the lock screen.

Definition at line 41 of file test_lock_screen.py.

Member Function Documentation

def unity8.shell.tests.test_lock_screen.TestLockscreen.test_can_unlock_passphrase_screen (   self)
Must be able to unlock the passphrase entry screen.

Definition at line 63 of file test_lock_screen.py.

63 
65  """Must be able to unlock the passphrase entry screen."""
66  unity_proxy = self.launch_unity()
67  greeter = self.main_window.get_greeter()
68 
69  if greeter.narrowMode:
70  unlock_unity(unity_proxy)
71  lockscreen = self._wait_for_lockscreen()
72  self._enter_pin_passphrase("password")
73  self.assertThat(lockscreen.shown, Eventually(Equals(False)))
74  else:
75  self._enter_prompt_passphrase("password")
76  self.assertThat(greeter.shown, Eventually(Equals(False)))
def unity8.shell.tests.test_lock_screen.TestLockscreen.test_can_unlock_pin_screen (   self)
Must be able to unlock the PIN entry lock screen.

Definition at line 48 of file test_lock_screen.py.

48 
50  """Must be able to unlock the PIN entry lock screen."""
51  unity_proxy = self.launch_unity()
52  greeter = self.main_window.get_greeter()
53 
54  if greeter.narrowMode:
55  unlock_unity(unity_proxy)
56  lockscreen = self._wait_for_lockscreen()
57  self._enter_pincode("1234")
58  self.assertThat(lockscreen.shown, Eventually(Equals(False)))
59  else:
60  self._enter_prompt_passphrase("1234")
61  self.assertThat(greeter.shown, Eventually(Equals(False)))
def unity8.shell.tests.test_lock_screen.TestLockscreen.test_passphrase_screen_wrong_password (   self)
Entering the wrong password must not dismiss the lock screen.

Definition at line 97 of file test_lock_screen.py.

97 
99  """Entering the wrong password must not dismiss the lock screen."""
100  unity_proxy = self.launch_unity()
101  greeter = self.main_window.get_greeter()
102 
103  if greeter.narrowMode:
104  unlock_unity(unity_proxy)
105  lockscreen = self._wait_for_lockscreen()
106  self._enter_pin_passphrase("foobar")
107  pinentryField = self.main_window.get_pinentryField()
108  self.assertThat(pinentryField.text, Eventually(Equals("")))
109  self.assertThat(lockscreen.shown, Eventually(Equals(True)))
110  else:
111  self._enter_prompt_passphrase("foobar")
112  prompt = self.main_window.get_greeter().get_prompt()
113  self.assertThat(prompt.text, Eventually(Equals("")))
114  self.assertThat(greeter.shown, Eventually(Equals(True)))
def unity8.shell.tests.test_lock_screen.TestLockscreen.test_pin_screen_wrong_code (   self)
Entering the wrong pin code must not dismiss the lock screen.

Definition at line 78 of file test_lock_screen.py.

78 
80  """Entering the wrong pin code must not dismiss the lock screen."""
81  unity_proxy = self.launch_unity()
82  greeter = self.main_window.get_greeter()
83 
84  if greeter.narrowMode:
85  unlock_unity(unity_proxy)
86  lockscreen = self._wait_for_lockscreen()
87  self._enter_pincode("4321")
88  pinentryField = self.main_window.get_pinentryField()
89  self.assertThat(pinentryField.text, Eventually(Equals("")))
90  self.assertThat(lockscreen.shown, Eventually(Equals(True)))
91  else:
92  self._enter_prompt_passphrase("4231")
93  prompt = self.main_window.get_greeter().get_prompt()
94  self.assertThat(prompt.text, Eventually(Equals("")))
95  self.assertThat(greeter.shown, Eventually(Equals(True)))

The documentation for this class was generated from the following file: