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 39 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 61 of file test_lock_screen.py.

61 
63  """Must be able to unlock the passphrase entry screen."""
64  unity_proxy = self.launch_unity()
65  greeter = self.main_window.get_greeter()
66 
67  if greeter.narrowMode:
68  unlock_unity(unity_proxy)
69  lockscreen = self._wait_for_lockscreen()
70  self._enter_pin_passphrase("password")
71  self.assertThat(lockscreen.shown, Eventually(Equals(False)))
72  else:
73  self._enter_prompt_passphrase("password")
74  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 46 of file test_lock_screen.py.

46 
48  """Must be able to unlock the PIN entry lock screen."""
49  unity_proxy = self.launch_unity()
50  greeter = self.main_window.get_greeter()
51 
52  if greeter.narrowMode:
53  unlock_unity(unity_proxy)
54  lockscreen = self._wait_for_lockscreen()
55  self._enter_pincode("1234")
56  self.assertThat(lockscreen.shown, Eventually(Equals(False)))
57  else:
58  self._enter_prompt_passphrase("1234")
59  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 95 of file test_lock_screen.py.

95 
97  """Entering the wrong password must not dismiss the lock screen."""
98  unity_proxy = self.launch_unity()
99  greeter = self.main_window.get_greeter()
100 
101  if greeter.narrowMode:
102  unlock_unity(unity_proxy)
103  lockscreen = self._wait_for_lockscreen()
104  self._enter_pin_passphrase("foobar")
105  pinentryField = self.main_window.get_pinentryField()
106  self.assertThat(pinentryField.text, Eventually(Equals("")))
107  self.assertThat(lockscreen.shown, Eventually(Equals(True)))
108  else:
109  self._enter_prompt_passphrase("foobar")
110  prompt = self.main_window.get_greeter().get_prompt()
111  self.assertThat(prompt.text, Eventually(Equals("")))
112  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 76 of file test_lock_screen.py.

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

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