Esempio n. 1
0
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.actions = Actions(self.marionette)
        self.settings = Settings(self)
        self.eme = EverythingMe(self)
        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.")

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.data_layer.connect_to_wifi()

        self.UTILS.iframe.switchToFrame(*DOM.Home.frame_locator)

        # First of all, make sure an application is installed
        self.eme.install_app(self.cat_id, self.app_name)
        self.UTILS.home.goHome()

        # Then, proceed to uninstall the application through the Edit mode
        self.UTILS.app.uninstallApp(self.app_name)
Esempio n. 2
0
class test_main(GaiaTestCase):
    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)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.data_layer.connect_to_wifi()

        self.UTILS.iframe.switchToFrame(*DOM.Home.frame_locator)

        # First of all, make sure an application is installed
        installed = self.eme.install_app(self.cat_id, self.app_name)
        self.UTILS.test.test(
            installed, "The application {} was successfully installed".format(
                self.app_name))

        # Go back and try to reinstall again
        self.UTILS.home.goHome()
        installed = self.eme.install_app(self.cat_id, self.app_name, False)
        self.UTILS.test.test(not installed, "The application {} was already previously installed".\
                                            format(self.app_name))

        self.UTILS.app.uninstallApp(self.app_name)
Esempio n. 3
0
class test_main(GaiaTestCase):

    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)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.data_layer.connect_to_wifi()

        self.UTILS.iframe.switchToFrame(*DOM.Home.frame_locator)

        # First of all, make sure an application is installed
        installed = self.eme.install_app(self.cat_id, self.app_name)
        self.UTILS.test.test(installed, "The application {} was successfully installed".format(self.app_name))

        # Go back and try to reinstall again
        self.UTILS.home.goHome()
        installed = self.eme.install_app(self.cat_id, self.app_name, False)
        self.UTILS.test.test(not installed, "The application {} was already previously installed".\
                                            format(self.app_name))

        self.UTILS.app.uninstallApp(self.app_name)