Beispiel #1
0
def test_get_firefox_qr_code(base_url, selenium):
    page = FirefoxWelcomePage5(selenium, base_url, locale='it').open()
    modal = page.click_primary_modal_button()
    assert modal.is_displayed
    assert not page.send_to_device.is_displayed
    assert page.is_lockwise_qr_code_displayed
    modal.close()
Beispiel #2
0
def test_get_firefox_send_to_device_fails_when_missing_required_fields(
        base_url, selenium):
    page = FirefoxWelcomePage5(selenium, base_url).open()
    modal = page.click_primary_modal_button()
    assert modal.is_displayed
    with pytest.raises(TimeoutException):
        page.send_to_device.click_send()
Beispiel #3
0
def test_send_to_device_failure(base_url, selenium):
    page = FirefoxWelcomePage5(selenium, base_url).open()
    modal = page.click_primary_modal_button()
    assert modal.is_displayed
    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
Beispiel #4
0
def test_send_to_device_success(base_url, selenium):
    page = FirefoxWelcomePage5(selenium, base_url).open()
    modal = page.click_primary_modal_button()
    assert modal.is_displayed
    assert not page.is_lockwise_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()
Beispiel #5
0
def test_modal_button_displayed(base_url, selenium):
    page = FirefoxWelcomePage5(selenium, base_url).open()
    assert page.is_primary_modal_button_displayed
    assert page.is_secondary_modal_button_displayed