Example #1
0
class UsernameChangeSuccessTests(unittest.TestCase):
    new_login = "******"

    def setUp(self):
        default_setup(self)
        setup_auth(self)
        self.setting_page = SettingPage(self.driver)
        self.profile_page = ProfilePage(self.driver)
        self.setting_page.open()

    def tearDown(self):
        self.setting_page.open()
        self.setting_page.change_username(self.LOGIN)
        self.driver.quit()

    def test_change_password(self):
        self.setting_page.change_username(self.new_login)
        self.setting_page.submit()
        current_login = self.profile_page.get_username()
        self.assertEqual(current_login, self.new_login)
Example #2
0
def get_profile_login(t):
    profile_page = ProfilePage(t.driver)
    profile_page.open()
    return profile_page.get_username()