def test_rocketbar_add_collection(self):
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()

        contextmenu = homescreen.open_context_menu()
        collection_activity = contextmenu.tap_add_collection()

        collection_list = collection_activity.collection_name_list
        # Choose the second option to avoid 'Custom'
        collection = collection_list[1]

        collection_activity.select(collection)
        self.wait_for_condition(
            lambda m: self.apps.displayed_app.name == homescreen.name)
        self.apps.switch_to_displayed_app()

        self.assertTrue(homescreen.is_app_installed(collection),
                        "Collection '%s' not found on Homescreen" % collection)

        collection = homescreen.tap_collection(collection)

        app = collection.applications[0]
        app_name = app.name
        app.long_tap_to_install()
        add_link = app.tap_save_to_home_screen()
        add_link.tap_add_bookmark_to_home_screen_dialog_button()

        # Switch to Home Screen to look for app
        self.device.touch_home_button()

        self.assertTrue(
            homescreen.is_app_installed(app_name),
            'The app %s was not found to be installed on the home screen.' %
            app_name)
    def test_everythingme_add_collection(self):
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()

        contextmenu = homescreen.open_context_menu()
        collection_activity = contextmenu.tap_add_collection()

        collection_list = collection_activity.collection_name_list
        # Choose the second option to avoid 'Custom'
        collection = collection_list[1]

        collection_activity.select(collection)
        self.wait_for_condition(lambda m: self.apps.displayed_app.name == homescreen.name)
        self.apps.switch_to_displayed_app()

        self.assertTrue(homescreen.is_app_installed(collection),
                        "Collection '%s' not found on Homescreen" % collection)

        collection = homescreen.tap_collection(collection)

        app = collection.applications[0]
        app_name = app.name
        app.long_tap_to_install()
        add_link = app.tap_save_to_home_screen()
        add_link.switch_to_add_bookmark_frame()
        add_link.tap_add_bookmark_to_home_screen_dialog_button()

        # Switch to Home Screen to look for app
        self.device.touch_home_button()

        self.assertTrue(homescreen.is_app_installed(app_name),
                        'The app %s was not found to be installed on the home screen.' % app_name)
Пример #3
0
    def test_homescreen_change_wallpaper_from_gallery(self):
        """
        https://moztrap.mozilla.org/manage/case/1902/
        """

        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()

        default_wallpaper_settings = self.data_layer.get_setting('wallpaper.image')
        contextmenu = homescreen.open_context_menu()
        activities = contextmenu.tap_change_wallpaper()

        # select gallery
        gallery = activities.tap_gallery()

        # go through the crop process
        gallery.wait_for_thumbnails_to_load()
        gallery.thumbnails[0].tap()

        from gaiatest.apps.gallery.regions.crop_view import CropView
        crop_view = CropView(self.marionette)

        # can't actually crop the element
        crop_view.tap_crop_done()

        # check that the wallpaper has changed
        new_wallpaper_settings = self.data_layer.get_setting('wallpaper.image')
        self.assertNotEqual(default_wallpaper_settings, new_wallpaper_settings)
Пример #4
0
    def test_everythingme_add_collection(self):

        homescreen = Homescreen(self.marionette)
        homescreen.switch_to_homescreen_frame()
        contextmenu = homescreen.open_context_menu()
        contextmenu.tap_add_collection()
        homescreen.select('Autos')
        self.assertTrue(homescreen.is_app_installed('Autos'),
                        "App %s not found on Homescreen" % 'Autos')
    def test_everythingme_add_collection(self):

        homescreen = Homescreen(self.marionette)
        homescreen.switch_to_homescreen_frame()
        contextmenu = homescreen.open_context_menu()
        contextmenu.tap_add_collection()
        homescreen.select('Autos')
        self.assertTrue(homescreen.is_app_installed('Autos'),
                        "App %s not found on Homescreen" % 'Autos')
    def test_everythingme_add_collection(self):
        collection = 'Weather'
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()

        contextmenu = homescreen.open_context_menu()
        contextmenu.tap_add_collection()
        homescreen.select(collection)
        self.assertTrue(homescreen.is_app_installed(collection),
                        "Collection '%s' not found on Homescreen" % collection)
    def test_everythingme_add_collection(self):
        collection = 'Weather'
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()
        homescreen.wait_for_homescreen_to_load()

        contextmenu = homescreen.open_context_menu()
        contextmenu.tap_add_collection()
        homescreen.select(collection)
        self.assertTrue(homescreen.is_app_installed(collection),
                        "Collection '%s' not found on Homescreen" % collection)
    def test_everythingme_add_collection(self):
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()
        homescreen.wait_for_homescreen_to_load()

        contextmenu = homescreen.open_context_menu()
        contextmenu.tap_add_collection()

        collection_list = contextmenu.collection_name_list
        collection = random.choice(collection_list[1:])

        homescreen.select(collection)
        self.assertTrue(homescreen.is_app_installed(collection),
                        "Collection '%s' not found on Homescreen" % collection)
    def test_homescreen_change_wallpaper_from_gallery(self):
        """
        https://moztrap.mozilla.org/manage/case/1902/
        reusing /functional/homescreen/test_homescreen_change_wallpaper.py script
        """
        # wait until the homescreen is fully drawn
        self.take_screenshot(prewait=3)
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()

        default_wallpaper_settings = self.data_layer.get_setting('wallpaper.image')
        contextmenu = homescreen.open_context_menu()
        self.take_screenshot()

        activities = contextmenu.tap_change_wallpaper()
        # it is currently in system frame, but self.apps.switch_to_displayed_app() will return
        # a different value
        self.take_screenshot(top_frame=True)
        gallery = activities.tap_gallery()

        # go through the crop process
        gallery.wait_for_thumbnails_to_load()
        self.take_screenshot()
        gallery.thumbnails[0].tap()

        from gaiatest.apps.gallery.regions.crop_view import CropView
        crop_view = CropView(self.marionette)
        self.take_screenshot()

        # can't actually crop the element
        crop_view.tap_crop_done()

        # check that the wallpaper has changed
        new_wallpaper_settings = self.data_layer.get_setting('wallpaper.image')
        self.assertNotEqual(default_wallpaper_settings, new_wallpaper_settings)
        self.take_screenshot()