All Classes Functions Properties
unity8.shell.tests.test_lock_screen.TestLockscreen Class Reference
Inheritance diagram for unity8.shell.tests.test_lock_screen.TestLockscreen:
[legend]
Collaboration diagram for unity8.shell.tests.test_lock_screen.TestLockscreen:
[legend]

## 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 41 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 63 of file test_lock_screen.py.

def test_can_unlock_passphrase_screen(self):
"""Must be able to unlock the passphrase entry screen."""
unity_proxy = self.launch_unity()
greeter = self.main_window.get_greeter()
if greeter.narrowMode:
unlock_unity(unity_proxy)
lockscreen = self._wait_for_lockscreen()
self._enter_pin_passphrase("password")
self.assertThat(lockscreen.shown, Eventually(Equals(False)))
else:
self._enter_prompt_passphrase("password")
self.assertThat(greeter.shown, Eventually(Equals(False)))
unity8.shell.tests.test_lock_screen.TestLockscreen._wait_for_lockscreen
def _wait_for_lockscreen
Definition: test_lock_screen.py:115
unity8.shell.tests.test_lock_screen.TestLockscreen.test_can_unlock_passphrase_screen
def test_can_unlock_passphrase_screen
Definition: test_lock_screen.py:63
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_pin_passphrase
def _enter_pin_passphrase
Definition: test_lock_screen.py:145
unity8.shell.tests.UnityTestCase.launch_unity
def launch_unity
Definition: __init__.py:252
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_prompt_passphrase
def _enter_prompt_passphrase
Definition: test_lock_screen.py:167

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

def test_can_unlock_pin_screen(self):
"""Must be able to unlock the PIN entry lock screen."""
unity_proxy = self.launch_unity()
greeter = self.main_window.get_greeter()
if greeter.narrowMode:
unlock_unity(unity_proxy)
lockscreen = self._wait_for_lockscreen()
self._enter_pincode("1234")
self.assertThat(lockscreen.shown, Eventually(Equals(False)))
else:
self._enter_prompt_passphrase("1234")
self.assertThat(greeter.shown, Eventually(Equals(False)))
unity8.shell.tests.test_lock_screen.TestLockscreen.test_can_unlock_pin_screen
def test_can_unlock_pin_screen
Definition: test_lock_screen.py:48
unity8.shell.tests.test_lock_screen.TestLockscreen._wait_for_lockscreen
def _wait_for_lockscreen
Definition: test_lock_screen.py:115
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_pincode
def _enter_pincode
Definition: test_lock_screen.py:123
unity8.shell.tests.UnityTestCase.launch_unity
def launch_unity
Definition: __init__.py:252
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_prompt_passphrase
def _enter_prompt_passphrase
Definition: test_lock_screen.py:167

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

def test_passphrase_screen_wrong_password(self):
"""Entering the wrong password must not dismiss the lock screen."""
unity_proxy = self.launch_unity()
greeter = self.main_window.get_greeter()
if greeter.narrowMode:
unlock_unity(unity_proxy)
lockscreen = self._wait_for_lockscreen()
self._enter_pin_passphrase("foobar")
pinentryField = self.main_window.get_pinentryField()
self.assertThat(pinentryField.text, Eventually(Equals("")))
self.assertThat(lockscreen.shown, Eventually(Equals(True)))
else:
self._enter_prompt_passphrase("foobar")
prompt = self.main_window.get_greeter().get_prompt()
self.assertThat(prompt.text, Eventually(Equals("")))
self.assertThat(greeter.shown, Eventually(Equals(True)))
unity8.shell.tests.test_lock_screen.TestLockscreen._wait_for_lockscreen
def _wait_for_lockscreen
Definition: test_lock_screen.py:115
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_pin_passphrase
def _enter_pin_passphrase
Definition: test_lock_screen.py:145
unity8.shell.tests.test_lock_screen.TestLockscreen.test_passphrase_screen_wrong_password
def test_passphrase_screen_wrong_password
Definition: test_lock_screen.py:97
unity8.shell.tests.UnityTestCase.launch_unity
def launch_unity
Definition: __init__.py:252
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_prompt_passphrase
def _enter_prompt_passphrase
Definition: test_lock_screen.py:167

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

def test_pin_screen_wrong_code(self):
"""Entering the wrong pin code must not dismiss the lock screen."""
unity_proxy = self.launch_unity()
greeter = self.main_window.get_greeter()
if greeter.narrowMode:
unlock_unity(unity_proxy)
lockscreen = self._wait_for_lockscreen()
self._enter_pincode("4321")
pinentryField = self.main_window.get_pinentryField()
self.assertThat(pinentryField.text, Eventually(Equals("")))
self.assertThat(lockscreen.shown, Eventually(Equals(True)))
else:
self._enter_prompt_passphrase("4231")
prompt = self.main_window.get_greeter().get_prompt()
self.assertThat(prompt.text, Eventually(Equals("")))
self.assertThat(greeter.shown, Eventually(Equals(True)))
unity8.shell.tests.test_lock_screen.TestLockscreen._wait_for_lockscreen
def _wait_for_lockscreen
Definition: test_lock_screen.py:115
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_pincode
def _enter_pincode
Definition: test_lock_screen.py:123
unity8.shell.tests.UnityTestCase.launch_unity
def launch_unity
Definition: __init__.py:252
unity8.shell.tests.test_lock_screen.TestLockscreen.test_pin_screen_wrong_code
def test_pin_screen_wrong_code
Definition: test_lock_screen.py:78
unity8.shell.tests.test_lock_screen.TestLockscreen._enter_prompt_passphrase
def _enter_prompt_passphrase
Definition: test_lock_screen.py:167

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

- tests/autopilot/unity8/shell/tests/test_lock_screen.py