Exemple #1
0
    def setUp(self):

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

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.incoming_number = self.UTILS.general.get_config_variable(
            "sms_platform_numbers", "common").split(',')
        self.UTILS.reporting.logComment("Sending sms to telephone number " +
                                        self.phone_number)
        self.emails = ["*****@*****.**", "*****@*****.**"]
        self.test_msg = "Test with email addresses: {} and {} at {}".format(
            self.emails[0], self.emails[1], time.time())
        self.data_layer.delete_all_sms()
Exemple #2
0
    def setUp(self):

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

        self.email_user = self.UTILS.general.get_config_variable(
            "gmail_1_user", "common")
        self.email_address = self.UTILS.general.get_config_variable(
            "gmail_1_email", "common")
        self.email_pass = self.UTILS.general.get_config_variable(
            "gmail_1_pass", "common")

        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.emailAddy = self.UTILS.general.get_config_variable(
            "gmail_2_email", "common")
Exemple #3
0
    def setUp(self):

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

        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.test_msg = "Test message at {}".format(time.time())

        self.contact = MockContact(tel={
            'type': 'Mobile',
            'value': self.phone_number
        })
        self.UTILS.general.insertContact(self.contact)
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()
Exemple #4
0
    def setUp(self):

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

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.incoming_number = self.UTILS.general.get_config_variable(
            "sms_platform_numbers", "common").split(',')
        self.UTILS.reporting.logComment("Sending sms to telephone number " +
                                        self.phone_number)
        self.link = "www.wikipedia.org"
        self.test_msg = "Test with link {} at {}".format(
            self.link, time.time())
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()
Exemple #5
0
    def setUp(self):

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

        # Insert a contact without email addresses
        self.UTILS.general.add_file_to_device(
            './tests/_resources/contact_face.jpg')
        self.contact = MockContact(email={'type': 'Personal', 'value': ''})

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

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.UTILS.reporting.logComment("Sending sms to telephone number " +
                                        self.phone_number)
Exemple #6
0
    def setUp(self):

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

        # Prepare the contact we're going to insert.
        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.contact = MockContact(tel={
            'type': '',
            'value': self.phone_number
        })

        self.UTILS.general.insertContact(self.contact)
        self.UTILS.reporting.logComment("Using target telephone number " +
                                        self.contact["tel"]["value"])
        self.data_layer.delete_all_sms()
Exemple #7
0
    def setUp(self):

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

        timestamp = time.time()
        self.test_msgs = [
            "Hello world {} at {}".format(i, timestamp) for i in range(3)
        ]

        # 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()
Exemple #8
0
    def setUp(self):

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

        # Establish which phone number to use and set up the contacts.
        self.nums = [
            self.UTILS.general.get_config_variable("phone_number", "custom"),
            self.UTILS.general.get_config_variable("short_phone_number",
                                                   "custom")
        ]

        self.test_contacts = [
            MockContact(tel={
                'type': 'Mobile',
                'value': num
            }) for num in self.nums
        ]
        map(self.UTILS.general.insertContact, self.test_contacts)
Exemple #9
0
    def setUp(self):

        # Set up child objects...

        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.contacts = Contacts(self)
        self.email = Email(self)

        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.emailAddy = self.UTILS.general.get_config_variable("gmail_1_email", "common")
        self.emailE = self.UTILS.general.get_config_variable("gmail_2_email", "common")
        self.emailP = self.UTILS.general.get_config_variable("gmail_2_pass", "common")
        self.emailU = self.UTILS.general.get_config_variable("gmail_2_user", "common")

        self.UTILS.general.add_file_to_device('./tests/_resources/contact_face.jpg')
        self.test_msg = "Test message."

        self.cont = MockContact()
        self.data_layer.delete_all_sms()
