Exemplo n.º 1
0
def step_impl(context, name, visible, duration, color):
    # nacteni dat kurzu do kontextu
    load_data_to_context(context, name, visible, duration, color)
    # klikni v menu na nastaveni
    helpers.open_settings(context.browser)
    # pockej na nacteni a pak klikni na Pridat kurz
    helpers.wait_loading_ends(context.browser)
    button_add_course = context.browser.find_element_by_css_selector(
        "[data-qa=button_add_course]")
    button_add_course.click()
    # uloz puvodni pocet kurzu
    save_old_courses_cnt_to_context(context)
    # vloz vsechny udaje do formulare
    insert_to_form(context)
    # odesli formular
    helpers.submit_form(context, "button_submit_settings")
Exemplo n.º 2
0
def step_impl(context, cur_name, new_name, new_visible):
    # nacti data stavu ucasti do kontextu
    load_data_to_context(context, new_name, new_visible)
    # klikni v menu na nastaveni
    helpers.open_settings(context.browser)
    # pockej na nacteni
    helpers.wait_loading_ends(context.browser)
    # najdi stav ucasti a klikni u nej na Upravit
    attendancestate_to_update = find_attendancestate(context, cur_name)
    assert attendancestate_to_update
    button_edit_attendancestate = attendancestate_to_update.find_element_by_css_selector(
        "[data-qa=button_edit_attendancestate]")
    button_edit_attendancestate.click()
    # uloz puvodni pocet stavu ucasti
    save_old_attendancestates_cnt_to_context(context)
    # over spravne zobrazene udaje ve formulari a vloz do nej vsechny udaje
    insert_to_form(context, True)
    # odesli formular
    helpers.submit_form(context, "button_submit_settings")
Exemplo n.º 3
0
def step_impl(context, name):
    # nacti jmeno kurzu do kontextu
    load_id_data_to_context(context, name)
    # klikni v menu na nastaveni
    helpers.open_settings(context.browser)
    # pockej na nacteni
    helpers.wait_loading_ends(context.browser)
    # najdi kurz a klikni u nej na Upravit
    course_to_update = find_course(context, context.name)
    assert course_to_update
    button_edit_course = course_to_update.find_element_by_css_selector(
        "[data-qa=button_edit_course]")
    button_edit_course.click()
    # uloz puvodni pocet kurzu
    save_old_courses_cnt_to_context(context)
    # pockej az bude viditelny formular
    helpers.wait_form_settings_visible(context.browser)
    # klikni na smazat
    button_delete_course = context.browser.find_element_by_css_selector(
        "[data-qa=settings_button_delete]")
    button_delete_course.click()
    # a potvrd smazani
    helpers.wait_for_alert_and_accept(context.browser)