예제 #1
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(self)
        self.settings = Settings(self)

        self.scenario = "scenarios/urls/multiple/available/same_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()
예제 #2
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(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.loop.initial_test_checks()
        self.settings.launch()
        self.settings.fxa()

        if not self.settings.is_fxa_logged_in():
            self.settings.fxa_log_in(self.fxa_user, self.fxa_pass)

        self.apps.kill_all()
        time.sleep(2)
예제 #3
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(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()

        # Update loop
        self.loop.update_and_publish()

        self.loop.initial_test_checks()

        self.settings.launch()
        self.settings.fxa()
        self.settings.fxa_log_out()
        self.apps.kill_all()
        time.sleep(2)
예제 #4
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.loop = Loop(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.fxa_user2 = self.UTILS.general.get_config_variable(
            "fxa_user2", "common")
        self.fxa_pass2 = self.UTILS.general.get_config_variable(
            "fxa_pass2", "common")

        self.connect_to_network()

        self.loop.initial_test_checks()
        self.logout_fxa()
        self.apps.kill_all()
        time.sleep(2)
예제 #5
0
    def setUp(self):

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

        # Specific for this test.
        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable(
            "download_url", "common")
        self.file_name = "Crazy_Horse.jpg"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

        self.apps.kill_all()
        time.sleep(2)
예제 #6
0
    def setUp(self):

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

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)

        self.test_url = self.UTILS.general.get_config_variable(
            "download_url", "common")
        self.file_name = "clipcanvas_14348_H264_320x180.mp4"
        self.data_url = "{}/{}".format(self.test_url, self.file_name)

        self.connect_to_network()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()

        self.apps.kill_all()
        time.sleep(2)
예제 #7
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)
예제 #8
0
    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)

        self.UTILS = UTILS(self)
        self.settings = Settings(self)
        self.eme = EverythingMe(self)
        self.actions = Actions(self.marionette)
        self.cat_id = "207"
        self.app_name = "Pacman"

        try:
            self.apps.set_permission('Homescreen', 'geolocation', 'deny')
            self.apps.set_permission('Smart Collections', 'geolocation',
                                     'deny')
        except:
            self.UTILS.reporting.logComment(
                "Unable to automatically set geolocation permission.")

        # Try to uninstall app, just in case it was previously installed
        self.UTILS.app.uninstallApp(self.app_name)
예제 #9
0
    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.contacts = Contacts(self)
        self.settings = Settings(self)

        # Export some dummy contacts
        self.initial_population = 10
        self.test_contacts = [
            MockContact() for i in range(self.initial_population)
        ]
        map(self.UTILS.general.insertContact, self.test_contacts)

        # Delete all previous exportation, just in case
        os.system("adb shell rm sdcard/*.vcf > /dev/null 2>&1")
        self.contacts.launch()
        self.contacts.export_sd_card()

        select_all_btn = self.UTILS.element.getElement(
            DOM.Contacts.action_select_all, "Select All")
        select_all_btn.tap()
        export_btn = self.UTILS.element.getElement(DOM.Contacts.select_action,
                                                   "Export button")
        export_btn.tap()
        # Check that there is a layer informing about the success export
        self.UTILS.element.waitForElements(("id", "statusMsg"),
                                           "x/y contact exported msg")

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

        self.contacts.launch()
        self.contacts.delete_all_contacts()

        self.test_contact = MockContact()
        self.UTILS.general.insertContact(self.test_contact)
        self.apps.kill_all()
        time.sleep(2)
예제 #10
0
    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"] = u"ásdfuquñ".encode("utf-8")
        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)
예제 #11
0
    def setUp(self):

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

        self.browser = Browser(self)
        self.settings = Settings(self)
        self.download_manager = DownloadManager(self)
        self.test_url = self.UTILS.general.get_config_variable("download_url", "common")
        self.file_names = [
            "105MB.rar",
            "41MB.rar",
            "30MB.rar"
        ]
        self.data_urls = ["{}/{}".format(self.test_url, file_name) for file_name in self.file_names]

        # Progress trackers
        self.pre_progresses = []
        self.post_progresses = []

        self.data_layer.connect_to_cell_data()
        self.settings.launch()
        self.settings.downloads()
        self.download_manager.clean_downloads_list()
예제 #12
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)
예제 #13
0
 def setUp(self):
     # Set up child objects...
     GaiaTestCase.setUp(self)
     self.UTILS = UTILS(self)
     self.settings = Settings(self)
예제 #14
0
 def setUp(self):
     GaiaTestCase.setUp(self)
     self.UTILS = UTILS(self)
     self.dialer = Dialer(self)
     self.settings = Settings(self)
     _ = setup_translations(self)