Exemple #1
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)

        # Import contact (adjust to the correct number).
        self.test_num = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.contact1 = MockContact(givenName="Name 1",
                                    familyName="Surname 1",
                                    name="Name 1 Surname 1",
                                    tel={
                                        "type": "Mobile",
                                        "value": self.test_num
                                    })
        self.UTILS.reporting.logComment("Using target telephone number " +
                                        self.contact1["tel"]["value"])
        self.UTILS.general.insertContact(self.contact1)

        self.call_number = self.UTILS.general.get_config_variable(
            "incoming_call_number", "common")
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()
        _ = setup_translations(self)
Exemple #2
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.loop = Loop(self)

        # Get details of our test contacts.
        self.contact = MockContact()
        self.UTILS.general.insertContact(self.contact)
        self.data_layer.connect_to_wifi()

        result = self.loop.initial_test_checks()

        if result:
            self.loop.phone_login()
            self.loop.allow_permission_phone_login()
            self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")

        self.apps.kill_all()
        time.sleep(2)

        _ = setup_translations(self)
        self.expected_message = _("No problem! Just share the following link and they can call you back from"\
                                  " any browser.")
Exemple #3
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.test_contact = MockContact()
        self.UTILS.general.insertContact(self.test_contact)

        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")
        _ = setup_translations(self)
        self.expected_message = _(
            "No problem! Just share the following link and they can call you back from"
            " any browser.")

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Exemple #4
0
    def setUpEmail(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.email = Email(self)
        self.settings = Settings(self)
        self.browser = Browser(self)

        _ = setup_translations(self)

        # Create (and record) a unique 'subject'.
        self.subject = "test " + str(time.time())
        self.body = "This is the test email body."

        # Set up specific folder names.
        if "gmail" in self.test_type:
            self.UTILS.reporting.logComment("Gmail account being used.")
            self.sent_folder_name = _("Sent Mail")
        elif "exchange" in self.test_type:
            self.UTILS.reporting.logComment("Exchange account being used.")
            self.sent_folder_name = _("Sent Items")
        else:
            self.UTILS.reporting.logComment("Non-gmail account being used.")
            self.sent_folder_name = _("Sent")

        self.marionette.set_search_timeout(50)
Exemple #5
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.loop = Loop(self)

        # Get details of our test contacts.
        self.contact = MockContact()
        self.UTILS.general.insertContact(self.contact)
        self.data_layer.connect_to_wifi()

        result = self.loop.initial_test_checks()

        if result:
            self.loop.phone_login()
            self.loop.allow_permission_phone_login()
            self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")

        self.apps.kill_all()
        time.sleep(2)

        _ = setup_translations(self)
        self.expected_message = _("No problem! Just share the following link and they can call you back from"\
                                  " any browser.")
Exemple #6
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.loop = Loop(self)

        # Get details of our test contacts.
        self.contact = MockContact()
        curr_time = repr(time.time()).replace('.', '')
        self.contact['email'] = [self.contact['email']]
        self.contact['tel'] = [self.contact['tel']]
        self.contact['email'].append({
            'type': 'Job',
            'value': '{}@testmail.net'.format(curr_time)})
        self.contact['tel'].append({
            'type': 'Landline',
            'value': '91{}'.format(curr_time)})
        self.UTILS.general.insertContact(self.contact)
        self.data_layer.connect_to_wifi()

        self.loop.initial_test_checks()

        result = self.loop.wizard_or_login()
        if result:
            self.loop.phone_login()
            self.loop.allow_permission_phone_login()
            self.UTILS.element.waitForElements(DOM.Loop.app_header, "Loop main view")
        self.apps.kill_all()
        time.sleep(2)
        _ = setup_translations(self)
Exemple #7
0
    def setUpEmail(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.email = Email(self)
        self.settings = Settings(self)
        self.browser = Browser(self)

        _ = setup_translations(self)

        # Create (and record) a unique 'subject'.
        self.subject = "test " + str(time.time())
        self.body = "This is the test email body."

        # Set up specific folder names.
        if "gmail" in self.test_type:
            self.UTILS.reporting.logComment("Gmail account being used.")
            self.sent_folder_name = _("Sent Mail")
        elif "exchange" in self.test_type:
            self.UTILS.reporting.logComment("Exchange account being used.")
            self.sent_folder_name = _("Sent Items")
        else:
            self.UTILS.reporting.logComment("Non-gmail account being used.")
            self.sent_folder_name = _("Sent")

        self.marionette.set_search_timeout(50)
Exemple #8
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)

        self.test_contact = MockContact(givenName="QA", familyName="Automation")
        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
        _ = setup_translations(self)
        self.expected_msg = _("This contact does not have either a phone number or an email address.")

        self.contacts.launch()
        self.contacts.start_create_new_contact()
        cont_fields = self.contacts.get_contact_fields()
        self.contacts.replace_str(cont_fields['givenName'], self.test_contact['givenName'])
        self.contacts.replace_str(cont_fields['familyName'], self.test_contact['familyName'])
        done_button = self.UTILS.element.getElement(DOM.Contacts.done_button, "'Done' button")
        done_button.tap()

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Exemple #9
0
 def setUp(self):
     # Set up child objects...
     GaiaTestCase.setUp(self)
     self.UTILS = UTILS(self)
     self.dialer = Dialer(self)
     _ = setup_translations(self)
     self.phone_number = self.UTILS.general.get_config_variable(
         "phone_number", "custom")
Exemple #10
0
    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        _ = setup_translations(self)
Exemple #11
0
    def setUp(self):

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)

        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        _ = setup_translations(self)
