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, mode="full-greeter", args)
 
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 29 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 50 of file test_lock_screen.py.

51  """Must be able to unlock the passphrase entry screen."""
52 
53  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-passphrase"
54  self.launch_unity()
55  greeter = self.main_window.get_greeter()
56 
57  if not greeter.tabletMode:
58  greeter.swipe()
59  lockscreen = self._wait_for_lockscreen()
60  self._enter_pin_passphrase("password")
61  else:
62  self._enter_prompt_passphrase("password")
63  self.assertThat(greeter.shown, Eventually(Equals(False)))
64 
def launch_unity(self, mode="full-greeter", args)
Definition: __init__.py:255
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 35 of file test_lock_screen.py.

36  """Must be able to unlock the PIN entry lock screen."""
37 
38  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-pin"
39  self.launch_unity()
40  greeter = self.main_window.get_greeter()
41 
42  if not greeter.tabletMode:
43  greeter.swipe()
44  lockscreen = self._wait_for_lockscreen()
45  self.main_window.enter_pin_code("1234")
46  else:
47  self._enter_prompt_passphrase("1234\n")
48  self.assertThat(greeter.shown, Eventually(Equals(False)))
49 
def launch_unity(self, mode="full-greeter", args)
Definition: __init__.py:255
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 83 of file test_lock_screen.py.

84  """Entering the wrong password must not dismiss the lock screen."""
85  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-passphrase"
86  self.launch_unity()
87  greeter = self.main_window.get_greeter()
88 
89  if not greeter.tabletMode:
90  greeter.swipe()
91  lockscreen = self._wait_for_lockscreen()
92  self._enter_pin_passphrase("foobar")
93  pinentryField = self.main_window.get_pinentryField()
94  self.assertThat(pinentryField.text, Eventually(Equals("")))
95  else:
96  self._enter_prompt_passphrase("foobar")
97  prompt = self.main_window.get_greeter().get_prompt()
98  self.assertThat(prompt.text, Eventually(Equals("")))
99  self.assertThat(greeter.shown, Eventually(Equals(True)))
100 
def launch_unity(self, mode="full-greeter", args)
Definition: __init__.py:255
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 65 of file test_lock_screen.py.

66  """Entering the wrong pin code must not dismiss the lock screen."""
67  self._environment['LIBLIGHTDM_MOCK_MODE'] = "single-pin"
68  self.launch_unity()
69  greeter = self.main_window.get_greeter()
70 
71  if not greeter.tabletMode:
72  greeter.swipe()
73  lockscreen = self._wait_for_lockscreen()
74  self.main_window.enter_pin_code("4321")
75  pinentryField = self.main_window.get_pinentryField()
76  self.assertThat(pinentryField.text, Eventually(Equals("")))
77  else:
78  self._enter_prompt_passphrase("4231\n")
79  prompt = self.main_window.get_greeter().get_prompt()
80  self.assertThat(prompt.text, Eventually(Equals("")))
81  self.assertThat(greeter.shown, Eventually(Equals(True)))
82 
def launch_unity(self, mode="full-greeter", args)
Definition: __init__.py:255

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