def i_can_modify_the_display_name(step):
    # Verifying that the display name can be a string containing a floating point value
    # (to confirm that we don't throw an error because it is of the wrong type).
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.css_fill('.wrapper-comp-setting .setting-input', '3.4', index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input', index=index)
    verify_modified_display_name()
Exemplo n.º 2
0
def set_weight(weight):
    index = world.get_setting_entry_index(PROBLEM_WEIGHT)
    world.css_fill('.wrapper-comp-setting .setting-input', weight, index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input',
                            index=index,
                            event='blur')
        world.trigger_event('a.save-button', event='focus')
Exemplo n.º 3
0
def i_can_modify_the_display_name(_step):
    # Verifying that the display name can be a string containing a floating point value
    # (to confirm that we don't throw an error because it is of the wrong type).
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.css_fill('.wrapper-comp-setting .setting-input', '3.4', index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input', index=index)
    verify_modified_display_name()
Exemplo n.º 4
0
def set_the_max_attempts(step, max_attempts_set):
    # on firefox with selenium, the behaviour is different.  eg 2.34 displays as 2.34 and is persisted as 2
    index = world.get_setting_entry_index(MAXIMUM_ATTEMPTS)
    world.css_fill('.wrapper-comp-setting .setting-input', max_attempts_set, index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input', index=index)
    world.save_component_and_reopen(step)
    value =  int(world.css_value('input.setting-input', index=index))
    assert value >= 0
Exemplo n.º 5
0
def i_can_modify_the_display_name_with_special_chars(step):
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.css_fill('.wrapper-comp-setting .setting-input',
                   "updated ' \" &",
                   index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input',
                            index=index)
    verify_modified_display_name_with_special_chars()
Exemplo n.º 6
0
def i_can_modify_the_display_name_with_html(_step):
    """
    If alert appear on save then UnexpectedAlertPresentException
    will occur and test will fail.
    """
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, "<script>alert('test')</script>")
    verify_modified_display_name_with_html()
    world.save_component()
def set_the_max_attempts(step, max_attempts_set):
    # on firefox with selenium, the behaviour is different.  eg 2.34 displays as 2.34 and is persisted as 2
    index = world.get_setting_entry_index(MAXIMUM_ATTEMPTS)
    world.css_fill('.wrapper-comp-setting .setting-input', max_attempts_set, index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input', index=index)
    world.save_component_and_reopen(step)
    value =  int(world.css_value('input.setting-input', index=index))
    assert value >= 0
def set_the_max_attempts(step, max_attempts_set):
    # on firefox with selenium, the behavior is different.
    # eg 2.34 displays as 2.34 and is persisted as 2
    index = world.get_setting_entry_index(MAXIMUM_ATTEMPTS)
    world.set_field_value(index, max_attempts_set)
    world.save_component_and_reopen(step)
    value = world.css_value('input.setting-input', index=index)
    assert value != "", "max attempts is blank"
    assert int(value) >= 0
Exemplo n.º 9
0
def set_the_max_attempts(step, max_attempts_set):
    # on firefox with selenium, the behaviour is different.
    # eg 2.34 displays as 2.34 and is persisted as 2
    index = world.get_setting_entry_index(MAXIMUM_ATTEMPTS)
    world.set_field_value(index, max_attempts_set)
    world.save_component_and_reopen(step)
    value = world.css_value('input.setting-input', index=index)
    assert value != "", "max attempts is blank"
    assert int(value) >= 0
Exemplo n.º 10
0
def i_can_modify_the_display_name_with_special_chars(_step):
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, "updated ' \" &")
    verify_modified_display_name_with_special_chars()
Exemplo n.º 11
0
def i_can_modify_the_display_name(_step):
    # Verifying that the display name can be a string containing a floating point value
    # (to confirm that we don't throw an error because it is of the wrong type).
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, '3.4')
    verify_modified_display_name()
Exemplo n.º 12
0
def set_weight(weight):
    index = world.get_setting_entry_index(PROBLEM_WEIGHT)
    world.set_field_value(index, weight)
Exemplo n.º 13
0
def change_display_name(step, display_name):
    world.edit_component_and_select_settings()
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, display_name)
    world.save_component()
Exemplo n.º 14
0
def change_display_name(step, display_name):
    world.edit_component_and_select_settings()
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, display_name)
    world.save_component()
Exemplo n.º 15
0
def set_weight(weight):
    index = world.get_setting_entry_index(PROBLEM_WEIGHT)
    world.set_field_value(index, weight)
Exemplo n.º 16
0
def i_can_modify_the_display_name_with_special_chars(_step):
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, "updated ' \" &")
    verify_modified_display_name_with_special_chars()
Exemplo n.º 17
0
def i_can_modify_the_display_name(_step):
    # Verifying that the display name can be a string containing a floating point value
    # (to confirm that we don't throw an error because it is of the wrong type).
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, '3.4')
    verify_modified_display_name()
Exemplo n.º 18
0
def set_weight(weight):
    index = world.get_setting_entry_index(PROBLEM_WEIGHT)
    world.css_fill('.wrapper-comp-setting .setting-input', weight, index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input', index=index, event='blur')
        world.trigger_event('a.save-button', event='focus')
Exemplo n.º 19
0
def i_can_modify_video_display_name(_step):
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, '3.4')
    world.verify_setting_entry(world.get_setting_entry(DISPLAY_NAME), DISPLAY_NAME, '3.4', True)
Exemplo n.º 20
0
def i_can_modify_video_display_name(_step):
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.set_field_value(index, '3.4')
    world.verify_setting_entry(world.get_setting_entry(DISPLAY_NAME),
                               DISPLAY_NAME, '3.4', True)
Exemplo n.º 21
0
def i_can_modify_the_display_name_with_special_chars(_step):
    index = world.get_setting_entry_index(DISPLAY_NAME)
    world.css_fill('.wrapper-comp-setting .setting-input', "updated ' \" &", index=index)
    if world.is_firefox():
        world.trigger_event('.wrapper-comp-setting .setting-input', index=index)
    verify_modified_display_name_with_special_chars()