コード例 #1
0
ファイル: test_myaccount.py プロジェクト: elyezer/robottelo
    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()
コード例 #2
0
ファイル: test_user.py プロジェクト: SatelliteQE/robottelo
    def test_positive_update_language(self):
        """Update Language in User

        @id: 64b6a90e-0d4c-4a55-a4bd-7347010e39f2

        @Assert: User is updated successfully
        """
        locale = random.choice(list(LANGUAGES.keys()))
        username = gen_string('alpha')
        with Session(self.browser) as session:
            make_user(session, username=username)
            self.user.update(username, locale=locale)
            self.user.validate_user(username, 'language', locale, False)
コード例 #3
0
ファイル: test_user.py プロジェクト: chbrown13/robottelo
    def test_positive_update_language(self):
        """Update Language in User

        :id: 64b6a90e-0d4c-4a55-a4bd-7347010e39f2

        :expectedresults: User is updated successfully

        :CaseImportance: Critical
        """
        locale = random.choice(list(LANGUAGES.keys()))
        username = gen_string('alpha')
        with Session(self.browser) as session:
            make_user(session, username=username)
            self.user.update(username, locale=locale)
            self.user.validate_user(username, 'language', locale, False)
コード例 #4
0
    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'))
コード例 #5
0
    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'))