diff --git a/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_form.py b/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_form.py index 5e1226be883a..7085d12c26d7 100644 --- a/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_form.py +++ b/tests/python/gaia-ui-tests/gaiatest/apps/contacts/regions/contact_form.py @@ -2,6 +2,8 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +import time + from marionette.by import By from gaiatest.apps.base import Base @@ -167,8 +169,13 @@ def __init__(self, marionette): done = self.marionette.find_element(*self._done_button_locator) self.wait_for_condition(lambda m: done.location['y'] == 0) - def tap_done(self): + def tap_done(self, return_contacts=True): + # NewContact can be opened as an Activity from other apps. In this scenario we don't return Contacts self.marionette.find_element(*self._done_button_locator).tap() - self.wait_for_element_not_displayed(*self._done_button_locator) - from gaiatest.apps.contacts.app import Contacts - return Contacts(self.marionette) + if return_contacts: + self.wait_for_element_not_displayed(*self._done_button_locator) + from gaiatest.apps.contacts.app import Contacts + return Contacts(self.marionette) + else: + # Bug 947317 Marionette exception after tap closes a frame + time.sleep(2) diff --git a/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/manifest.ini b/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/manifest.ini index 4a84f4a8db05..91723536e925 100644 --- a/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/manifest.ini +++ b/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/manifest.ini @@ -12,9 +12,6 @@ skip-if = device == "desktop" skip-if = device == "desktop" [test_dialer_add_contact.py] -skip-if = device == "desktop" -expected = fail -disabled = Bug 947317 - MarionetteException after a tap() closes a frame [test_call_log_all_calls.py] skip-if = device == "desktop" diff --git a/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_add_contact.py b/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_add_contact.py index ae0f32c10659..543f7f9827aa 100644 --- a/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_add_contact.py +++ b/tests/python/gaia-ui-tests/gaiatest/tests/functional/dialer/test_dialer_add_contact.py @@ -37,11 +37,10 @@ def test_dialer_add_contact(self): new_contact.type_given_name(self.contact['givenName'][0]) new_contact.type_family_name(self.contact['familyName'][0]) - # Click Done button - new_contact.tap_done() + # Click Done button, don't return Contacts because we return to Dialer + new_contact.tap_done(return_contacts=False) # Switch back to keypad-view - self.wait_for_condition(lambda m: self.apps.displayed_app.name == self.phone.name) self.apps.switch_to_displayed_app() #Go to Contact list and Verify result diff --git a/tests/python/gaia-ui-tests/gaiatest/tests/tbpl-manifest.ini b/tests/python/gaia-ui-tests/gaiatest/tests/tbpl-manifest.ini index 83ca75d63bc7..a078a55cf8cb 100644 --- a/tests/python/gaia-ui-tests/gaiatest/tests/tbpl-manifest.ini +++ b/tests/python/gaia-ui-tests/gaiatest/tests/tbpl-manifest.ini @@ -30,6 +30,7 @@ disabled = Bug 946130 [functional/contacts/test_sort_contacts.py] [functional/contacts/test_delete_contact.py] [functional/contacts/test_add_contact_to_favorites.py] +[functional/dialer/test_dialer_add_contact.py] [functional/everythingme/test_everythingme_launch_packaged_app.py] [functional/homescreen/test_homescreen_edit_mode.py] [functional/homescreen/test_homescreen_move_app.py]