Exemplo n.º 1
0
def test_successful_sign_up_helping(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    page.select_helping_category()
    page.type_name('Automated test')
    page.type_email('*****@*****.**')
    page.select_country('United Kingdom')
    page.select_text_format()
    page.accept_privacy_policy()
    page.click_start_contributing()
    assert '/{0}'.format('?c=helping') in selenium.current_url, 'Category is not in URL'
Exemplo n.º 2
0
def test_sign_up_fails_when_missing_required_fields(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    with pytest.raises(TimeoutException):
        page.click_start_contributing()
Exemplo n.º 3
0
def test_toggle_category_with_areas(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    page.select_coding_category()
    assert page.is_areas_region_displayed
    assert page.is_coding_area_displayed
    assert page.is_coding_area_required
Exemplo n.º 4
0
def test_toggle_category_without_areas(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    page.select_helping_category()
    assert not page.is_areas_region_displayed
Exemplo n.º 5
0
def test_sign_up_fails_when_missing_required_fields(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    with pytest.raises(TimeoutException):
        page.click_start_contributing()
Exemplo n.º 6
0
def test_successful_sign_up_helping(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    page.select_helping_category()
    page.type_name('Automated test')
    page.type_email('*****@*****.**')
    page.select_country('United Kingdom')
    page.select_text_format()
    page.accept_privacy_policy()
    page.click_start_contributing()
    assert '/{0}'.format(
        '?c=helping') in selenium.current_url, 'Category is not in URL'
Exemplo n.º 7
0
def test_toggle_category_without_areas(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    page.select_helping_category()
    assert not page.is_areas_region_displayed
Exemplo n.º 8
0
def test_toggle_category_with_areas(base_url, selenium):
    page = ContributeSignUpPage(base_url, selenium).open()
    page.select_coding_category()
    assert page.is_areas_region_displayed
    assert page.is_coding_area_displayed
    assert page.is_coding_area_required
Exemplo n.º 9
0
def test_successful_sign_up_coding(base_url, selenium):
    page = ContributeSignUpPage(selenium, base_url).open()
    page.select_coding_category()
    page.select_coding_area('Firefox')
    page.type_name('Automated test')
    page.type_email('*****@*****.**')
    page.select_country('United Kingdom')
    page.select_text_format()
    page.accept_privacy_policy()
    page.click_start_contributing()
    assert '/{0}'.format('?c=coding') in selenium.current_url, 'Category is not in URL'