Skip to content

Commit

Permalink
Patch default language test
Browse files Browse the repository at this point in the history
  • Loading branch information
zm-cttae committed Jun 24, 2024
1 parent 444056a commit a285906
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions componentobjects/language_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

class HealthterLanguageSelectorComponent:
@staticmethod
def language_code(driver: WebDriver):
return driver.find_element(by=By.CSS_SELECTOR, value=".gt-lang-code")
def language_flag(driver: WebDriver):
return driver.find_element(by=By.CSS_SELECTOR, value=".gt-current-lang img")

@staticmethod
def language_options(driver: WebDriver):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_language_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def test_default_title_somali(self):

def test_gt_default_language_somali(self):
driver = self.driver
language_code = HealthterLanguageSelectorComponent.language_code(driver)
self.assertEqual(language_code.text, "SO")
language_code = HealthterLanguageSelectorComponent.language_flag(driver)
self.assertEqual(language_code.get_attribute("alt"), "SO")

def test_gt_language_selector_menu(self):
driver = self.driver
Expand Down

0 comments on commit a285906

Please sign in to comment.