Exemple #10
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.messages = Messages(self)

        # Establish which phone number to use and set up the contacts.
        self.nums = [
            self.UTILS.general.get_config_variable("phone_number", "custom"),
            self.UTILS.general.get_config_variable("short_phone_number",
                                                   "custom")
        ]

        self.test_contacts = [
            MockContact(tel={
                'type': 'Mobile',
                'value': self.nums[i]
            }) for i in range(2)
        ]
        map(self.UTILS.general.insertContact, self.test_contacts)
        self.data_layer.delete_all_sms()
Exemple #11
0
    def setUp(self):

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

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        num1 = 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": num1
                                    })
        self.UTILS.reporting.logComment("Using target telephone number " +
                                        self.contact1["tel"]["value"])
        self.UTILS.general.insertContact(self.contact1)

        num2 = self.UTILS.general.get_config_variable("incoming_call_number",
                                                      "common")
        self.contact2 = MockContact(givenName="Name 3",
                                    familyName="Surname 3",
                                    name="Name 3 Surname 3",
                                    tel={
                                        "type": "Mobile",
                                        "value": num2
                                    })
        self.UTILS.reporting.logComment("Using target telephone number " +
                                        self.contact2["tel"]["value"])
        self.UTILS.general.insertContact(self.contact2)
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()
        self.test_nums = [
            self.contact1["tel"]["value"], self.contact2["tel"]["value"]
        ]
Exemple #12
0
    def setUp(self):

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

        # Get details of our test contacts.
        self.contact = MockContact(tel=[{
            'type': 'Mobile',
            'value': '11111111'
        }, {
            'type': 'Mobile',
            'value': '222222222'
        }])
        """
        We're not testing adding a contact, so just stick one
        into the database.
        """

        self.UTILS.general.insertContact(self.contact)
Exemple #13
0
    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)

        # Prepare the contact we're going to insert.
        self.contact = MockContact(tel={
            'type': '',
            'value': self.phone_number
        })
        self.UTILS.general.insertContact(self.contact)
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()
Exemple #14
0
    def setUp(self):

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

        # Prepare the contact we're going to insert.
        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.contact = MockContact(givenName='AAAAAAAAAAAAAAAALEX',
                                   familyName='SMITHXXXXXXXX',
                                   name='AAAAAAAAAAAAAAAALEX SMITHXXXXXXXX',
                                   tel={
                                       'type': 'Mobile',
                                       'value': self.phone_number
                                   })

        self.UTILS.general.insertContact(self.contact)
        self.cp_incoming_number = self.UTILS.general.get_config_variable(
            "sms_platform_numbers", "common").split(',')
        self.data_layer.delete_all_sms()
Exemple #15
0
    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")
        self.incoming_sms_num = self.UTILS.general.get_config_variable(
            "sms_platform_numbers", "common").split(',')
        self.UTILS.reporting.logComment("Sending sms to telephone number " +
                                        self.phone_number)
        self.data_layer.delete_all_sms()

        # Prepare the contact we're going to insert.
        self.phone_number = self.UTILS.general.get_config_variable(
            "phone_number", "custom")
        self.contact = MockContact(tel={
            'type': '',
            'value': self.phone_number
        })
        self.UTILS.general.insertContact(self.contact)
Exemple #16
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)
        self.music = Music(self)
        self.video = Video(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()
        self.expected_sizes = ["4.8", "62.3", "175.6"]
        self.expected_names = ["80x60.jpg", "30k_basic_AMR.amr", "mpeg4.3gp"]

        self.UTILS.general.add_file_to_device('./tests/_resources/80x60.jpg')
        self.UTILS.general.add_file_to_device(
            './tests/_resources/30k_basic_AMR.amr')
        self.UTILS.general.add_file_to_device('./tests/_resources/mpeg4.mp4')
Exemple #17
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
Exemple #18
0
 def setUp(self):
     GaiaTestCase.setUp(self)
     self.UTILS = UTILS(self)
     self.contacts = Contacts(self)
     self.messages = Messages(self)