Beispiel #1
0
def test_get_firefox_nav_button(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_firefox_nav_button()
    assert modal.is_displayed
    assert page.send_to_device.is_displayed
    assert not page.is_firefox_qr_code_displayed
    modal.close()
Beispiel #2
0
def test_get_firefox_nav_button(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_firefox_nav_button()
    assert modal.is_displayed
    assert page.send_to_device.is_displayed
    assert not page.is_firefox_qr_code_displayed
    modal.close()
Beispiel #3
0
def test_get_firefox_send_to_device_fails_when_missing_required_fields(
        base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_firefox_header_button()
    assert modal.is_displayed
    with pytest.raises(TimeoutException):
        page.send_to_device.click_send()
Beispiel #4
0
def test_get_firefox_send_to_device_success(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_firefox_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
Beispiel #5
0
def test_get_firefox_send_to_device_success(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_firefox_header_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()
Beispiel #6
0
def test_get_firefox_qr_code(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url, locale='sv-SE').open()
    assert not page.send_to_device.is_displayed
    assert page.is_firefox_qr_code_displayed
Beispiel #7
0
def test_get_firefox_send_to_device_fails_when_missing_required_fields(
        base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    with pytest.raises(TimeoutException):
        page.send_to_device.click_send()
Beispiel #8
0
def test_get_focus_header_button(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_focus_header_button()
    assert modal.is_displayed
    assert page.is_focus_qr_code_displayed
    modal.close()
Beispiel #9
0
def test_get_firefox_send_to_device_fails_when_missing_required_fields(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_firefox_header_button()
    assert modal.is_displayed
    with pytest.raises(TimeoutException):
        page.send_to_device.click_send()
Beispiel #10
0
def test_get_focus_header_button(base_url, selenium):
    page = FirefoxMobilePage(selenium, base_url).open()
    modal = page.click_get_focus_header_button()
    assert modal.is_displayed
    assert page.is_focus_qr_code_displayed
    modal.close()
Beispiel #11
0
def test_send_to_device_failure(base_url, selenium):
    page = FirefoxMobilePage(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