Beispiel #1
0
 def test_full_search_result_click_category(self, current_language, side):
     main = MainPage(self.driver)
     full_search_result = FullSearchResultPage(self.driver)
     category = CatalogPage(self.driver)
     self.driver.get(TEST_URL)
     self.change_language(self.driver, current_language)
     main.click_search_field()
     main.fill_search_field(self.brand)
     expected_category_name = f"{full_search_result.text_first_category(side).upper()} {self.brand.upper()}"
     expected_category_url = full_search_result.url_first_category(side)
     full_search_result.click_first_category(side)
     assert category.check_title(expected_category_name)
     assert expected_category_url == self.driver.current_url
Beispiel #2
0
 def test_full_search_result_click_group(self, current_language):
     main = MainPage(self.driver)
     full_search_result = FullSearchResultPage(self.driver)
     group = CatalogPage(self.driver)
     self.driver.get(TEST_URL)
     self.change_language(self.driver, current_language)
     main.click_search_field()
     main.fill_search_field(self.brand)
     expected_group_name = full_search_result.text_first_group.strip()
     expected_group_url = full_search_result.url_first_group
     full_search_result.click_first_group()
     assert group.check_title(expected_group_name.upper())
     assert expected_group_url == self.driver.current_url