예제 #1
0
파일: lectures.py 프로젝트: soon14/UP-admin
def step_impl(context):
    # pockej na update lekci
    helpers.wait_loading_cycle(context.browser)
    # najdi upravovanou lekci
    lecture_to_update = find_lecture(context, context.date, context.time)
    assert lecture_to_update
    # ma lekce opravdu nove udaje?
    assert verify_paid(lecture_to_update, context.new_paid)
예제 #2
0
파일: lectures.py 프로젝트: soon14/UP-admin
def step_impl(context):
    # pockej na update lekci
    helpers.wait_loading_cycle(context.browser)
    # ma lekce opravdu nove udaje?
    assert find_lecture_with_context(context)
    assert lectures_cnt(context.browser) == context.old_lectures_cnt
    # over, ze je modalni okno kompletne zavrene
    assert not helpers.is_modal_class_attr_present(context.browser)
예제 #3
0
def step_impl(context):
    # pockej na update zadosti
    helpers.wait_loading_cycle(context.browser)
    # ma zadost opravdu nove udaje?
    assert find_application_with_context(context)
    assert applications_cnt(context.browser) == context.old_applications_cnt
    assert showed_applications_cnts_for_courses_matches(context.browser)
    # over, ze je modalni okno kompletne zavrene
    assert not helpers.is_modal_class_attr_present(context.browser)
예제 #4
0
def step_impl(context):
    # pockej na update stavu ucasti
    helpers.wait_loading_cycle(context.browser)
    # ma stav ucasti opravdu nove udaje?
    assert find_attendancestate_with_context(context)
    assert attendancestates_cnt(
        context.browser) == context.old_attendancestates_cnt
    # over, ze je modalni okno kompletne zavrene
    assert not helpers.is_modal_class_attr_present(context.browser)
예제 #5
0
def step_impl(context):
    # pockej na update klientu
    helpers.wait_loading_cycle(context.browser)
    # pockej az bude mozne prepinat mezi ne/aktivnimi klienty
    wait_switching_available(context.browser)
    # ma klient opravdu nove udaje?
    assert find_client_with_context(context)
    assert clients_cnt(context.browser) == context.old_clients_cnt
    # over, ze je modalni okno kompletne zavrene
    assert not helpers.is_modal_class_attr_present(context.browser)
예제 #6
0
파일: lectures.py 프로젝트: soon14/UP-admin
def step_impl(context):
    # pockej na update lekci
    helpers.wait_loading_cycle(context.browser)
    # najdi upravovanou lekci
    lecture_to_update = find_lecture(context, context.date, context.time)
    assert lecture_to_update
    # ma lekce opravdu nove udaje?
    assert verify_attendancestate(lecture_to_update,
                                  context.new_attendancestate)
    # pokud se lekce nove zmenila na omluvenou a byla zaplacena, over pridani nahradni lekce
    excused_attendancestate = common_helpers.get_excused_attendancestate()
    if (context.cur_attendancestate != excused_attendancestate
            and context.new_attendancestate == excused_attendancestate
            and verify_paid(lecture_to_update, True)):
        assert lectures_cnt(context.browser) == context.old_lectures_cnt + 1
    else:
        assert lectures_cnt(context.browser) == context.old_lectures_cnt