def test(data):
    suite_builder.select_test(data.test)
    actions.click(suite_builder.run_suite_button)
    suite_builder.assert_suite_was_run(data.suite)
    suite_builder.access_suite_execution_from_toast()
    report_execution.wait_until_execution_end()
    report_execution.assert_amount_of_tests(1)
Пример #2
0
def test(data):
    actions.wait(1)
    suite_builder.assert_test_not_selected(data.test)
    suite_builder.select_test(data.test)
    suite_builder.assert_test_counter(selected=1)
    suite_builder.save_suite()
    actions.refresh_page()
    suite_builder.assert_test_selected(data.test)
Пример #3
0
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)
Пример #4
0
def create_access_suite_with_different_results(suite_name):
    common.navigate_menu('Tests')
    if not test_list.test_exists('success_test'):
        test_list.create_access_test('success_test')
        test_builder.add_action('wait', ['3'])
        test_builder.add_action('step', ["\'success\'"])
        test_builder.save_test()
    common.navigate_menu('Tests')
    if not test_list.test_exists('failing_test'):
        test_list.create_access_test('failing_test')
        test_builder.add_action('wait', ['3'])
        test_builder.add_action('fail', ["\'failure message\'"])
        test_builder.save_test()
    common.navigate_menu('Tests')
    if not test_list.test_exists('error_test'):
        test_list.create_access_test('error_test')
        test_builder.add_action('wait', ['3'])
        test_builder.add_action('error', ["\'error message\'"])
        test_builder.save_test()
    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('success_test')
        suite_builder.select_test('failing_test')
        suite_builder.select_test('error_test')
        suite_builder.save_suite()
    else:
        suite_list.access_suite(suite_name)