def test_add_new_page_with_empty_name(data):
    actions.refresh_page()
    actions.click(test_builder.new_page_button)
    actions.wait_for_element_displayed(test_builder.new_page_modal_input)
    actions.assert_element_attribute(test_builder.new_page_modal_input,
                                     'value', '')
    actions.click(test_builder.new_page_modal_submit)
    common.assert_error_message('New filename cannot be empty')
def test(data):
    test_builder.open_run_configurations_modal()
    test_run_config_modal.select_env('foo')
    test_run_config_modal.select_env('bar')
    actions.assert_element_attribute(test_run_config_modal.environments_input,
                                     'value', 'foo, bar, ')
    actions.click(test_run_config_modal.run_button)
    test_run_modal.wait_for_test_to_run()
    test_run_modal.assert_amount_of_sets(2)
Beispiel #3
0
def test(data):
    actions.navigate(data.env.url + 'elements/')
    actions.assert_element_attribute('#button-one', 'id', 'button-one')
    expected = "Assert element #button-one attribute id value is 'button-one'"
    golem_steps.assert_last_step_message(expected)
    msg = ("expected element #button-one attribute id "
           "value to be 'not-this-one' was 'button-one'")
    with expected_exception(AssertionError, msg):
        actions.assert_element_attribute('#button-one', 'id', 'not-this-one')
Beispiel #4
0
def test(data):
    test_builder.open_run_configurations_modal()
    actions.assert_element_attribute(test_run_config_modal.browser_input,
                                     'value', 'chrome, ')
    actions.clear_element(test_run_config_modal.browser_input)
    test_run_config_modal.select_browser('chrome')
    test_run_config_modal.select_browser('firefox')
    actions.assert_element_attribute(test_run_config_modal.browser_input,
                                     'value', 'chrome, firefox, ')
    actions.click(test_run_config_modal.run_button)
    test_run_modal.wait_for_test_to_run()
    test_run_modal.assert_amount_of_sets(2)
def test(data):
    # page already exists
    actions.click(test_builder.new_page_button)
    actions.send_keys(test_builder.new_page_modal_input, data.page_name)
    actions.click(test_builder.new_page_modal_submit)
    common.assert_error_message('A page with that name already exists')
    actions.refresh_page()
    # empty name
    actions.click(test_builder.new_page_button)
    actions.wait_for_element_displayed(test_builder.new_page_modal_input)
    actions.assert_element_attribute(test_builder.new_page_modal_input,
                                     'value', '')
    actions.click(test_builder.new_page_modal_submit)
    common.assert_error_message('New filename cannot be empty')
    actions.refresh_page()
    # invalid chars
    actions.click(test_builder.new_page_button)
    actions.send_keys(test_builder.new_page_modal_input, '$$invalid')
    actions.click(test_builder.new_page_modal_submit)
    common.assert_error_message(
        "Only letters, numbers and underscores are allowed")
    actions.refresh_page()
Beispiel #6
0
def test(data):
    actions.navigate(data.env.url + 'elements/')
    input = '#input-one'
    text_area = '#textarea-1'
    # clear input
    actions.send_keys(input, 'foo')
    actions.assert_element_attribute(input, 'value', 'foo')
    actions.clear_element(input)
    golem_steps.assert_last_step_message('Clear element {}'.format(input))
    actions.assert_element_attribute(input, 'value', '')
    # clear text area
    actions.send_keys(text_area, 'bar')
    actions.assert_element_attribute(text_area, 'value', 'bar')
    actions.clear_element(text_area)
    actions.assert_element_attribute(text_area, 'value', '')
Beispiel #7
0
def test(data):
    actions.send_keys(suite_builder.tags_input, '001, 002')
    suite_builder.save_suite()
    actions.refresh_page()
    actions.assert_element_attribute(suite_builder.tags_input, 'value', '001, 002, ')