def assert_collection_exercise_status(context, status):
    reporting_unit.go_to(context.short_name)
    reporting_unit.click_data_panel(context.short_name)
    collection_exericse = reporting_unit.get_collection_exercise(
        context.period, context.short_name)
    assert status in collection_exericse['status'], collection_exericse[
        'status']
def assert_view_response_status_link(context):
    reporting_unit.go_to(context.short_name)
    reporting_unit.click_data_panel(context.short_name)
    response_table = browser.find_by_name('tbl-ce-for-survey')
    rows = response_table.find_by_tag('tbody').find_by_tag('tr')
    for row in rows:
        if context.period in row.text:
            assert browser.is_text_present('Completed by phone View')
示例#3
0
def internal_user_disables_enrolment(_, email):
    reporting_unit.go_to('49900000001')
    reporting_unit.click_data_panel('Bricks')
    reporting_unit.click_change_enrolment(email)
    change_enrolment_status.confirm_change_enrolment_status()
    reporting_unit.click_data_panel('Bricks')
    respondent = reporting_unit.get_respondent('Bricks', email)
    assert respondent['enrolmentStatus'] == 'Disabled'
def respondent_first_name_is_enrolled(context):
    business = get_party_by_ru_ref(context.short_name)
    respondent_id = business['associations'][0]['partyId']
    respondent = get_respondent_details(respondent_id)
    if respondent['firstName'] != 'first_name' \
            or respondent['lastName'] != 'last_name' \
            or respondent['telephone'] != context.phone_number:
        reporting_unit.go_to(context.short_name)
        reporting_unit.click_data_panel(context.short_name)
        reporting_unit.click_edit_details(context.short_name,
                                          context.respondent_email)
        edit_respondent_details_form.edit_first_name('first_name')
        edit_respondent_details_form.edit_last_name('last_name')
        edit_respondent_details_form.edit_contact_number(context.phone_number)
        edit_respondent_details_form.click_save()
def internal_user_views_the_reporting_unit(context):
    reporting_unit.go_to(context.short_name)
def check_account_locked_internally(context):
    reporting_unit.go_to(context.short_name)
    reporting_unit.click_data_panel(context.short_name)
    assert browser.find_by_id('account-status')[0].value == 'Locked'
    assert browser.find_by_id('respondent-unlock-link')[0].value == 'Unlock'
def go_to_reporting_unit_page(context):
    reporting_unit.go_to(context.short_name)
def change_response_status_to_completed_by_phone(context):
    reporting_unit.go_to(context.short_name)
    reporting_unit.click_data_panel(context.short_name)
    internal_user_changes_response_status(context, "Completed by phone")
def open_edit_details_change_email(context):
    reporting_unit.go_to(context.short_name)
    reporting_unit.click_data_panel(context.short_name)
    reporting_unit.click_edit_details(context.short_name,
                                      context.respondent_email)
示例#10
0
def enter_locked_accounts_ru_ref(context):
    reporting_unit.go_to(context.short_name)
示例#11
0
def internal_user_view_ru_details(_):
    reporting_unit.go_to('49900000001')