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 #18904 from JohanLorenzo/fix-test_cards_view_kill_…
Browse files Browse the repository at this point in the history
…apps_with_two_apps

Fix Bug 1003175 - Investigate failure in test_cards_view_kill_apps_with_...
  • Loading branch information
Zac committed May 7, 2014
2 parents 9d1352a + 9a9dc22 commit b7de32b
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -27,10 +27,15 @@ def _close_button_locator(self, app):
def is_cards_view_displayed(self):
return self.is_element_displayed(*self._cards_view_locator)

def _is_element_displayed_and_not_in_transition(self, by, locator):
element = self.marionette.find_element(by, locator)
return element.is_displayed() and 'transition' not in element.get_attribute('style')

def is_app_displayed(self, app):
card = self.marionette.find_element(*self._app_card_locator(app))
# card is displayed and not in transition
return card.is_displayed() and 'transition' not in card.get_attribute('style')
# Close button needs also to be waited as it may be still moving
# see https://bugzilla.mozilla.org/show_bug.cgi?id=1003175 for details
return self._is_element_displayed_and_not_in_transition(*self._app_card_locator(app)) \
and self._is_element_displayed_and_not_in_transition(*self._close_button_locator(app))

def is_app_present(self, app):
return self.is_element_present(*self._app_card_locator(app))
Expand Down

0 comments on commit b7de32b

Please sign in to comment.