예제 #1
0
def test_get_firefox_qr_code(base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url, locale='sv-SE').open()
    modal = page.click_primary_modal_button()
    assert modal.is_displayed
    assert not page.send_to_device.is_displayed
    assert page.is_firefox_qr_code_displayed
    modal.close()
예제 #2
0
def test_send_to_device_success(base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url).open()
    assert not page.is_firefox_qr_code_displayed
    send_to_device = page.send_to_device
    send_to_device.type_email('*****@*****.**')
    send_to_device.click_send()
    assert send_to_device.send_successful
예제 #3
0
def test_get_firefox_send_to_device_fails_when_missing_required_fields(
        base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url).open()
    modal = page.click_primary_modal_button()
    assert modal.is_displayed
    with pytest.raises(TimeoutException):
        page.send_to_device.click_send()
예제 #4
0
def test_primary_get_firefox_send_to_device_success(base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url).open()
    modal = page.click_primary_modal_button()
    assert modal.is_displayed
    assert not page.is_firefox_qr_code_displayed
    send_to_device = page.send_to_device
    send_to_device.type_email('*****@*****.**')
    send_to_device.click_send()
    assert send_to_device.send_successful
    modal.close()
예제 #5
0
def test_send_to_device_failure(base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url).open()
    send_to_device = page.send_to_device
    send_to_device.type_email('invalid@email')
    send_to_device.click_send(expected_result='error')
    assert send_to_device.is_form_error_displayed
예제 #6
0
def test_get_firefox_qr_code(base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url, locale='sv-SE').open()
    assert not page.send_to_device.is_displayed
    assert page.is_firefox_qr_code_displayed
예제 #7
0
def test_get_firefox_send_to_device_fails_when_missing_required_fields(
        base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url).open()
    with pytest.raises(TimeoutException):
        page.send_to_device.click_send()
예제 #8
0
def test_modal_button_displayed(base_url, selenium):
    page = FirefoxWelcomePage4(selenium, base_url).open()
    assert page.is_primary_modal_button_displayed
    assert page.is_secondary_modal_button_displayed