Permalink
Browse files

pep8 review

  • Loading branch information...
1 parent 03a22f7 commit ed02208260f29e0e04c9ab31d40c2b9893839264 Alex Lakatos committed Feb 13, 2013
Showing with 14 additions and 13 deletions.
  1. +1 −1 page.py
  2. +4 −4 pages/dashboard_page.py
  3. +3 −2 pages/editor_page.py
  4. +2 −2 pages/home_page.py
  5. +1 −1 pages/login_page.py
  6. +1 −1 pages/regions/paginator.py
  7. +1 −1 pages/search_page.py
  8. +1 −1 tests/test_search.py
View
@@ -23,7 +23,7 @@ def __init__(self, testsetup):
def is_the_current_page(self):
if self._page_title:
WebDriverWait(self.selenium, 10).until(lambda s: self.selenium.title,
- 'A page title did not appear before the timeout')
+ 'A page title did not appear before the timeout')
Assert.equal(self.selenium.title, self._page_title)
return True
View
@@ -98,7 +98,7 @@ def click_edit(self):
if 'Add-ons' in self._base_locator[1]:
from pages.editor_page import AddonEditorPage
- return AddonEditorPage(self.testsetup)
+ return AddonEditorPage(self.testsetup)
elif 'Libraries' in self._base_locator[1]:
from pages.editor_page import LibraryEditorPage
return LibraryEditorPage(self.testsetup)
@@ -109,17 +109,17 @@ def click_delete(self):
def confirm_delete(self):
self.selenium.find_element(*self._confirm_delete_locator).click()
WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._root_locator),
- 'Package %s did not disappear from the DOM before the timeout' % self.lookup)
+ 'Package %s did not disappear from the DOM before the timeout' % self.lookup)
def click_public(self):
self._root_element.find_element(*self._public_locator).click()
WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._root_locator),
- 'Package %s did not disappear from the DOM before the timeout' % self.lookup)
+ 'Package %s did not disappear from the DOM before the timeout' % self.lookup)
def click_private(self):
self._root_element.find_element(*self._private_locator).click()
WebDriverWait(self.selenium, self.timeout).until(lambda s: not self.is_element_present(*self._root_locator),
- 'Package %s did not disappear from the DOM before the timeout' % self.lookup)
+ 'Package %s did not disappear from the DOM before the timeout' % self.lookup)
@property
def name(self):
View
@@ -58,17 +58,18 @@ def tab(self, lookup):
def _wait_for_save(self):
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')
+ 'The save spinner did not disappear before the timeout')
def _wait_for_copy(self):
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')
+ 'The save spinner did not disappear before the timeout')
class AddonEditorPage(EditorPage):
#Addon class add here the items that are specific for addon edit page
pass
+
class LibraryEditorPage(EditorPage):
#Addon class add here the items that are specific for library edit page
pass
View
@@ -28,7 +28,7 @@ def click_create_addon_btn(self):
from pages.editor_page import AddonEditorPage
addon_editor = AddonEditorPage(self.testsetup)
WebDriverWait(self.selenium, self.timeout).until(lambda s: addon_editor.tab(0).selected,
- 'The editor tab did not appear before the timeout')
+ 'The editor tab did not appear before the timeout')
self.add_id()
return addon_editor
@@ -37,6 +37,6 @@ def click_create_lib_btn(self):
from pages.editor_page import LibraryEditorPage
library_editor = LibraryEditorPage(self.testsetup)
WebDriverWait(self.selenium, self.timeout).until(lambda s: library_editor.tab(0).selected,
- 'The editor tab did not appear before the timeout')
+ 'The editor tab did not appear before the timeout')
self.add_id()
return library_editor
View
@@ -29,7 +29,7 @@ def login(self, user="default"):
pop_up.sign_in(credentials['email'], credentials['password'])
WebDriverWait(self.selenium, self.timeout).until(lambda s: self.header.logged_in,
- 'Timed-out waiting for the login to complete')
+ 'Timed-out waiting for the login to complete')
from pages.dashboard_page import DashboardPage
return DashboardPage(self.testsetup)
@@ -27,4 +27,4 @@ def next(self):
def _wait_for_search_ajax(self):
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')
+ 'The page load spinner did not disappear before the timeout')
View
@@ -145,7 +145,7 @@ def move_activity_slider(self, notches):
def _wait_for_search_ajax(self):
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')
+ 'The search results spinner did not disappear before the timeout')
@property
def paginator(self):
View
@@ -292,7 +292,7 @@ def test_default_search_order_is_by_activity(self, mozwebqa):
while searchpage_obj.paginator.is_next_visible:
for lookup in range(1, searchpage_obj.addons_element_count + 1):
addons_activity_property_list.append(
- searchpage_obj.addon(lookup).activity_rating)
+ searchpage_obj.addon(lookup).activity_rating)
Assert.is_sorted_descending(addons_activity_property_list, 'The addons are not sorted by Activity')
searchpage_obj.paginator.next()

0 comments on commit ed02208

Please sign in to comment.