class TestCameraUnlockWithPasscode(GaiaTestCase): # Input data _input_passcode = '7931' def setUp(self): GaiaTestCase.setUp(self) # Turn off geolocation prompt self.apps.set_permission('System', 'geolocation', 'deny') self.data_layer.set_setting('lockscreen.passcode-lock.code', self._input_passcode) self.data_layer.set_setting('lockscreen.passcode-lock.enabled', True) # this time we need it locked! self.lockscreen.lock() self.lock_screen = LockScreen(self.marionette) def test_unlock_to_camera_with_passcode(self): # https://github.com/mozilla/gaia-ui-tests/issues/479 camera = self.lock_screen.unlock_to_camera() self.lock_screen.wait_for_lockscreen_not_visible() self.assertFalse(self.lockscreen.is_locked) camera.switch_to_camera_frame() self.assertFalse(camera.is_gallery_button_visible) camera.tap_switch_source() camera.wait_for_capture_ready() self.assertFalse(camera.is_gallery_button_visible)
class TestCameraUnlockWithPasscode(GaiaTestCase): # Input data _input_passcode = '7931' def setUp(self): GaiaTestCase.setUp(self) # Turn off geolocation prompt self.apps.set_permission('System', 'geolocation', 'deny') self.data_layer.set_setting('lockscreen.passcode-lock.code', self._input_passcode) self.data_layer.set_setting('lockscreen.passcode-lock.enabled', True) # this time we need it locked! self.lockscreen.lock() self.lock_screen = LockScreen(self.marionette) def test_unlock_to_camera_with_passcode(self): # https://github.com/mozilla/gaia-ui-tests/issues/479 camera = self.lock_screen.unlock_to_camera() self.lock_screen.wait_for_lockscreen_not_visible() self.assertTrue(self.lockscreen.is_locked) camera.switch_to_camera_frame() self.assertFalse(camera.is_gallery_button_visible) camera.tap_switch_source() self.assertFalse(camera.is_gallery_button_visible)
def test_unlock_to_camera(self): """https://moztrap.mozilla.org/manage/case/2460/""" lock_screen = LockScreen(self.marionette) camera = lock_screen.unlock_to_camera() self.wait_for_condition(lambda m: not self.device.is_locked) # Wait fot the capture button displayed. no need to take a photo. self.apps.switch_to_displayed_app() camera.wait_for_capture_ready()
def test_unlock_to_camera(self): # https://moztrap.mozilla.org/manage/case/1296/ lock_screen = LockScreen(self.marionette) camera = lock_screen.unlock_to_camera() lock_screen.wait_for_lockscreen_not_visible() self.assertFalse(self.device.is_locked) # Wait fot the capture button displayed. no need to take a photo. camera.switch_to_camera_frame() camera.wait_for_camera_ready()
def test_unlock_to_camera(self): # https://moztrap.mozilla.org/manage/case/1296/ lock_screen = LockScreen(self.marionette) camera = lock_screen.unlock_to_camera() lock_screen.wait_for_lockscreen_not_visible() self.assertFalse(self.device.is_locked) # Wait fot the capture button displayed. no need to take a photo. camera.switch_to_camera_frame() camera.wait_for_camera_ready()
def test_unlock_to_camera(self): """https://moztrap.mozilla.org/manage/case/2460/""" lock_screen = LockScreen(self.marionette) lock_screen.switch_to_frame() camera = lock_screen.unlock_to_camera() self.wait_for_condition( lambda m: self.apps.displayed_app.name == camera.name) self.assertFalse(self.device.is_locked) # Wait fot the capture button displayed. no need to take a photo. self.apps.switch_to_displayed_app() camera.wait_for_capture_ready()
def test_unlock_to_camera_with_passcode(self): # https://github.com/mozilla/gaia-ui-tests/issues/479 lock_screen = LockScreen(self.marionette) camera = lock_screen.unlock_to_camera() lock_screen.wait_for_lockscreen_not_visible() self.assertTrue(self.device.is_locked) camera.switch_to_camera_frame() self.assertFalse(camera.is_gallery_button_visible) camera.tap_switch_source() self.assertFalse(camera.is_gallery_button_visible)
def test_unlock_to_camera_with_passcode(self): # https://github.com/mozilla/gaia-ui-tests/issues/479 lock_screen = LockScreen(self.marionette) camera = lock_screen.unlock_to_camera() lock_screen.wait_for_lockscreen_not_visible() self.assertTrue(self.device.is_locked) camera.switch_to_camera_frame() self.assertFalse(camera.is_gallery_button_visible) camera.tap_switch_source() self.assertFalse(camera.is_gallery_button_visible)
class TestLockScreen(GaiaTestCase): def setUp(self): GaiaTestCase.setUp(self) # Turn off geolocation prompt self.apps.set_permission('Camera', 'geolocation', 'deny') # this time we need it locked! self.lockscreen.lock() self.lock_screen = LockScreen(self.marionette) def test_unlock_to_camera(self): # https://moztrap.mozilla.org/manage/case/1296/ camera = self.lock_screen.unlock_to_camera() self.lock_screen.wait_for_lockscreen_not_visible() # Wait fot the capture button displayed. no need to take a photo. camera.switch_to_camera_frame() camera.wait_for_camera_ready()
def test_unlock_to_camera_with_passcode(self): """https://moztrap.mozilla.org/manage/case/2460/""" lock_screen = LockScreen(self.marionette) camera = lock_screen.unlock_to_camera() self.wait_for_condition(lambda m: self.device.is_locked) camera.switch_to_secure_camera_frame() camera.take_photo() # Check that thumbnail is visible self.assertTrue(camera.is_thumbnail_visible) # Check that picture saved to SD cards self.wait_for_condition(lambda m: len(self.data_layer.picture_files) == 1) self.assertEqual(len(self.data_layer.picture_files), 1) self.assertFalse(camera.is_gallery_button_visible)
class TestLockScreen(GaiaTestCase): def setUp(self): GaiaTestCase.setUp(self) # Turn off geolocation prompt self.apps.set_permission('Camera', 'geolocation', 'deny') # this time we need it locked! self.lockscreen.lock() self.lock_screen = LockScreen(self.marionette) def test_unlock_to_camera(self): # https://moztrap.mozilla.org/manage/case/1296/ camera = self.lock_screen.unlock_to_camera() self.lock_screen.wait_for_lockscreen_not_visible() # Wait fot the capture button displayed. no need to take a photo. camera.switch_to_camera_frame() camera.wait_for_camera_ready()
def test_unlock_to_camera_with_passcode(self): """https://moztrap.mozilla.org/manage/case/2460/""" lock_screen = LockScreen(self.marionette) lock_screen.switch_to_frame() camera = lock_screen.unlock_to_camera() self.assertTrue(self.device.is_locked) camera.switch_to_secure_camera_frame() camera.take_photo() # Check that thumbnail is visible self.assertTrue(camera.is_thumbnail_visible) # Check that picture saved to SD cards self.wait_for_condition( lambda m: len(self.data_layer.picture_files) == 1) self.assertEqual(len(self.data_layer.picture_files), 1) self.assertFalse(camera.is_gallery_button_visible)
def test_unlock_to_camera_with_passcode(self): # https://github.com/mozilla/gaia-ui-tests/issues/479 lock_screen = LockScreen(self.marionette) camera = lock_screen.unlock_to_camera() # Bug 965806 - test_lockscreen_unlock_to_camera_with_passcode.TestCameraUnlockWithPasscode is failing after Bug 951978 # lock_screen.wait_for_lockscreen_not_visible() self.assertTrue(self.device.is_locked) camera.switch_to_camera_frame() camera.take_photo() # Check that Filmstrip is visible self.assertTrue(camera.is_filmstrip_visible) # Check that picture saved to SD cards self.wait_for_condition(lambda m: len(self.data_layer.picture_files) == 1) self.assertEqual(len(self.data_layer.picture_files), 1) self.assertFalse(camera.is_gallery_button_visible)