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

59  """Must be able to unlock the passphrase entry screen."""
60 
61  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-passphrase"
62  self.launch_unity()
63  greeter = self.main_window.get_greeter()
64 
65  if not greeter.tabletMode:
66  greeter.swipe()
67  lockscreen = self._wait_for_lockscreen()
68  self._enter_pin_passphrase("password")
69  else:
70  self._enter_prompt_passphrase("password")
71  self.assertThat(greeter.shown, Eventually(Equals(False)))
72 
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 not greeter.tabletMode:
51  greeter.swipe()
52  lockscreen = self._wait_for_lockscreen()
53  self.main_window.enter_pin_code("1234")
54  else:
55  self._enter_prompt_passphrase("1234\n")
56  self.assertThat(greeter.shown, Eventually(Equals(False)))
57 
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 91 of file test_lock_screen.py.

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

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

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