Unity 8
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 (self)
 
def test_can_unlock_passphrase_screen (self)
 
def test_pin_screen_wrong_code (self)
 
def test_passphrase_screen_wrong_password (self)
 
- Public Member Functions inherited from unity8.shell.tests.UnityTestCase
def setUpClass (cls)
 
def setUp (self)
 
def launch_unity (self, kwargs)
 
def patch_lightdm_mock (self)
 
def wait_for_unity (self)
 
def get_dash (self)
 
def main_window (self)
 

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 37 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 59 of file test_lock_screen.py.

60  """Must be able to unlock the passphrase entry screen."""
61 
62  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-passphrase"
63  self.launch_unity()
64  greeter = self.main_window.get_greeter()
65 
66  if greeter.narrowMode:
67  greeter.swipe()
68  lockscreen = self._wait_for_lockscreen()
69  self._enter_pin_passphrase("password")
70  self.assertThat(lockscreen.shown, Eventually(Equals(False)))
71  else:
72  self._enter_prompt_passphrase("password")
73  self.assertThat(greeter.shown, Eventually(Equals(False)))
74 
def launch_unity(self, kwargs)
Definition: __init__.py:256
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 43 of file test_lock_screen.py.

44  """Must be able to unlock the PIN entry lock screen."""
45 
46  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-pin"
47  self.launch_unity()
48  greeter = self.main_window.get_greeter()
49 
50  if greeter.narrowMode:
51  greeter.swipe()
52  lockscreen = self._wait_for_lockscreen()
53  self.main_window.enter_pin_code("1234")
54  self.assertThat(lockscreen.shown, Eventually(Equals(False)))
55  else:
56  self._enter_prompt_passphrase("1234\n")
57  self.assertThat(greeter.shown, Eventually(Equals(False)))
58 
def launch_unity(self, kwargs)
Definition: __init__.py:256
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 94 of file test_lock_screen.py.

95  """Entering the wrong password must not dismiss the lock screen."""
96  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-passphrase"
97  self.launch_unity()
98  greeter = self.main_window.get_greeter()
99 
100  if greeter.narrowMode:
101  greeter.swipe()
102  lockscreen = self._wait_for_lockscreen()
103  self._enter_pin_passphrase("foobar")
104  pinentryField = self.main_window.get_pinentryField()
105  self.assertThat(pinentryField.text, Eventually(Equals("")))
106  self.assertThat(lockscreen.shown, Eventually(Equals(True)))
107  else:
108  self._enter_prompt_passphrase("foobar")
109  prompt = self.main_window.get_greeter().get_prompt()
110  self.assertThat(prompt.text, Eventually(Equals("")))
111  self.assertThat(greeter.shown, Eventually(Equals(True)))
112 
def launch_unity(self, kwargs)
Definition: __init__.py:256
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 75 of file test_lock_screen.py.

76  """Entering the wrong pin code must not dismiss the lock screen."""
77  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-pin"
78  self.launch_unity()
79  greeter = self.main_window.get_greeter()
80 
81  if greeter.narrowMode:
82  greeter.swipe()
83  lockscreen = self._wait_for_lockscreen()
84  self.main_window.enter_pin_code("4321")
85  pinentryField = self.main_window.get_pinentryField()
86  self.assertThat(pinentryField.text, Eventually(Equals("")))
87  self.assertThat(lockscreen.shown, Eventually(Equals(True)))
88  else:
89  self._enter_prompt_passphrase("4231\n")
90  prompt = self.main_window.get_greeter().get_prompt()
91  self.assertThat(prompt.text, Eventually(Equals("")))
92  self.assertThat(greeter.shown, Eventually(Equals(True)))
93 
def launch_unity(self, kwargs)
Definition: __init__.py:256

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