def assert_policy_entries(expected_keys, expected_values):
    for key, value in zip(expected_keys, expected_values):
        index = get_index_of(key)
        assert_false(index == -1, "Could not find key: {key}".format(key=key))
        found_value = get_codemirror_value(index)
        assert_equal(
            value, found_value,
            "Expected {} to have value {} but found {}".format(key, value, found_value)
        )
def assert_policy_entries(expected_keys, expected_values):
    for key, value in zip(expected_keys, expected_values):
        index = get_index_of(key)
        assert_false(index == -1, "Could not find key: {key}".format(key=key))
        found_value = get_codemirror_value(index)
        assert_equal(
            value, found_value,
            "Expected {} to have value {} but found {}".format(
                key, value, found_value))
Esempio n. 3
0
def verify_text_in_editor_and_update(button_css, before, after):
    world.css_click(button_css)
    text = get_codemirror_value()
    assert_in(before, text)
    change_text(after)
def get_display_name_value():
    index = get_index_of(DISPLAY_NAME_KEY)
    return get_codemirror_value(index)
def get_display_name_value():
    index = get_index_of(DISPLAY_NAME_KEY)
    return get_codemirror_value(index)
Esempio n. 6
0
def check_raw_editor_text(step):
    assert_equal(step.multiline, get_codemirror_value(0))
Esempio n. 7
0
def verify_code_editor_text(step, text):
    use_code_editor(
        lambda: assert_equal(text, get_codemirror_value(0, CODEMIRROR_SELECTOR_PREFIX))
    )
Esempio n. 8
0
def verify_text_in_editor_and_update(button_css, before, after):
    world.css_click(button_css)
    text = get_codemirror_value()
    assert_in(before, text)
    change_text(after)
Esempio n. 9
0
def verify_code_editor_text(_step, text):
    use_code_editor(lambda: assert_equal(
        text, get_codemirror_value(0, CODEMIRROR_SELECTOR_PREFIX)))
Esempio n. 10
0
def check_raw_editor_text(step):
    assert_equal(step.multiline, get_codemirror_value(0))