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()
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
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()
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()
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
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
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()
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