def test_everything(driver, profile, base_url, base_api_url):
    do_user_registration(driver, profile, base_url)
    test_ids = get_service_templates_and_api_key_for_tests(driver, profile)

    client = NotificationsAPIClient(
        base_url=base_api_url,
        service_id=test_ids['service_id'],
        api_key=test_ids['api_key']
    )

    upload_csv_page = UploadCsvPage(driver)

    email_notification_id = send_notification_via_csv(profile, upload_csv_page, 'email')
    email_notification = retry_call(
        get_notification_by_id_via_api,
        fargs=[client, email_notification_id, ['sending', 'delivered']],
        tries=Config.NOTIFICATION_RETRY_TIMES,
        delay=Config.NOTIFICATION_RETRY_INTERVAL
    )
    assert_notification_body(email_notification_id, email_notification)

    sms_notification_id = send_notification_via_csv(profile, upload_csv_page, 'sms')
    sms_notification = retry_call(
        get_notification_by_id_via_api,
        fargs=[client, sms_notification_id, ['sending', 'delivered']],
        tries=Config.NOTIFICATION_RETRY_TIMES,
        delay=Config.NOTIFICATION_RETRY_INTERVAL
    )
    assert_notification_body(sms_notification_id, sms_notification)

    do_edit_and_delete_email_template(driver)
    do_user_can_invite_someone_to_notify(driver, profile, base_url)
def test_registration_and_invite_flow(driver, profile, base_url):
    do_user_registration(driver, profile, base_url)
    do_user_can_invite_someone_to_notify(driver, profile, base_url)