Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 1113662 - [v2.2] Investigate test_sms_with_attachments tap_captur…
Browse files Browse the repository at this point in the history
…e failure
  • Loading branch information
phoenix1moz committed Jan 23, 2015
1 parent fc43ecd commit 5082fb5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/python/gaia-ui-tests/gaiatest/apps/camera/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ def launch(self):
self.wait_for_capture_ready()
self.wait_for_element_not_displayed(*self._loading_screen_locator)

def wait_for_loading_spinner_hidden(self):
loading_spinner = self.marionette.find_element(*self._loading_screen_locator)
Wait(self.marionette).until(expected.element_not_displayed(loading_spinner))

def wait_for_loading_spinner_displayed(self):
loading_spinner = self.marionette.find_element(*self._loading_screen_locator)
Wait(self.marionette).until(expected.element_displayed(loading_spinner))

@property
def camera_mode(self):
return self.marionette.find_element(*self._controls_locator).get_attribute('data-mode')
Expand Down Expand Up @@ -85,7 +93,9 @@ def record_video(self, duration):
self.wait_for_thumbnail_visible()

def tap_capture(self):
self.marionette.find_element(*self._capture_button_locator).tap()
capture_button = self.marionette.find_element(*self._capture_button_locator)
Wait(self.marionette).until(expected.element_enabled(capture_button))
capture_button.tap()

def tap_select_button(self):
select = self.marionette.find_element(*self._select_button_locator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def tap_camera(self):
camera = Camera(self.marionette)
self.wait_for_condition(lambda m: self.apps.displayed_app.name == camera.name)
self.apps.switch_to_displayed_app()
camera.wait_for_loading_spinner_displayed()
camera.wait_for_loading_spinner_hidden()
camera.wait_for_capture_ready()
return camera

Expand Down

0 comments on commit 5082fb5

Please sign in to comment.