示例#1
0
    def tap_create_new_contact(self):
        self.marionette.find_element(*self._create_new_contact_button_locator).tap()

        from gaiatest.apps.contacts.regions.contact_form import NewContact
        new_contact = NewContact(self.marionette)
        new_contact.switch_to_new_contact_form()
        return new_contact
示例#2
0
 def a11y_click_new_contact(self):
     self.accessibility.click(
         self.marionette.find_element(*self._new_contact_button_locator))
     from gaiatest.apps.contacts.regions.contact_form import NewContact
     new_contact = NewContact(self.marionette)
     new_contact.wait_for_new_contact_form_to_load()
     return new_contact
示例#3
0
    def tap_create_new_contact(self):
        self.marionette.find_element(*self._create_new_contact_locator).tap()

        from gaiatest.apps.contacts.regions.contact_form import NewContact
        new_contact = NewContact(self.marionette)
        new_contact.switch_to_new_contact_form()
        return new_contact
示例#4
0
    def a11y_click_new_contact(self):
        self.accessibility.click(self.marionette.find_element(*self._new_contact_button_locator))
        from gaiatest.apps.contacts.regions.contact_form import NewContact

        new_contact = NewContact(self.marionette)
        new_contact.wait_for_new_contact_form_to_load()
        return new_contact
示例#5
0
    def tap_new_contact(self):
        self.marionette.find_element(*self._new_contact_button_locator).tap()
        from gaiatest.apps.contacts.regions.contact_form import NewContact

        new_contact = NewContact(self.marionette)
        new_contact.wait_for_new_contact_form_to_load()
        return new_contact
示例#6
0
文件: keypad.py 项目: AaskaShah/gaia
    def tap_create_new_contact(self):

        create_new_contact = self.marionette.find_element(*self._create_new_contact_locator)
        Wait(self.marionette).until(expected.element_displayed(create_new_contact))
        create_new_contact.tap()

        from gaiatest.apps.contacts.regions.contact_form import NewContact
        new_contact = NewContact(self.marionette)
        new_contact.switch_to_new_contact_form()
        return new_contact
示例#7
0
文件: keypad.py 项目: kuoe0/gaia-dev
    def tap_create_new_contact(self):

        create_new_contact = self.marionette.find_element(
            *self._create_new_contact_locator)
        Wait(self.marionette).until(
            expected.element_displayed(create_new_contact))
        create_new_contact.tap()

        from gaiatest.apps.contacts.regions.contact_form import NewContact
        new_contact = NewContact(self.marionette)
        new_contact.switch_to_new_contact_form()
        return new_contact
示例#8
0
文件: keypad.py 项目: sandra-sie/gaia
    def tap_create_new_contact(self):
        self.marionette.find_element(*self._create_new_contact_locator).tap()

        self.marionette.switch_to_frame()
        self.wait_for_element_present(*self._new_contact_frame_locator)
        frame = self.marionette.find_element(*self._new_contact_frame_locator)
        self.marionette.switch_to_frame(frame)

        from gaiatest.apps.contacts.regions.contact_form import NewContact
        return NewContact(self.marionette)
示例#9
0
文件: app.py 项目: bjacob/gaia
 def tap_new_contact(self):
     self.marionette.find_element(*self._new_contact_button_locator).tap()
     from gaiatest.apps.contacts.regions.contact_form import NewContact
     return NewContact(self.marionette)
示例#10
0
 def tap_new_contact(self):
     self.marionette.find_element(*self._new_contact_button_locator).tap()
     from gaiatest.apps.contacts.regions.contact_form import NewContact
     new_contact = NewContact(self.marionette)
     new_contact.wait_for_new_contact_form_to_load()
     return new_contact
示例#11
0
    def test_sms_create_new_contact(self):
        self.contact = MockContact()
        self.message_thread = self.messages.tap_first_received_message()
        self.message_thread.wait_for_received_messages()

        # Check that we received the correct message
        self.assertEqual(self.message_thread.header_text,
                         self.testvars['carrier']['phone_number'])

        activities = self.message_thread.tap_header()

        # Create a new contact
        activities.tap_create_new_contact()

        # Populate new contact fields
        new_contact = NewContact(self.marionette)
        new_contact.type_given_name(self.contact['givenName'])
        new_contact.type_family_name(self.contact['familyName'])
        new_contact.type_email(self.contact['email']['value'])
        new_contact.type_street(self.contact['adr']['streetAddress'])
        new_contact.type_zip_code(self.contact['adr']['postalCode'])
        new_contact.type_city(self.contact['adr']['locality'])
        new_contact.type_country(self.contact['adr']['countryName'])
        new_contact.type_comment(self.contact['note'])
        new_contact.tap_done(return_contacts=False)

        self.messages.switch_to_messages_frame()
        self.wait_for_condition(
            lambda m: self.message_thread.header_text == self.contact['name'])

        contacts = Contacts(self.marionette)
        contacts.launch()
        contact_details = contacts.contacts[0].tap()
        self.assertEqual(contact_details.phone_numbers[0],
                         self.testvars['carrier']['phone_number'])
    def test_sms_create_new_contact(self):
        self.contact = MockContact()
        self.message_thread = self.messages.tap_first_received_message()
        self.message_thread.wait_for_received_messages()

        # Check that we received the correct message
        self.assertEqual(self.message_thread.header_text, self.testvars['carrier']['phone_number'])

        activities = self.message_thread.tap_header()

        # Create a new contact
        activities.tap_create_new_contact()

        # Populate new contact fields
        new_contact = NewContact(self.marionette)
        new_contact.type_given_name(self.contact['givenName'])
        new_contact.type_family_name(self.contact['familyName'])
        new_contact.type_email(self.contact['email']['value'])
        new_contact.type_street(self.contact['adr']['streetAddress'])
        new_contact.type_zip_code(self.contact['adr']['postalCode'])
        new_contact.type_city(self.contact['adr']['locality'])
        new_contact.type_country(self.contact['adr']['countryName'])
        new_contact.type_comment(self.contact['note'])
        new_contact.tap_done(return_contacts=False)

        self.messages.switch_to_messages_frame()
        self.wait_for_condition(lambda m: self.message_thread.header_text == self.contact['name'])

        contacts = Contacts(self.marionette)
        contacts.launch()
        contact_details = contacts.contacts[0].tap()
        self.assertEqual(contact_details.phone_numbers[0], self.testvars['carrier']['phone_number'])