def create_conversation_internal(context):
    create_message_external_to_internal(context)
    signed_in_internal(context)
    inbox_internal.go_to_using_context(context)
    go_to_thread()
    create_message_internal.enter_text_in_message_body('Body')
    create_message_internal.click_message_send_button()
def survey_is_set_to_no_longer_required(context):
    signed_in_internal(context)
    go_to_reporting_unit_page(context)
    reporting_unit.click_data_panel(context.short_name)
    reporting_unit.click_change_response_status_link(survey=context.short_name,
                                                     period=context.period)
    mapped_status = map_ce_status('No longer required')
    change_response_status.update_response_status(mapped_status)
def user_completes_survey_by_telephone(context):
    signed_in_internal(context)
    go_to_reporting_unit_page(context)
    reporting_unit.click_data_panel(context.short_name)
    reporting_unit.click_change_response_status_link(survey=context.short_name,
                                                     period=context.period)
    mapped_status = map_ce_status('Completed by phone')
    change_response_status.update_response_status(mapped_status)
def create_message_internal_to_external(context,
                                        subject='Subject',
                                        body='Body'):
    # Send a message from a respondent in the context of a Bricks survey
    # Note that external users may have to be signed in again after calling this function

    # Navigate to sent a message
    try_sign_out()
    signed_in_internal(context)
    go_to_create_message(context)

    # Create message
    create_message_internal.enter_text_in_message_subject(subject)
    create_message_internal.enter_text_in_message_body(body)

    # Send message
    create_message_internal.click_message_send_button()
    logger.debug("Message from internal to external created")
예제 #5
0
def external_user_has_a_conversation(context):
    create_message_external_to_internal(context, 'Message to ONS', 'Message body to ONS')
    signed_in_internal(context)
    reply_to_last_message_internal(context)
    signed_in_respondent(context)
    page_helpers.go_to_first_conversation_in_message_box()
예제 #6
0
def internal_user_replies_to_last_message(context):
    signed_in_internal(context)
    reply_to_last_message_internal(context)
예제 #7
0
def external_user_reply_sent_to_correct_team(context):
    signed_in_internal(context)
    go_to_using_context(context)
    go_to_thread_internal()
    latest_message_body = page_helpers.get_body_from_last_message()
    assert latest_message_body == 'Reply body from respondent'
def navigating_to_reporting_units(context):
    signed_in_internal(context)
    go_to_reporting_unit_page(context)
    reporting_unit.click_data_panel(context.short_name)
    reporting_unit.click_change_response_status_link(survey=context.short_name,
                                                     period=context.period)
def collex_set_to_no_longer_required(context):
    signed_in_internal(context)
    go_to_reporting_unit_page(context)
    reporting_unit.click_data_panel(context.short_name)
def internal_user_receive_message(context):
    create_message_external_to_internal(context)

    # Sending external to internal may sign out the internal user
    signed_in_internal(context)