def test_config_modal_processes_less_than_1(data): test_builder.open_run_configurations_modal() actions.assert_element_value(test_run_config_modal.processes_input, '1') actions.clear_element(test_run_config_modal.processes_input) actions.send_keys(test_run_config_modal.processes_input, '0') actions.click(test_run_config_modal.run_button) common.assert_info_bar_message('Processes must be at least one')
def test(data): actions.navigate(data.env.url + 'elements/') start = time.time() actions.send_keys_with_delay('#input-one', 'abc', delay=0.5) end = time.time() golem_steps.assert_last_step_message( "Write 'abc' in element #input-one with delay") actions.assert_element_value('#input-one', 'abc') assert end - start >= 1.5
def test(data): actions.send_keys(suite_builder.environments_input, 'not-existent') actions.wait(0.5) actions.click(suite_builder.save_button) common.assert_toast_message_is_displayed( 'Environment not-existent does not exist for project test') actions.refresh_page() actions.assert_alert_present() actions.accept_alert() actions.assert_element_value(suite_builder.environments_input, '')
def test(data): actions.click(test_builder.test_name) actions.assert_element_displayed(test_builder.test_name_input) actions.assert_element_value(test_builder.test_name_input, data.test_name) actions.send_keys(test_builder.test_name_input, 'new') actions.press_key(test_builder.test_name_input, 'TAB') common.assert_toast_message_is_displayed('File was renamed') actions.wait_for_element_displayed(test_builder.test_name, 5) actions.assert_element_text(test_builder.test_name, data.test_name + 'new') actions.refresh_page() actions.assert_element_text(test_builder.test_name, data.test_name + 'new')
def test(data): actions.wait(1) actions.check_element(suite_builder.all_tests_checkbox) actions.send_keys(suite_builder.processes_input, 3) actions.refresh_page() actions.wait(1) actions.assert_alert_present() actions.accept_alert() actions.assert_element_value(suite_builder.processes_input, '1') actions.clear_element(suite_builder.processes_input) actions.send_keys(suite_builder.processes_input, 3) actions.refresh_page() actions.assert_alert_present() actions.dismiss_alert() suite_builder.save_suite() common.navigate_menu('Suites') actions.assert_title_contains(': Suites')
def test(data): input_one = '#input-one' actions.navigate(data.env.url + 'elements/') actions.assert_element_value(input_one, '') expected = "Assert element {} value is ''".format(input_one) golem_steps.assert_last_step_message(expected) actions.send_keys(input_one, 'foo') actions.assert_element_value(input_one, 'foo') msg = ("expected element {} value to be 'bar' but was 'foo'".format( input_one)) with expected_exception(AssertionError, msg): actions.assert_element_value(input_one, 'bar')
def test(data): actions.assert_element_not_checked(test_builder.skip_checkbox) actions.assert_element_not_displayed(test_builder.skip_message_input) actions.check_element(test_builder.skip_checkbox) actions.assert_element_displayed(test_builder.skip_message_input) actions.assert_element_value(test_builder.skip_message_input, '') test_builder.save_test_and_refresh_page() actions.assert_element_checked(test_builder.skip_checkbox) actions.assert_element_displayed(test_builder.skip_message_input) actions.assert_element_value(test_builder.skip_message_input, '') actions.send_keys(test_builder.skip_message_input, 'skip message') test_builder.save_test_and_refresh_page() actions.assert_element_checked(test_builder.skip_checkbox) actions.assert_element_displayed(test_builder.skip_message_input) actions.assert_element_value(test_builder.skip_message_input, 'skip message') actions.uncheck_element(test_builder.skip_checkbox) test_builder.save_test() actions.assert_element_not_checked(test_builder.skip_checkbox) actions.assert_element_not_displayed(test_builder.skip_message_input)