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)
    def test_installing_everything_me_app(self):
        # https://github.com/mozilla/gaia-ui-tests/issues/67

        homescreen = Homescreen(self.marionette)
        homescreen.switch_to_homescreen_frame()

        self.assertGreater(homescreen.collections_count, 0)
        collection = homescreen.tap_collection('Social')
        collection.wait_for_collection_screen_visible()

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

        notification_message = collection.notification_message
        self.assertEqual(notification_message,
                         '%s added to Home Screen' % app_name)

        homescreen = collection.tap_exit()

        # return to home screen
        self.marionette.execute_script(
            "window.wrappedJSObject.dispatchEvent(new Event('home'));")
        homescreen.switch_to_homescreen_frame()

        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_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)
Пример #4
0
    def test_installing_everything_me_app(self):
        # https://github.com/mozilla/gaia-ui-tests/issues/67

        homescreen = Homescreen(self.marionette)
        homescreen.switch_to_homescreen_frame()

        self.assertGreater(homescreen.collections_count, 0)
        collection = homescreen.tap_collection('Social')
        collection.wait_for_collection_screen_visible()

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

        notification_message = collection.notification_message
        self.assertEqual(notification_message, '%s added to Home Screen' % app_name)

        homescreen = collection.tap_exit()

        # return to home screen
        self.marionette.execute_script("window.wrappedJSObject.dispatchEvent(new Event('home'));")
        homescreen.switch_to_homescreen_frame()

        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_installing_everything_me_app(self):
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()

        self.assertGreater(homescreen.collections_count, 0)
        collection = homescreen.tap_collection('Social')
        collection.wait_for_collection_screen_visible()

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

        notification_message = collection.notification_message
        self.assertEqual(notification_message, '%s added to Home Screen' % app_name)

        homescreen = collection.tap_exit()

        self.assertTrue(homescreen.is_app_installed(app_name),
                        'The app %s was not found to be installed on the home screen.' % app_name)
Пример #6
0
    def test_installing_everything_me_app(self):
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()
        homescreen.wait_for_homescreen_to_load()

        self.assertGreater(homescreen.collections_count, 0)
        collection = homescreen.tap_collection('Social')
        collection.wait_for_collection_screen_visible()

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

        notification_message = collection.notification_message
        self.assertEqual(notification_message, '%s added to Home Screen' % app_name)

        homescreen = collection.tap_exit()

        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_installing_everything_me_app(self):
        homescreen = Homescreen(self.marionette)
        self.apps.switch_to_displayed_app()
        homescreen.wait_for_homescreen_to_load()

        self.assertGreater(homescreen.collections_count, 0)
        collection = homescreen.tap_collection('Social')
        collection.wait_for_collection_screen_visible()

        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)