Exemple #12
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        _ = setup_translations(self)

        # Make sure bluetooth is not enabled before the tests starts
        self.data_layer.bluetooth_disable()
        self.wait_for_condition(lambda m: not self.data_layer.bluetooth_is_enabled,
                                timeout=20, message="Bluetooth disabled")
Exemple #13
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.loop = Loop(self)

        # Insert test contact
        self.contact = MockContact()
        self.UTILS.general.insertContact(self.contact)
        _ = setup_translations(self)
Exemple #14
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.loop = Loop(self)

        # Insert test contact
        self.contact = MockContact()
        self.UTILS.general.insertContact(self.contact)
        _ = setup_translations(self)
Exemple #15
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        _ = setup_translations(self)

        # Make sure bluetooth is not enabled before the tests starts
        self.data_layer.bluetooth_disable()
        self.wait_for_condition(
            lambda m: not self.data_layer.bluetooth_is_enabled,
            timeout=20,
            message="Bluetooth disabled")
Exemple #16
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.dialer = Dialer(self)

        # Get details of our test contacts.
        self.Contact_1 = MockContact()
        self.UTILS.general.insertContact(self.Contact_1)
        _ = setup_translations(self)
Exemple #17
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)

        self.connect_to_network()

        self.loop.initial_test_checks()

        self.apps.kill_all()
        time.sleep(2)
        _ = setup_translations(self)
Exemple #18
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)

        self.connect_to_network()

        self.loop.initial_test_checks()

        self.apps.kill_all()
        time.sleep(2)
        _ = setup_translations(self)
Exemple #19
0
    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.dialer = Dialer(self)
        self.contacts = Contacts(self)
        _ = setup_translations(self)

        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.test_contact = MockContact()

        self.dialer.launch()
        self.dialer.callLog_clearAll()
        self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
Exemple #20
0
    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.dialer = Dialer(self)
        self.contacts = Contacts(self)
        _ = setup_translations(self)

        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.test_contact = MockContact()

        self.dialer.launch()
        self.dialer.callLog_clearAll()
        self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
Exemple #21
0
    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.dialer = Dialer(self)
        _ = setup_translations(self)

        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")

        # Fill the call log with some entries
        self.dialer.launch()
        self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
        self.data_layer.set_setting("airplaneMode.enabled", True)
        self.wait_for_condition(lambda m: self.data_layer.get_setting("airplaneMode.enabled"),
                                timeout=30, message="No airplane mode enabled")
