def test_positive_update_language(self): """Update Language in My Account :id: 87604475-3a8e-4cb1-ace4-ea874b1d9e72 :Steps: Update current User with all different Language options :expectedresults: Current User is updated :CaseImportance: Critical """ for lang, locale in LANGUAGES.items(): with self.subTest(lang): user = User(login=gen_alpha(), password='******') user.id = user.create().id with Session(self.browser, user.login, user.password): self.my_account.navigate_to_entity() self.my_account.select( locators['users.language_dropdown'], lang ) self.my_account.click(common_locators['submit']) self.my_account.navigate_to_entity() option = self.my_account.wait_until_element_exists( locators['users.selected_lang']) # Cant use directly lang because its value changes # after updating current language self.assertEqual( locale, option.get_attribute('value') ) user.delete()
def test_positive_update_language(self): """Update Language in My Account :id: 87604475-3a8e-4cb1-ace4-ea874b1d9e72 :Steps: Update current User with all different Language options :expectedresults: Current User is updated :CaseImportance: Critical """ for language, locale in LANGUAGES.items(): with self.subTest(language): password = gen_alpha() user = User(password=password).create() with Session(self.browser, user.login, password): self.my_account.update(language=language) # Cant use directly language because its value changes # after updating current language self.assertEqual( locale, self.my_account.get_field_value('language'))
def test_positive_update_language(self): """Update Language in My Account :id: 87604475-3a8e-4cb1-ace4-ea874b1d9e72 :Steps: Update current User with all different Language options :expectedresults: Current User is updated :CaseImportance: Critical """ for language, locale in LANGUAGES.items(): with self.subTest(language): password = gen_alpha() user = User(password=password).create() with Session(self, user.login, password): self.my_account.update(language=language) # Cant use directly language because its value changes # after updating current language self.assertEqual( locale, self.my_account.get_field_value('language'))