def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) self.contacts = Contacts(self) # Import some contacts. # Set the one we'll match to have a valid phone number. self.contact_1 = MockContact( tel={ "type": "Mobile", "value": self.UTILS.general.get_config_variable("phone_number", "custom") }) self.contact_2 = MockContact() self.contact_3 = MockContact(givenName="AAAAAAAAAAAAAAAALEX", familyName="SMITHXXXXXXXX", name="AAAAAAAAAAAAAAAALEX SMITHXXXXXXXX") self.contact_4 = MockContact(tel=[{ "type": "Mobile 1", "carrier": "MoviStar1", "value": "444444444" }, { "type": "Mobile 2", "carrier": "MoviStar2", "value": "555555555" }, { "type": "Mobile 3", "carrier": "MoviStar3", "value": "666666666" }]) self.contact_5 = MockContact(email=[{ "type": "", "value": "*****@*****.**" }, { "type": "", "value": "*****@*****.**" }, { "type": "", "value": "*****@*****.**" }]) # Set a couple of them to be favorites (including the one we'll use). self.contact_1["category"] = "favorite" self.contact_2["category"] = "favorite" # Insert all the contacts. self.UTILS.general.insertContact(self.contact_1) self.UTILS.general.insertContact(self.contact_2) self.UTILS.general.insertContact(self.contact_3) self.UTILS.general.insertContact(self.contact_4) self.UTILS.general.insertContact(self.contact_5) self.UTILS.reporting.logComment("Using target telephone number " + self.contact_1["tel"]["value"]) self.test_msg = "Test message at {}".format(time.time())
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) # Get details of our test contacts. self.contact = MockContact(givenName='1111111') self.contact2 = MockContact(familyName='2222222') self.UTILS.general.insertContact(self.contact) self.UTILS.general.insertContact(self.contact2)
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) self.contacts = Contacts(self) # Prepare the contact we're going to insert. self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom") self.contact_1 = MockContact(tel={'type': '', 'value': self.phone_number}) self.contact_2 = MockContact(tel={'type': '', 'value': self.phone_number}) self.UTILS.general.insertContact(self.contact_1) self.UTILS.reporting.logComment("Using target telephone number " + self.contact_1["tel"]["value"])
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) self.contact = MockContact(tel={ 'type': 'Mobile', 'value': '123111111' }) self.contact2 = MockContact(tel={ 'type': 'Mobile', 'value': '123222222' }) self.UTILS.general.insertContact(self.contact2)
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.dialer = Dialer(self) self.test_num = ["666666666666", "555555555555"] self.test_contacts = [ MockContact(tel={ 'type': 'Mobile', 'value': self.test_num[i] }) for i in range(2) ] self.test_contacts[0]["givenName"] = "LongGivennamexxxxxxxxxxx" self.test_contacts[1]["familyName"] = "LongFamilynamexxxxxxxxxxx" """ This has to be done due to a MockContact malfunction. It does not update the name field to the specified values of givenName and familyName """ for c in self.test_contacts: c["name"] = c["givenName"] + " " + c["familyName"] map(self.UTILS.general.insertContact, self.test_contacts) self.dialer.launch() self.dialer.callLog_clearAll() for contact in self.test_contacts: self.dialer.createMultipleCallLogEntries(contact["tel"]["value"], 2) self.dialer.open_call_log()
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.loop = Loop(self) self.contacts = Contacts(self) self.settings = Settings(self) self.fxa_user = self.UTILS.general.get_config_variable( "fxa_user", "common") self.fxa_pass = self.UTILS.general.get_config_variable( "fxa_pass", "common") self.connect_to_network() self.target_name = "QA" self.test_contacts = [MockContact() for i in range(5)] self.test_contacts[0]["givenName"] = self.target_name self.test_contacts[0]["familyName"] = "Automation" map(self.UTILS.general.insertContact, self.test_contacts) # Clean start if not self.loop.is_installed(): self.loop.install() else: self.loop.launch() # If already logged in, logout if not self.loop.wizard_or_login(): self.loop.open_settings() self.loop.logout() self.settings.launch() self.settings.fxa() self.settings.fxa_log_out() self.apps.kill_all() time.sleep(2)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.loop = Loop(self) self.settings = Settings(self) self.scenario = "scenarios/urls/multiple/available/diff_day/idb" self.aux_files_dir = self.UTILS.general.get_config_variable("aux_files", "loop") self.fxa_user = self.UTILS.general.get_config_variable("fxa_user", "common") self.fxa_pass = self.UTILS.general.get_config_variable("fxa_pass", "common") self.connect_to_network() # Insert our test contacts number_of_contacts = 3 contact_given = "Test" contact_family = map(str, range(1, number_of_contacts + 1)) contact_name = ["{} {}".format(contact_given, contact_family[i]) for i in range(number_of_contacts)] contact_numbers = ["666666666666", "777777777777", "888888888888"] test_contacts = [MockContact(name=contact_name[i], givenName=contact_given, familyName=contact_family[i], tel={'type': 'Mobile', 'value': contact_numbers[i]}) for i in range(number_of_contacts)] map(self.UTILS.general.insertContact, test_contacts) self.loop.initial_test_checks() # Make sure we're not logged in FxA self.settings.launch() self.settings.fxa() self.settings.fxa_log_out()
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) # Get details of our test contacts. self.contact = MockContact() self.contact2 = MockContact() """ We're not testing adding a contact, so just stick one into the database. """ self.UTILS.general.insertContact(self.contact)
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.")
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) self.contacts = Contacts(self) self.phone_number = self.UTILS.general.get_config_variable( "phone_number", "custom") self.email_address = self.UTILS.general.get_config_variable( "gmail_1_email", "common") self.test_contact = MockContact(email=[{ "type": "Personal", "value": "*****@*****.**" }, { "type": "Personal", "value": "*****@*****.**" }, { "type": "Personal", "value": "*****@*****.**" }]) self.UTILS.general.insertContact(self.test_contact) self.UTILS.general.add_file_to_device( './tests/_resources/contact_face.jpg') self.data_layer.delete_all_sms()
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)
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) self.email = Email(self) # Get details of our test contacts. email1 = self.UTILS.general.get_config_variable( "gmail_1_email", "common") email2 = self.UTILS.general.get_config_variable( "gmail_2_email", "common") email3 = self.UTILS.general.get_config_variable( "hotmail_1_email", "common") self.contact = MockContact(email=[{ 'type': 'Personal', 'value': email1 }, { 'type': 'Personal', 'value': email2 }, { 'type': 'Personal', 'value': email3 }]) """ We're not testing adding a contact, so just stick one into the database. """ self.UTILS.general.insertContact(self.contact) self._email_subject = "test " + str(time.time()) self._email_message = "Test message"
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)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.loop = Loop(self) self.contacts = Contacts(self) self.settings = Settings(self) self.fxa_user = self.UTILS.general.get_config_variable( "fxa_user", "common") self.fxa_pass = self.UTILS.general.get_config_variable( "fxa_pass", "common") self.target_name = "QA" self.test_contacts = [MockContact() for i in range(3)] self.test_contacts[0]["givenName"] = self.target_name self.test_contacts[0]["familyName"] = "Automation" self.test_contacts[0]["name"] = "{} {}".format( self.test_contacts[0]["givenName"], self.test_contacts[0]["familyName"]) map(self.UTILS.general.insertContact, self.test_contacts) self.contacts.launch() self._add_contact_as_favorite(self.test_contacts[0]) 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)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.loop = Loop(self) self.settings = Settings(self) self.test_contact = MockContact() self.fxa_user = self.UTILS.general.get_config_variable( "fxa_user", "common") self.fxa_pass = self.UTILS.general.get_config_variable( "fxa_pass", "common") self.test_contact["givenName"] = "This is a very looooooooooooong name" self.test_contact["familyName"] = "Test" self.test_contact["name"] = "{} {}".format( self.test_contact["givenName"], self.test_contact["familyName"]) self.UTILS.general.insertContact(self.test_contact) 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)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) self.contact = MockContact() self.UTILS.general.insertContact(self.contact)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.loop = Loop(self) self.settings = Settings(self) self.test_contact = MockContact() self.fxa_user = self.UTILS.general.get_config_variable( "fxa_user", "common") self.fxa_pass = self.UTILS.general.get_config_variable( "fxa_pass", "common") self.connect_to_network() self.UTILS.general.insertContact(self.test_contact) # Clean start if not self.loop.is_installed(): self.loop.install() else: self.loop.launch() # If already logged in, logout if not self.loop.wizard_or_login(): self.loop.open_settings() self.loop.logout() self.settings.launch() self.settings.fxa() self.settings.fxa_log_out() self.apps.kill_all() time.sleep(2)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.dialer = Dialer(self) self.contacts = Contacts(self) self.test_contact = MockContact(tel={'type': 'Mobile', 'value': '111111111'}) self.UTILS.general.insertContact(self.test_contact)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) self.test_contact = MockContact() self.UTILS.general.add_file_to_device( './tests/_resources/contact_face.jpg')
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) # Prepare the contact. self.contact = MockContact()
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) self.contact = MockContact() self.UTILS.general.insertContact(self.contact) self.data_layer.connect_to_wifi()
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.dialer = Dialer(self) self.contacts = Contacts(self) num = self.UTILS.general.get_config_variable("phone_number", "custom") self.test_contact = MockContact(tel={'type': 'Mobile', 'value': num})
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) self.contacts = Contacts(self) self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom") self.contact = MockContact(tel={'type': '', 'value': ''}) self.UTILS.general.insertContact(self.contact)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) self.contacts = Contacts(self) self.contact = MockContact(tel=[{'type': 'Mobile', 'value': '111111111'}, {'type': 'Mobile', 'value': '222222222'}]) self.UTILS.general.insertContact(self.contact)
def setUp(self): GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) self.test_contact = MockContact() self.UTILS.general.insertContact(self.test_contact) self.email_1 = "*****@*****.**" self.email_2 = "*****@*****.**"
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) # Create test contact. self.contact = MockContact()
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) # Create our test contacts. self.contact = MockContact() self.UTILS.general.insertContact(self.contact)
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) # Get details of our test contacts. self.test_contacts = [MockContact() for i in range(2)] map(self.UTILS.general.insertContact, self.test_contacts)
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.dialer = Dialer(self) self.contacts = Contacts(self) self.test_contacts = [MockContact() for i in range(3)] self.test_contacts[0]["tel"]["value"] = "+34111111111" map(self.data_layer.insert_contact, self.test_contacts)
def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.contacts = Contacts(self) # Create test contacts. self.contact_list = [MockContact() for i in range(3)] map(self.UTILS.general.insertContact, self.contact_list)