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 #27593 from mwargers/cost_control2
Browse files Browse the repository at this point in the history
Bug 1115180 - Get test_cost_control_data_alert_mobile.py re-enabled
  • Loading branch information
phoenix1moz committed Jan 22, 2015
2 parents c901afb + b14cf28 commit 155461a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ wifi = false
skip-if = device == "desktop"
smoketest = true
wifi = false
disabled = Bug 1115180 for getting it re-enabled

[test_cost_control_reset_wifi.py]
skip-if = device == "desktop"
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from marionette.by import By
except:
from marionette_driver.by import By
from marionette.wait import Wait
from gaiatest import GaiaTestCase
from gaiatest.apps.search.app import Search
from gaiatest.apps.cost_control.app import CostControl
Expand Down Expand Up @@ -43,12 +44,12 @@ def test_cost_control_data_alert_mobile(self):

# open browser to get some data downloaded
search = Search(self.marionette)
search.launch()
search.launch(launch_timeout=30000)
browser = search.go_to_url('http://www.mozilla.org/')
browser.wait_for_page_to_load(180)

browser.switch_to_content()
self.wait_for_condition(lambda m: "Home of the Mozilla Project" in m.title)
Wait(self.marionette, timeout=60).until(lambda m: "Home of the Mozilla Project" in m.title)
browser.switch_to_chrome()

# get the notification bar
Expand All @@ -63,8 +64,6 @@ def test_cost_control_data_alert_mobile(self):
# make sure the color changed
# The timeout is increased, because for some reason, it takes some time
# before the limit view is shown (the browser has to finish loading?)
usage_view = self.marionette.find_element(
*self._data_usage_view_locator)
self.wait_for_condition(
lambda m: 'reached-limit' in usage_view.get_attribute('class'),
message='Data usage bar did not breach limit', timeout=40)
usage_view = self.marionette.find_element(*self._data_usage_view_locator)
Wait(self.marionette, timeout=40).until(lambda m: 'reached-limit' in usage_view.get_attribute('class'),
message='Data usage bar did not breach limit')

0 comments on commit 155461a

Please sign in to comment.