Exemple #22
0
    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.dialer = Dialer(self)
        self.contacts = Contacts(self)
        _ = setup_translations(self)

        self.test_contact = MockContact()

        self.dialer.launch()
        self.dialer.callLog_clearAll()

        # Create a call log entry
        self.dialer.createMultipleCallLogEntries(self.test_contact["tel"]["value"], 2)
Exemple #23
0
    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.dialer = Dialer(self)
        self.contacts = Contacts(self)
        _ = setup_translations(self)

        self.contact_1 = MockContact()
        self.phone_number = "0034" + self.UTILS.general.get_config_variable("target_call_number", "common")

        # Generate an entry in the call log
        self.dialer.launch()
        self.dialer.callLog_clearAll()
        self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
Exemple #24
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)

        self.connect_to_network()

        self.loop.initial_test_checks()

        self.contact = MockContact()
        self.UTILS.general.insertContact(self.contact)

        self.apps.kill_all()
        time.sleep(2)
        _ = setup_translations(self)
Exemple #25
0
    def setUp(self):
        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.dialer = Dialer(self)
        _ = setup_translations(self)

        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")

        # Fill the call log with some entries
        self.dialer.launch()
        self.dialer.createMultipleCallLogEntries(self.phone_number, 1)
        self.data_layer.set_setting("airplaneMode.enabled", True)
        self.wait_for_condition(
            lambda m: self.data_layer.get_setting("airplaneMode.enabled"),
            timeout=30,
            message="No airplane mode enabled")
Exemple #26
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)

        # Import contact (adjust to the correct number).
        self.test_num = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.contact1 = MockContact(givenName="Name 1", familyName="Surname 1",
                                    name="Name 1 Surname 1", tel={"type": "Mobile", "value": self.test_num})
        self.UTILS.reporting.logComment("Using target telephone number " + self.contact1["tel"]["value"])
        self.UTILS.general.insertContact(self.contact1)

        self.call_number = self.UTILS.general.get_config_variable("incoming_call_number", "common")
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()
        _ = setup_translations(self)
Exemple #27
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)
        _ = setup_translations(self)

        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_fake_pass = "******"
        self.expected_error_msg = _("Invalid Password")

        self.connect_to_network()

        self.loop.initial_test_checks()

        # Make sure we're not already logged in
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Exemple #28
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)
        _ = setup_translations(self)

        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_fake_pass = "******"
        self.expected_error_msg = _("Invalid Password")

        self.connect_to_network()

        self.loop.initial_test_checks()

        # Make sure we're not already logged in
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Exemple #29
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.test_contact = MockContact()
        self.UTILS.general.insertContact(self.test_contact)

        self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common")
        _ = setup_translations(self)
        self.expected_message = _("No problem! Just share the following link and they can call you back from"
                          " any browser.")


        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Exemple #30
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)

        self.test_contact = MockContact(givenName="QA",
                                        familyName="Automation")
        self.fxa_user = self.UTILS.general.get_config_variable(
            "fxa_user", "common")
        self.fxa_pass = self.UTILS.general.get_config_variable(
            "fxa_pass", "common")
        _ = setup_translations(self)
        self.expected_msg = _(
            "This contact does not have either a phone number or an email address."
        )

        self.contacts.launch()
        self.contacts.start_create_new_contact()
        cont_fields = self.contacts.get_contact_fields()
        self.contacts.replace_str(cont_fields['givenName'],
                                  self.test_contact['givenName'])
        self.contacts.replace_str(cont_fields['familyName'],
                                  self.test_contact['familyName'])
        done_button = self.UTILS.element.getElement(DOM.Contacts.done_button,
                                                    "'Done' button")
        done_button.tap()

        self.connect_to_network()
        self.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
Exemple #31
0
 def setUp(self):
     GaiaTestCase.setUp(self)
     self.UTILS = UTILS(self)
     self.dialer = Dialer(self)
     self.settings = Settings(self)
     _ = setup_translations(self)