Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'zac/tidy_wdw'

  • Loading branch information...
commit 37c96da200279b777421ac5e600d7ee8804d0856 2 parents ab97745 + 1efbe7d
Teodosia Pop teodosia authored
3  page.py
View
@@ -22,7 +22,8 @@ def __init__(self, testsetup):
@property
def is_the_current_page(self):
if self._page_title:
- WebDriverWait(self.selenium, 10).until(lambda s: self.selenium.title)
+ WebDriverWait(self.selenium, 10).until(lambda s: self.selenium.title,
+ 'A page title did not appear before the timeout')
Assert.equal(self.selenium.title, self._page_title)
return True
9 pages/dashboard_page.py
View
@@ -85,15 +85,18 @@ def click_delete(self):
def confirm_delete(self):
self.selenium.find_element(*self._confirm_delete_locator).click()
- WebDriverWait(self.selenium, 10).until(lambda s: not self.is_element_present(*self._root_locator))
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._root_locator),
+ 'Package element did not disappear from the DOM before the timeout')
def click_public(self):
self._root_element.find_element(*self._public_locator).click()
- WebDriverWait(self.selenium, 10).until(lambda s: not self.is_element_present(*self._root_locator))
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._root_locator),
+ 'Package element did not disappear from the DOM before the timeout')
def click_private(self):
self._root_element.find_element(*self._private_locator).click()
- WebDriverWait(self.selenium, 10).until(lambda s: not self.is_element_present(*self._root_locator))
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._root_locator),
+ 'Package element did not disappear from the DOM before the timeout')
@property
def name(self):
6 pages/editor_page.py
View
@@ -57,10 +57,12 @@ def tab(self, lookup):
return EditorTabRegion(self.testsetup, lookup)
def _wait_for_save(self):
- WebDriverWait(self.selenium, 10).until(lambda s: not self.is_element_present(*self._save_spinner_locator))
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._save_spinner_locator),
+ 'The save spinner did not disappear before the timeout')
def _wait_for_copy(self):
- WebDriverWait(self.selenium, 10).until(lambda s: not self.is_element_present(*self._copy_spinner_locator))
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._copy_spinner_locator),
+ 'The save spinner did not disappear before the timeout')
class AddonEditorPage(EditorPage):
6 pages/home_page.py
View
@@ -27,7 +27,8 @@ def click_create_addon_btn(self):
self.selenium.find_element(*self._create_addon_btn).click()
from pages.editor_page import AddonEditorPage
addon_editor = AddonEditorPage(self.testsetup)
- WebDriverWait(self.selenium, self.timeout).until(lambda s: addon_editor.tab(0).selected)
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: addon_editor.tab(0).selected,
+ 'The editor tab did not appear before the timeout')
self.add_id()
return addon_editor
@@ -35,6 +36,7 @@ def click_create_lib_btn(self):
self.selenium.find_element(*self._create_lib_btn).click()
from pages.editor_page import LibraryEditorPage
library_editor = LibraryEditorPage(self.testsetup)
- WebDriverWait(self.selenium, self.timeout).until(lambda s: library_editor.tab(0).selected)
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: library_editor.tab(0).selected,
+ 'The editor tab did not appear before the timeout')
self.add_id()
return library_editor
3  pages/login_page.py
View
@@ -28,7 +28,8 @@ def login(self, user="default"):
pop_up = BrowserID(self.testsetup.selenium, self.testsetup.timeout)
pop_up.sign_in(credentials['email'], credentials['password'])
- WebDriverWait(self.selenium, 10).until(lambda s: self.header.logged_in)
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: self.header.logged_in,
+ 'Timed-out waiting for the login to complete')
from pages.dashboard_page import DashboardPage
return DashboardPage(self.testsetup)
3  pages/regions/paginator.py
View
@@ -26,4 +26,5 @@ def next(self):
return SearchPage(self.testsetup)
def _wait_for_search_ajax(self):
- WebDriverWait(self.selenium, 10).until(lambda s: not self.is_element_present(*self._results_loading_locator))
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._results_loading_locator),
+ 'The page load spinner did not disappear before the timeout')
3  pages/search_page.py
View
@@ -130,7 +130,8 @@ def move_activity_slider(self, notches):
self._wait_for_search_ajax()
def _wait_for_search_ajax(self):
- WebDriverWait(self.selenium, 10).until(lambda s: not self.is_element_present(*self._results_loading_locator))
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._results_loading_locator),
+ 'The search results spinner did not disappear before the timeout')
@property
def paginator(self):
Please sign in to comment.
Something went wrong with that request. Please try again.