def user_checks_ce_contents(context):
    collection_exercise_details.go_to(context.short_name, context.period)
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_ready_for_review(ce_state), ce_state
    assert collection_exercise_details.ready_for_live_button_exists()
    assert len(collection_exercise_details.get_collection_instruments()) > 0
    sample = collection_exercise_details.get_loaded_sample()
    assert 'Total businesses' in sample
    assert 'Collection instruments' in sample
    assert '1' in sample
def collection_exercise__exists_and_loaded_sample_cis(context):
    collection_exercise_details.go_to(context.short_name, context.period)
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_scheduled(ce_state), ce_state
    collection_exercise_details.load_sample(
        'resources/sample_files/business-survey-sample-date.csv')
    success_text = collection_exercise_details.get_sample_success_text()
    assert success_text == 'Sample loaded successfully'
    collection_exercise_details.load_collection_instrument(
        test_file='resources/collection_instrument_files/064_201803_0001.xlsx')
    success_text = collection_exercise_details.get_success_panel_text()
    assert success_text == 'Collection instrument loaded'
示例#3
0
def view_ce_details(context):
    collection_exercise_details.go_to(context.short_name, context.period)
示例#4
0
def given_internal_user_presented_with_sample_details(context):
    collection_exercise_details.go_to(context.short_name, context.period)
    collection_exercise_details.select_sample('resources/sample_files/business-survey-sample-date.csv')
    assert collection_exercise_details.has_sample_preview()
def internal_user_views_ce_details(context):
    collection_exercise_details.go_to(context.short_name, context.period)
def check_user_is_on_collection_exercise_details_page(context):
    collection_exercise_details.go_to(context.short_name, context.period)
    collection_exercise_details.load_sample(
        'resources/sample_files/business-survey-sample-date.csv')
    collection_exercise_details.get_sample_success_text()
def user_wants_to_remove_loaded_sample(context):
    collection_exercise_details.go_to(context.short_name, context.period)
示例#8
0
def internal_user_views_qbs_2018_collection_exercise(_):
    collection_exercise_details.go_to('QBS', '1803')
def collection_exercise_exists_and_scheduled_displayed(context):
    collection_exercise_details.go_to(context.short_name, context.period)
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_scheduled(ce_state), ce_state
示例#10
0
def ce_details_page_with_loaded_ci(context):
    collection_exercise_details.go_to(context.short_name, context.period)
    collection_exercise_details.load_collection_instrument(
        test_file='resources/collection_instrument_files/064_201803_0001.xlsx')
def internal_user_views_ready_for_live(context):
    collection_exercise_details.go_to(context.short_name, context.period)
    is_text_present_with_retry('Ready for live', 10)
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_ready_for_live(ce_state), ce_state
def select_to_enter_mandatory_event_date(context, event):
    collection_exercise_details.go_to(context.short_name, context.period)
    collection_exercise_details.select_add_date(event)
def check_invalid_event_date_not_persisted(context):
    collection_exercise_details.go_to(context.short_name, context.period)

    assert len(browser.find_by_name("mps-date").text) == 0
def select_to_enter_mandatory_event_date(context, event, day, month, year):
    collection_exercise_details.go_to(context.short_name, context.period)
    collection_exercise_details.select_add_date(event)
    enter_date_for_ce_event(context, day, month, year)
    submit_event_date(context)