示例#1
0
def test_newsletter_successful_sign_up(base_url, selenium):
    page = ContributePage(base_url, selenium).open()
    page.newsletter.expand_form()
    page.newsletter.type_email('*****@*****.**')
    page.newsletter.select_country('United Kingdom')
    page.newsletter.select_text_format()
    page.newsletter.accept_privacy_policy()
    page.newsletter.click_sign_me_up()
    assert page.newsletter.sign_up_successful
示例#2
0
def test_newsletter_default_values(base_url, selenium):
    page = ContributePage(base_url, selenium).open()
    page.newsletter.expand_form()
    assert '' == page.newsletter.email
    assert 'United States' == page.newsletter.country
    assert page.newsletter.html_format_selected
    assert not page.newsletter.text_format_selected
    assert not page.newsletter.privacy_policy_accepted
    assert page.newsletter.is_privacy_policy_link_displayed
示例#3
0
def test_newsletter_sign_up_fails_when_missing_required_fields(
        base_url, selenium):
    page = ContributePage(base_url, selenium).open()
    page.newsletter.expand_form()
    with pytest.raises(TimeoutException):
        page.newsletter.click_sign_me_up()
示例#4
0
def test_next_event_is_displayed(base_url, selenium):
    page = ContributePage(base_url, selenium).open()
    assert page.next_event_is_displayed
示例#5
0
def test_play_video(base_url, selenium):
    page = ContributePage(base_url, selenium).open()
    video = page.play_video()
    assert video.is_displayed
    video.close()
示例#6
0
def test_play_video(base_url, selenium):
    page = ContributePage(base_url, selenium).open()
    video = page.play_video()
    assert video.is_displayed
    video.close()