Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #18121 from AndreiH/993358
Browse files Browse the repository at this point in the history
Bug 993358 - Extra step in test_everythingme_app_install.TestEverythingM...
  • Loading branch information
Zac committed Apr 9, 2014
2 parents 2fcbff0 + be9af13 commit 7a430bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Expand Up @@ -7,23 +7,17 @@

from gaiatest.apps.base import Base
from gaiatest.apps.base import PageRegion
from gaiatest.apps.homescreen.regions.bookmark_menu import BookmarkMenu


class Collection(Base):

_apps_locator = (By.CSS_SELECTOR, '.evme-apps ul.cloud li[data-name]')
_homescreen_status_notification = (By.CSS_SELECTOR, "section[role='status'] > p")
_close_collection_locator = (By.CSS_SELECTOR, '#collection div.header .close')

def wait_for_collection_screen_visible(self):
self.wait_for_element_displayed(*self._apps_locator)

def tap_exit(self):
self.marionette.find_element(*self._close_collection_locator).tap()
self.wait_for_element_not_displayed(*self._close_collection_locator)
from gaiatest.apps.homescreen.app import Homescreen
return Homescreen(self.marionette)

@property
def notification_message(self):
self.wait_for_element_displayed(*self._homescreen_status_notification)
Expand Down Expand Up @@ -59,3 +53,4 @@ def long_tap_to_install(self):
def tap_save_to_home_screen(self):
self.wait_for_element_displayed(*self._modal_dialog_save_locator)
self.marionette.find_element(*self._modal_dialog_save_locator).tap()
return BookmarkMenu(self.marionette)
Expand Up @@ -27,12 +27,12 @@ def test_installing_everything_me_app(self):
app = collection.applications[0]
app_name = app.name
app.long_tap_to_install()
app.tap_save_to_home_screen()
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()

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

homescreen = collection.tap_exit()
# 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)

0 comments on commit 7a430bb

Please sign in to comment.