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'
def refresh_ready_for_live(_):
    collection_exercise_details.click_refresh_link_until_ready_for_live()
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_ready_for_live(ce_state), ce_state
def view_ready_for_live(_):
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_setting_ready_for_live(ce_state), ce_state
    info_panel = collection_exercise_details.get_processing_info()
    assert 'Processing' in info_panel
예제 #5
0
def ce_details_state_is_created(_):
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_created(ce_state), ce_state
예제 #6
0
def ce_details_state_is_displayed(_):
    ce_state = collection_exercise_details.get_status()
    assert ce_state != ''
def ce_details_state_is_scheduled(_):
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_scheduled(ce_state), ce_state
    events = collection_exercise_details.get_collection_exercise_events()
    assert all((value) for value in events.values())
def collection_exercise_returns_to_scheduled(_):
    ce_status = collection_exercise_details.get_status()
    assert ce_status == "Scheduled"
def collection_exercise_has_hit_ready_for_live(_):
    ce_status = collection_exercise_details.get_status()
    assert ce_status == "Ready for live"
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
예제 #11
0
def check_collection_exercise_state(_):
    ce_state = collection_exercise_details.get_status()
    assert collection_exercise.is_ready_for_live(ce_state)
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