class test_main(GaiaTestCase): test_msg = "Hello World" test_subject = "My Subject" def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) self.gallery = Gallery(self) # Establish which phone number to use. self.phone_number = self.UTILS.general.get_config_variable( "phone_number", "custom") self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number) self.data_layer.delete_all_sms() self.UTILS.statusbar.clearAllStatusBarNotifs() def tearDown(self): self.UTILS.general.remove_files() self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): # Load an image file into the device. self.UTILS.general.add_file_to_device('./tests/_resources/80x60.jpg') # Launch messages app. self.messages.launch() # Create a new SMS self.messages.startNewSMS() # Insert the phone number in the To field self.messages.addNumbersInToField([self.phone_number]) # Create MMS. self.messages.enterSMSMsg(self.test_msg) self.messages.create_mms_image() self.gallery.click_on_thumbnail_at_position_mms(0) # add subject self.messages.addSubject(self.test_subject) # Click send and wait for the message to be received self.messages.sendSMS() self.messages.wait_for_message() # Forward a message in this case we use "mmssub" to send a mms with subject. self.messages.forwardMessage("mmssub", self.phone_number)
class test_main(GaiaTestCase): test_msg = "Hello World" test_subject = "My Subject" def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) self.gallery = Gallery(self) # Establish which phone number to use. self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom") self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number) self.data_layer.delete_all_sms() self.UTILS.statusbar.clearAllStatusBarNotifs() def tearDown(self): self.UTILS.general.remove_files() self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): # Load an image file into the device. self.UTILS.general.add_file_to_device('./tests/_resources/80x60.jpg') # Launch messages app. self.messages.launch() # Create a new SMS self.messages.startNewSMS() # Insert the phone number in the To field self.messages.addNumbersInToField([self.phone_number]) # Create MMS. self.messages.enterSMSMsg(self.test_msg) self.messages.create_mms_image() self.gallery.click_on_thumbnail_at_position_mms(0) # add subject self.messages.addSubject(self.test_subject) # Click send and wait for the message to be received self.messages.sendSMS() self.messages.wait_for_message() # Forward a message in this case we use "mmssub" to send a mms with subject. self.messages.forwardMessage("mmssub", self.phone_number)
class test_main(GaiaTestCase): test_msg = "Hello World" test_subject = "My Subject" def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) # Establish which phone number to use. self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom") def tearDown(self): self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): # Launch messages app. self.messages.launch() # Create a new SMS self.messages.startNewSMS() # Insert the phone number in the To field self.messages.addNumbersInToField([self.phone_number]) # Create MMS. self.messages.enterSMSMsg(self.test_msg) # Add subject self.messages.addSubject(self.test_subject) # Check convert notice appears convert_notice = self.marionette.find_element(*DOM.Messages.message_convert_notice) self.UTILS.test.test(convert_notice.text, "Converting to multimedia message.", True) # Delete subject self.messages.deleteSubject(self.test_subject) # Check convert notice appears convert_notice = self.marionette.find_element(*DOM.Messages.message_convert_notice) self.UTILS.test.test(convert_notice.text, "Converting to text message.", True)
class test_main(GaiaTestCase): test_msg = "Hello World" test_subject = "My Subject" def setUp(self): # Set up child objects... GaiaTestCase.setUp(self) self.UTILS = UTILS(self) self.messages = Messages(self) # Establish which phone number to use. self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom") def tearDown(self): self.UTILS.reporting.reportResults() GaiaTestCase.tearDown(self) def test_run(self): # Launch messages app. self.messages.launch() # Create a new SMS self.messages.startNewSMS() # Insert the phone number in the To field self.messages.addNumbersInToField([self.phone_number]) # Create MMS. self.messages.enterSMSMsg(self.test_msg) # Add subject self.messages.addSubject(self.test_subject) # Press cancel options button self.messages.cancelSettings() # Review settings options button self.UTILS.reporting.logResult("info", "Cliking on messages options button") options_btn = self.UTILS.element.getElement(DOM.Messages.messages_options_btn, "Messages option button is displayed") self.UTILS.test.test(options_btn, "Settings options.", True)