Skip to content

Commit

Permalink
#961 Fix hardcoded selenium crumbs tests
Browse files Browse the repository at this point in the history
  • Loading branch information
duker33 committed Sep 24, 2019
1 parent 5f84240 commit c2b2803
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions shopelectro/tests/tests_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@ def test_breadcrumbs(self):
self.browser.get(self.root_category)
self.wait_page_loading()
crumbs = self.browser.find_elements_by_class_name('breadcrumbs-item')

self.assertEqual(len(crumbs), 2)
# Crumbs list: Main -> Catalog -> RootCategory
self.assertEqual(len(crumbs), 3)

# In 'deep category' there should be more crumbs
self.browser.get(self.children_category)
crumbs = self.browser.find_elements_by_class_name('breadcrumbs-item')

self.assertEqual(len(crumbs), 3)
# Crumbs list: Main -> Catalog -> RootCategory -> ChildCategory
self.assertEqual(len(crumbs), 4)

def test_loaded_products_count(self):
"""Any CategoryPage should contain predefined products count by default."""
Expand Down Expand Up @@ -431,7 +431,8 @@ def test_breadcrumbs(self):
"""
# There should be 6 items in breadcrumbs for this case
crumbs = self.browser.find_elements_by_class_name('breadcrumbs-item')
self.assertEqual(len(crumbs), 5)
# Crumbs list: Main -> Catalog -> RootCategory -> MiddleCategory -> LeastCategory -> Product
self.assertEqual(len(crumbs), 6)

def test_ui_elements(self):
"""
Expand Down

0 comments on commit c2b2803

Please sign in to comment.