def test(data): test_name = 'invalid-name' test_list.add_test(test_name) common.assert_error_message( 'Only letters, numbers and underscores are allowed') assert not test_list.test_exists(test_name) actions.refresh_page() test_name = 'a' * 151 test_list.add_test(test_name) common.assert_error_message('Maximum name length is 150 characters') assert not test_list.test_exists(test_name)
def test(data): # to root test_one = actions.random_str() test_list.add_test(test_one) test_list.assert_test_exists(test_one) # to folder test_two = 'folder1.' + actions.random_str() test_list.add_test(test_two) test_list.assert_test_exists(test_two) actions.refresh_page() test_list.assert_test_exists(test_one) test_list.assert_test_exists(test_two)
def create_access_simple_suite(suite_name=None, test_name=None): """Creates a suite with an empty test if the suite does not exist. """ suite_name = suite_name or 'simple_suite' test_name = test_name or 'simple_test' common.navigate_menu('Tests') if not test_list.test_exists(test_name): test_list.add_test(test_name) common.navigate_menu('Suites') if not suite_list.suite_exists(suite_name): suite_list.add_suite(suite_name) suite_list.access_suite(suite_name) suite_builder.select_test(test_name) suite_builder.save_suite() else: suite_list.access_suite(suite_name)
def test(data): test_list.add_test(data.test_one) common.assert_error_message('A test with that name already exists')
def setup(data): common.access_golem(data.env.url, data.env.admin) api.project.using_project('test_list') common.navigate_menu('Tests') data.test_one = actions.random_str() test_list.add_test(data.test_one)
def setup(data): common.access_golem(data.env.url, data.env.admin) api.project.create_access_random_project() common.navigate_menu('Tests') actions.store('test_one', actions.random_str()) test_list.add_test(data.test_one)