Example #1
0
def setup(data):
    common.access_golem(data.env.url, data.env.admin)
    api.project.using_project('test_list')
    common.navigate_menu('Tests')
    data.folder = actions.random_str()
    test_list.add_folder(data.folder)
    actions.refresh_page()
Example #2
0
def setup(data):
    common.access_golem(data.env.url, data.env.admin)
    api.project.create_access_random_project()
    common.navigate_menu('Tests')
    actions.store('folder', actions.random_str())
    test_list.add_folder(data.folder)
    actions.refresh_page()
Example #3
0
def setup(data):
    common.access_golem(data.env.url, data.env.admin)
    api.project.create_access_random_project()
    common.navigate_menu('Tests')
    actions.store('folder_one', 'foo')
    test_list.add_folder(data.folder_one)
    actions.store('folder_two', 'bar.baz')
    test_list.add_folder(data.folder_two)
    actions.refresh_page()
Example #4
0
def test(data):
    folder_one = actions.random_str()
    test_list.add_folder(folder_one)
    test_list.assert_folder_exists(folder_one)
    folder_two = 'folder1.' + actions.random_str()
    test_list.add_folder(folder_two)
    test_list.assert_folder_exists(folder_two)
    actions.refresh_page()
    test_list.assert_folder_exists(folder_one)
    test_list.assert_folder_exists(folder_two)
Example #5
0
def test(data):
    folder = actions.random_str()
    test_list.add_folder(folder)
    test_list.navigate_to_folder(folder)
    test_one = actions.random_str()
    test_list.add_test_to_current_folder(test_one)
    test_two = 'foo.bar'
    test_list.add_test_to_current_folder(test_two)
    common.navigate_menu('Tests')
    test_list.assert_test_exists('{}.{}'.format(folder, test_one))
    test_list.assert_test_exists('{}.{}'.format(folder, test_two))
Example #6
0
def setup(data):
    common.access_golem(data.env.url, data.env.admin)
    api.project.using_project('test_list')
    common.navigate_menu('Tests')
    data.folder_one = 'foo'
    test_list.add_folder(data.folder_one)
    data.folder_two = 'bar'
    data.folder_three = actions.random_str()
    data.folder_two_full = '{}.{}'.format(data.folder_two, data.folder_three)
    test_list.add_folder(data.folder_two_full)
    actions.refresh_page()
Example #7
0
def test(data):
    # max length
    test_list.add_folder('a' * 151)
    common.assert_error_message('Maximum name length is 150 characters')
    actions.refresh_page()
    # invalid chars
    test_list.add_folder('a-b-c')
    common.assert_error_message(
        'Only letters, numbers and underscores are allowed')
    actions.refresh_page()
    # middle spaces
    test_list.add_folder('a b')
    common.assert_error_message(
        'Only letters, numbers and underscores are allowed')
    actions.refresh_page()
    # existing folder
    test_list.add_folder('test')
    test_list.add_folder('test')
    common.assert_error_message('A directory with that name already exists')
def test_add_folder_existing_name(data):
    actions.refresh_page()
    test_list.add_folder('test')
    test_list.add_folder('test')
    common.assert_error_message('A directory with that name already exists')
def test_add_folder_with_spaces(data):
    actions.refresh_page()
    test_list.add_folder('a b')
    common.assert_error_message(
        'Only letters, numbers and underscores are allowed')
def test_add_folder_invalid_chars(data):
    actions.refresh_page()
    test_list.add_folder('a-b-c')
    common.assert_error_message(
        'Only letters, numbers and underscores are allowed')
def test_add_folder_max_length(data):
    test_list.add_folder('a' * 151)
    common.assert_error_message('Maximum name length is 150 characters')