class TestCamera(GaiaTestCase):
    def setUp(self):
        GaiaTestCase.setUp(self)

        # Turn off geolocation prompt
        self.apps.set_permission('Camera', 'geolocation', 'deny')

    def test_capture_a_photo(self):
        # https://moztrap.mozilla.org/manage/case/1325/

        self.camera = Camera(self.marionette)
        self.camera.launch()

        self.camera.take_photo()

        if not self.camera.is_filmstrip_visible:
            self.camera.tap_to_display_filmstrip()

        image_preview = self.camera.filmstrip_images[0].tap()
        self.assertTrue(image_preview.is_image_preview_visible)
class TestCamera(GaiaTestCase):

    def setUp(self):
        GaiaTestCase.setUp(self)

        # Turn off geolocation prompt
        self.apps.set_permission('Camera', 'geolocation', 'deny')

    def test_capture_a_photo(self):
        # https://moztrap.mozilla.org/manage/case/1325/

        self.camera = Camera(self.marionette)
        self.camera.launch()

        self.camera.take_photo()

        if not self.camera.is_filmstrip_visible:
            self.camera.tap_to_display_filmstrip()

        image_preview = self.camera.filmstrip_images[0].tap()
        self.assertTrue(image_preview.is_image_preview_visible)
Beispiel #3
0
class TestCameraMultipleShots(GaiaTestCase):
    def setUp(self):
        GaiaTestCase.setUp(self)

        # Turn off Geolocation prompt
        self.apps.set_permission('Camera', 'geolocation', 'deny')

    def test_capture_multiple_shots(self):
        # https://moztrap.mozilla.org/manage/case/1325/
        self.camera = Camera(self.marionette)
        self.camera.launch()

        self.camera.take_photo()

        self.camera.tap_to_display_filmstrip()

        image_preview = self.camera.filmstrip_images[0].tap()
        image_preview.wait_for_media_frame()
        self.assertTrue(image_preview.is_image_preview_visible)

        self.camera = image_preview.tap_camera()

        self.camera.take_photo()

        self.camera.tap_to_display_filmstrip()

        image_preview = self.camera.filmstrip_images[1].tap()
        image_preview.wait_for_media_frame()
        self.assertTrue(image_preview.is_image_preview_visible)

        self.camera = image_preview.tap_camera()

        self.camera.take_photo()

        self.camera.tap_to_display_filmstrip()

        image_preview = self.camera.filmstrip_images[2].tap()
        image_preview.wait_for_media_frame()
        self.assertTrue(image_preview.is_image_preview_visible)

        self.camera = image_preview.tap_camera()