Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Normalise use of getting urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac authored and Zac committed Apr 11, 2012
1 parent b7dc91a commit ebe7c0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions pages/base.py
Expand Up @@ -26,9 +26,6 @@ def page_title(self):
def page_heading(self):
return self.selenium.find_element(*self._page_heading).text

def get_url_path(self, path):
self.selenium.get(self.base_url + path)

def click_server_status(self):
self.selenium.find_element(*self._server_status_locator).click()
from pages.crash_stats_page import CrashStatsStatus
Expand Down
6 changes: 3 additions & 3 deletions tests/test_layout.py
Expand Up @@ -29,17 +29,17 @@ def test_that_product_versions_are_ordered_correctly(self, mozwebqa):

def test_that_topcrasher_is_not_returning_http500(self, mozwebqa):
csp = CrashStatsHomePage(mozwebqa)
csp.get_url_path(csp.base_url + '/topcrasher')
csp.selenium.get(mozwebqa.base_url + '/topcrasher')
tc = CrashStatsTopCrashers(mozwebqa)
Assert.contains('Top Crashers', tc.page_heading)
Assert.true(tc.results_found, 'No results found!')

def test_that_report_is_not_returning_http500(self, mozwebqa):
csp = CrashStatsHomePage(mozwebqa)
csp.get_url_path(csp.base_url + '/report')
csp.selenium.get(mozwebqa.base_url + '/report')
Assert.contains('Page not Found', csp.page_heading)

def test_that_correlation_is_not_returning_http500(self, mozwebqa):
csp = CrashStatsHomePage(mozwebqa)
csp.get_url_path(csp.base_url + '/correlation')
csp.selenium.get(mozwebqa.base_url + '/correlation')
Assert.contains('Page not Found', csp.page_heading)
4 changes: 2 additions & 2 deletions tests/test_smoke_tests.py
Expand Up @@ -65,6 +65,6 @@ def test_that_bugzilla_link_contain_current_site(self, mozwebqa):
Bug 631737
"""
csp = CrashStatsHomePage(mozwebqa)
path = '/invaliddomain'
csp.get_url_path(path)
path = '/invalidpath'
csp.selenium.get(mozwebqa.base_url + path)
Assert.contains('bug_file_loc=%s%s' % (mozwebqa.base_url, path), urllib.unquote(csp.link_to_bugzilla))

0 comments on commit ebe7c0c

Please sign in to comment.