def create_multiple_messages_external_to_internal(context,
                                                  number_of_messages,
                                                  subject='Subject',
                                                  body='Body'):
    signed_in_respondent(context)

    for i in range(number_of_messages):
        surveys_todo.go_to()
        surveys_todo.select_to_create_message()

        create_message_external.enter_valid_subject(f"{subject}_{str(i)}")
        create_message_external.enter_valid_body(f"{body}_{str(i)}")

        create_message_external.send_message()
def create_message_external_to_internal(context,
                                        subject='Subject',
                                        body='Body'):
    # Send a message from a respondent in the context of a Bricks survey
    # Note that internal users may have to be signed in again after calling this function

    # Navigate to send a message
    signed_in_respondent(context)
    surveys_todo.go_to()
    surveys_todo.select_to_create_message()

    # Create message
    create_message_external.enter_valid_subject(subject)
    create_message_external.enter_valid_body(body)

    # Send message
    create_message_external.send_message()
    logger.debug("Message from external to internal created")
Example #3
0
def external_user_can_see_message(context):
    signed_in_respondent(context)
    surveys_todo.go_to()
    page_helpers.go_to_first_conversation_in_message_box()
    context.browser_url = browser.url
def respondent_has_eq_ce_available(context):
    surveys_todo.go_to()
def status_set_to_completed(_):
    surveys_todo.go_to()
    go_to_history_tab()
    assert browser.find_by_text('Complete')
def survey_set_to_in_progress(_):
    surveys_todo.go_to()
    status = WebDriverWait(browser, timeout=60, poll_frequency=5, ignored_exceptions=ElementDoesNotExist). \
        until(wait_for_text_on_screen)
    assert status[0].text == 'Downloaded'
Example #7
0
def view_surveys_todo(_, email):
    sign_in_respondent.signed_in_respondent_with_email(email)
    surveys_todo.go_to()