コード例 #1
0
 def test_sign_out(self, browser_fixture, data_fixture_js):
     session_email = data_fixture_js["session_email"]
     session_password = data_fixture_js["session_password"]
     sign_in_page = SignInSearchHelper(browser_fixture)
     common = CommonSearchHelper(browser_fixture)
     sign_in_page.go_to_sign_in_page()
     sign_in_page.type_sign_in_email(session_email)
     sign_in_page.type_sign_in_password(session_password)
     sign_in_page.click_sign_in_btn()
     common.click_sign_out()
     assert session_email not in common.navbar_items()
コード例 #2
0
 def test_sign_up(self, browser_fixture):
     sign_up_email = "".join(random.choices(string.ascii_lowercase, k=6))\
                     + "@i.ua"
     sign_up_password = "".join(random.choices(string.ascii_lowercase, k=6))
     sign_up_page = SignUpSearchHelper(browser_fixture)
     common = CommonSearchHelper(browser_fixture)
     sign_up_page.go_to_sign_up_page()
     sign_up_page.type_sign_up_email(sign_up_email)
     sign_up_page.type_sign_up_password(sign_up_password)
     sign_up_page.click_sign_up_btn()
     assert sign_up_email in common.navbar_items()
     common.click_sign_out()
コード例 #3
0
 def test_sign_up_invalid_email_password(self, browser_fixture,
                                         data_fixture_js, test_input,
                                         expected):
     if not TestSignUpNegative.user_created:
         create_user = TestHelper()
         create_user.create_user(browser_fixture)
         TestSignUpNegative.user_created = True
     sign_up_email = test_input["email"]
     sign_up_password = test_input["password"]
     sign_up_page = SignUpSearchHelper(browser_fixture)
     common = CommonSearchHelper(browser_fixture)
     sign_up_page.go_to_sign_up_page()
     sign_up_page.type_sign_up_email(sign_up_email)
     sign_up_page.type_sign_up_password(sign_up_password)
     sign_up_page.click_sign_up_btn()
     assert sign_up_email not in common.navbar_items()
コード例 #4
0
 def test_sign_up_bad_email_format(self, browser_fixture, test_input,
                                   expected):
     session_email = test_input["email"]
     session_password = test_input["password"]
     sign_up_page = SignUpSearchHelper(browser_fixture)
     common = CommonSearchHelper(browser_fixture)
     sign_up_page.go_to_sign_up_page()
     sign_up_page.type_sign_up_email(session_email)
     sign_up_page.type_sign_up_password(session_password)
     sign_up_page.click_sign_up_btn()
     email_field = sign_up_page.driver.switch_to_active_element()
     header = sign_up_page.sign_up_page_header()
     placeholder = email_field.get_attribute("placeholder")
     assert session_email not in common.navbar_items()
     assert header == "Sign up"
     assert placeholder == "Email"