Ejemplo n.º 1
0
    def test_image_upload(self):
        auth_page = AuthPage(self.driver)
        auth_page.authorize()

        userinfo_page = UserInfoPage(self.driver)
        userinfo_page.input_test_image()

        userinfo_page.click_submit_button()
        userinfo_page.wait_for_ok_after_submit()
Ejemplo n.º 2
0
    def test_open_help(self):
        auth_page = AuthPage(self.driver)
        auth_page.authorize()

        userinfo_page = UserInfoPage(self.driver)

        userinfo_page.click_on_help()
        userinfo_page.switch_to_window(1)
        userinfo_page.wait_for_help()
Ejemplo n.º 3
0
    def test_correct_input(self):
        auth_page = AuthPage(self.driver)
        auth_page.authorize()

        userinfo_page = UserInfoPage(self.driver)

        userinfo_page.input_firstname(randomString())
        userinfo_page.input_lastname(randomString())
        userinfo_page.input_nickname(randomString())

        userinfo_page.click_submit_button()
        userinfo_page.wait_for_ok_after_submit()
Ejemplo n.º 4
0
    def test(self):
        auth_page = AuthPage(self.driver)
        auth_page.open()
        auth_page.authorize()

        userinfo_page = UserinfoPage(self.driver)
        userinfo_page.open()
        userinfo_form = userinfo_page.form
        userinfo_form.set_town(self.TOWN_PREFIX)
        userinfo_form.wait_for_last_suggest(self.SUGGEST_LIST[-1])
        self.assertEqual(self.SUGGEST_LIST,
                         userinfo_form.get_suggests_for_town())
Ejemplo n.º 5
0
    def test(self):
        auth_page = AuthPage(self.driver)
        auth_page.open()
        auth_page.authorize()

        userinfo_page = UserinfoPage(self.driver)
        userinfo_page.open()
        userinfo_form = userinfo_page.form
        userinfo_form.set_town(self.WRONG_TOWN_NAME)
        userinfo_form.wait_for_suggests_invisible()
        userinfo_form.save()
        self.assertEqual(self.TOP_MESSAGE, userinfo_form.get_top_message())
        self.assertEqual(self.TOWN_ERROR, userinfo_form.get_town_message())
Ejemplo n.º 6
0
    def test(self):
        auth_page = AuthPage(self.driver)
        auth_page.open()
        auth_page.authorize()

        userinfo_page = UserinfoPage(self.driver)
        userinfo_page.open()
        userinfo_form = userinfo_page.form
        userinfo_form.set_surname(self.LONG_SURNAME)
        userinfo_form.save()
        self.assertEqual(self.TOP_MESSAGE, userinfo_form.get_top_message())
        self.assertEqual(self.SURNAME_ERROR,
                         userinfo_form.get_surname_message())
Ejemplo n.º 7
0
    def setUp(self):
        browser = os.environ.get('BROWSER', 'CHROME')

        self.driver = Remote(command_executor='http://127.0.0.1:4444/wd/hub',
                             desired_capabilities=getattr(
                                 DesiredCapabilities, browser).copy())

        auth_page = AuthPage(self.driver)
        auth_page.open()
        auth_page.authorize()

        self.userinfo_page = UserinfoPage(self.driver)
        self.userinfo_page.open()
        self.userinfo_form = self.userinfo_page.form
Ejemplo n.º 8
0
    def test_logout(self):
        auth_page = AuthPage(self.driver)
        auth_page.authorize()

        userinfo_page = UserInfoPage(self.driver)
        userinfo_page.open_settings_in_new_window()
        userinfo_page.wait_for_ok_after_submit()

        userinfo_page.click_logout_button()
        userinfo_page.wait_for_logout()

        userinfo_page.switch_to_window(0)
        userinfo_page.resresh_page()
        userinfo_page.match_to_login_URI()
Ejemplo n.º 9
0
    def test_date_lists(self):
        auth_page = AuthPage(self.driver)
        auth_page.authorize()

        userinfo_page = UserInfoPage(self.driver)

        userinfo_page.click_on_day_input()
        userinfo_page.click_on_day_child_input()
        userinfo_page.click_on_month_input()
        userinfo_page.click_on_month_child_input()
        userinfo_page.click_on_year_input()
        userinfo_page.click_on_year_child_input()

        userinfo_page.click_submit_button()
        userinfo_page.wait_for_ok_after_submit()
Ejemplo n.º 10
0
    def test(self):
        auth_page = AuthPage(self.driver)
        auth_page.open()
        auth_page.authorize()

        userinfo_page = UserinfoPage(self.driver)
        userinfo_page.open()
        userinfo_form = userinfo_page.form

        unselected_gender_before = userinfo_form.get_unselected_gender()
        unselected_gender_before_id = unselected_gender_before.id
        unselected_gender_before.click()
        userinfo_form.save()

        userinfo_page.open()
        userinfo_form = userinfo_page.form

        unselected_gender_after = userinfo_form.get_unselected_gender()
        unselected_gender_after_id = unselected_gender_after.id
        self.assertNotEqual(unselected_gender_before_id,
                            unselected_gender_after_id)