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 = ubuntu_scenarios.get_device_simulation_scenarios()
 

Additional Inherited Members

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

Detailed Description

Tests for the lock screen.

Definition at line 32 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 53 of file test_lock_screen.py.

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

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

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

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

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