예제 #1
0
def test_successful_sign_up(base_url, selenium):
    page = ContributeFriendsPage(selenium, base_url).open()
    page.type_email('*****@*****.**')
    page.select_country('Germany')
    page.accept_privacy_policy()
    page.click_sign_me_up()
    assert page.sign_up_successful
예제 #2
0
def test_signup_default_values(base_url, selenium):
    page = ContributeFriendsPage(base_url, selenium).open()
    page.click_show_signup_form()
    assert page.is_signup_form_displayed
    assert '' == page.email
    assert 'United States' == page.country
    assert page.html_format_selected
    assert not page.text_format_selected
    assert not page.privacy_policy_accepted
    assert page.is_privacy_policy_link_displayed
예제 #3
0
def test_display_signup_form(base_url, selenium):
    page = ContributeFriendsPage(base_url, selenium).open()
    page.click_show_signup_form()
    assert page.is_signup_form_displayed
예제 #4
0
def test_sign_up_fails_when_missing_required_fields(base_url, selenium):
    page = ContributeFriendsPage(selenium, base_url).open()
    with pytest.raises(TimeoutException):
        page.click_sign_me_up()
예제 #5
0
def test_successful_sign_up(base_url, selenium):
    page = ContributeFriendsPage(selenium, base_url).open()
    page.type_email('*****@*****.**')
    page.select_country('Germany')
    page.select_text_format()
    page.accept_privacy_policy()
    page.click_sign_me_up()
    assert page.sign_up_successful
예제 #6
0
def test_click_fx_and_you(base_url, selenium):
    page = ContributeFriendsPage(selenium, base_url).open()
    assert page.newsletters == 'firefox-friends'
    page.accept_fx_and_you()
    assert page.newsletters == 'firefox-friends,mozilla-and-you'
예제 #7
0
def test_signup_default_values(base_url, selenium):
    page = ContributeFriendsPage(selenium, base_url).open()
    assert '' == page.email
    assert 'United States' == page.country
    assert not page.privacy_policy_accepted
    assert page.is_privacy_policy_link_displayed