Closed Bug 1081473 Opened 10 years ago Closed 10 years ago

[Flame][v2.0][Camera] Need to modify function - "tap_capture()" after patch of Bug 1066885 lands on v2.0

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: whsu, Unassigned)

References

Details

* Description:
   After patch of Bug 1066885 lands on v2.0, camera app cannot pass test(GU) below.
   - camera/test_camera_capture_photo.py
   We need to wait capture button.

   --- -- - --- -- - --- -- - --- -- -  
   def tap_capture(self):
       +self.wait_for_element_displayed(*self._capture_button_locator)
        self.marionette.find_element(*self._capture_button_locator).tap()
   --- -- - --- -- - --- -- - --- -- -  
   
* Build information: (Can be reproduceed)
 - Gaia      6effca669c5baaf6cd7a63c91b71a02c6bd953b3
 - Gecko     https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/54ec9cb26b59
 - BuildID   20141010160207
 - Version   32.0

* ERROR MESSAGE:
Traceback (most recent call last):
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g32_v2_0-0.1-py2.7.egg/marionette/marionette_test.py", line 170, in run
    testMethod()
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/camera/test_camera_capture_photo.py", line 25, in test_capture_a_photo
    self.camera.take_photo()
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/gaiatest/apps/camera/app.py", line 57, in take_photo
    self.wait_for_thumbnail_visible()
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/gaiatest/apps/camera/app.py", line 141, in wait_for_thumbnail_visible
    self.wait_for_element_displayed(*self._thumbnail_button_locator)
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 42, in wait_for_element_displayed
    lambda m: m.find_element(by, locator).is_displayed())
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g32_v2_0-0.1-py2.7.egg/marionette/wait.py", line 143, in until
    cause=last_exc)
TimeoutException: Traceback (most recent call last):
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g32_v2_0-0.1-py2.7.egg/marionette/wait.py", line 122, in until
    rv = condition(self.marionette)
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 42, in <lambda>
    lambda m: m.find_element(by, locator).is_displayed())
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g32_v2_0-0.1-py2.7.egg/marionette/marionette.py", line 1213, in find_element
    response = self._send_message('findElement', 'value', **kwargs)
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g32_v2_0-0.1-py2.7.egg/marionette/decorators.py", line 35, in _
    return func(*args, **kwargs)
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g32_v2_0-0.1-py2.7.egg/marionette/marionette.py", line 633, in _send_message
    self._handle_error(response)
  File "/var/lib/jenkins/JenkinsCI/B2G_Flame_2dot0_Kitkat/gaia/tests/python/gaia-ui-tests/.env/local/lib/python2.7/site-packages/marionette_client_mozilla_b2g32_v2_0-0.1-py2.7.egg/marionette/marionette.py", line 664, in _handle_error
    raise NoSuchElementException(message=message, status=status, stacktrace=stacktrace)
TimeoutException: Timed out after 30.2 seconds, caused by <class 'marionette.errors.NoSuchElementException'>
QA Whiteboard: [fxosqa-auto-backlog-]
After adding some waiting time, it can resolve this bug.

Adding waiting time in tap_capture function since the capture button is froze when camera app is busy.
 77     def tap_capture(self):
 78         time.sleep(3)
 79         self.wait_for_element_displayed(*self._capture_button_locator)
 80         self.marionette.find_element(*self._capture_button_locator).tap()
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.