Ejemplo n.º 1
0
def test_default_values(base_url, selenium):
    page = NewsletterPage(base_url, selenium).open()
    assert '' == page.email
    assert 'United States' == page.country
    assert 'English' == page.language
    assert page.html_format_selected
    assert not page.text_format_selected
    assert not page.privacy_policy_accepted
    assert page.is_privacy_policy_link_displayed
Ejemplo n.º 2
0
def test_sign_up_fails_when_missing_required_fields(base_url, selenium):
    page = NewsletterPage(base_url, selenium).open()
    with pytest.raises(TimeoutException):
        page.click_sign_me_up()
Ejemplo n.º 3
0
def test_successful_sign_up(base_url, selenium):
    page = NewsletterPage(base_url, selenium).open()
    page.type_email("*****@*****.**")
    page.select_country("United Kingdom")
    page.select_language("Polski")
    page.select_text_format()
    page.accept_privacy_policy()
    page.click_sign_me_up()
    assert page.sign_up_successful
Ejemplo n.º 4
0
def test_sign_up_fails_when_missing_required_fields(base_url, selenium):
    page = NewsletterPage(base_url, selenium).open()
    with pytest.raises(TimeoutException):
        page.click_sign_me_up()
Ejemplo n.º 5
0
def test_successful_sign_up(base_url, selenium):
    page = NewsletterPage(base_url, selenium).open()
    page.type_email('*****@*****.**')
    page.select_country('United Kingdom')
    page.select_language('Polski')
    page.select_text_format()
    page.accept_privacy_policy()
    page.click_sign_me_up()
    assert page.sign_up_successful