Пример #1
0
class test_main(GaiaTestCase):

    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 tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Launch contacts app.
        self.contacts.launch()

        # Create our contact.
        self.contacts.create_contact(self.contact)

        # Verify our contact details.
        self.contacts.check_view_contact_details(self.contact)
Пример #2
0
class test_main(GaiaTestCase):
    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 tearDown(self):
        self.UTILS.general.remove_files()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.contacts.launch()
        self.contacts.create_contact(self.test_contact, "gallery")

        self.contacts.verify_image_in_all_contacts(self.test_contact['name'])
        self.contacts.check_view_contact_details(self.test_contact, True)
Пример #3
0
class test_main(GaiaTestCase):

    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 tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Launch contacts app.
        self.contacts.launch()

        # Edit the contact with the new details.
        self.contacts.edit_contact(self.contact["name"], self.contact2)

        # test: The 'view contact' page shows the correct details for this new contact.
        self.contacts.check_view_contact_details(self.contact2)

        # test: The 'edit contact' page shows the correct details for this new contact.
        self.contacts.check_edit_contact_details(self.contact2)