本文整理汇总了Python中pages.manage_runs_page.MozTrapManageRunsPage.activate_run方法的典型用法代码示例。如果您正苦于以下问题:Python MozTrapManageRunsPage.activate_run方法的具体用法?Python MozTrapManageRunsPage.activate_run怎么用?Python MozTrapManageRunsPage.activate_run使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.manage_runs_page.MozTrapManageRunsPage
的用法示例。
在下文中一共展示了MozTrapManageRunsPage.activate_run方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_for_edit_active_run_that_includes_suites_to_be_sure_they_are_listed
# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import activate_run [as 别名]
def test_for_edit_active_run_that_includes_suites_to_be_sure_they_are_listed(self, api, mozwebqa, login, product):
# create version
version = product['version']
# create two test suites
suite_a = self.create_suite(mozwebqa, product=product, api=api, name='suite A')
suite_b = self.create_suite(mozwebqa, product=product, api=api, name='suite B')
# create test run
suite_order = [suite_b['name'], suite_a['name']]
test_run = self.create_run(
mozwebqa, product=product,
version=version, suite_name_list=suite_order)
manage_runs_pg = MozTrapManageRunsPage(mozwebqa)
manage_runs_pg.go_to_manage_runs_page()
manage_runs_pg.filter_form.filter_by(lookup='name', value=test_run['name'])
manage_runs_pg.activate_run(name=test_run['name'])
edit_run_pg = manage_runs_pg.go_to_edit_run_page(test_run['name'])
# assert that multiselect widget is not present thus suites list is readonly
assert not edit_run_pg.is_multiselect_widget_present
# assert that order of suites is correct
assert suite_order == edit_run_pg.readonly_included_suites
edit_run_pg.save_run()
test_run = manage_runs_pg.test_runs[0]
test_run.show_details()
# assert that order of suites is still correct
assert suite_order == test_run.included_suites
示例2: test_for_edit_active_run_that_includes_suites_to_be_sure_they_are_listed
# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import activate_run [as 别名]
def test_for_edit_active_run_that_includes_suites_to_be_sure_they_are_listed(self, mozwebqa_logged_in, product):
# create version
version = product["version"]
# create two test suites
suite_a = self.create_suite(mozwebqa_logged_in, product=product, use_API=True, name="suite A")
suite_b = self.create_suite(mozwebqa_logged_in, product=product, use_API=True, name="suite B")
# create test run
suite_order = [suite_b["name"], suite_a["name"]]
test_run = self.create_run(mozwebqa_logged_in, product=product, version=version, suite_name_list=suite_order)
manage_runs_pg = MozTrapManageRunsPage(mozwebqa_logged_in)
manage_runs_pg.go_to_manage_runs_page()
manage_runs_pg.filter_form.filter_by(lookup="name", value=test_run["name"])
manage_runs_pg.activate_run(name=test_run["name"])
edit_run_pg = manage_runs_pg.go_to_edit_run_page(test_run["name"])
# assert that multiselect widget is not present thus suites list is readonly
Assert.false(edit_run_pg.is_multiselect_widget_present, u"multiselect widget should not be present")
# assert that order of suites is correct
Assert.equal(suite_order, edit_run_pg.readonly_included_suites, u"suites are listed in wrong order")
edit_run_pg.save_run()
test_run = manage_runs_pg.test_runs[0]
test_run.show_details()
# assert that order of suites is still correct
Assert.equal(suite_order, test_run.included_suites, u"suites are listed in wrong order")
示例3: test_that_test_run_saves_right_order_of_test_cases
# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import activate_run [as 别名]
def test_that_test_run_saves_right_order_of_test_cases(self, mozwebqa_logged_in):
#get profile, product and version
profile = self.create_profile(mozwebqa_logged_in)
product = self.create_product(mozwebqa_logged_in, profile['name'])
version = product['version']
#create several test case via bulk create
cases = self.create_bulk_cases(mozwebqa_logged_in, cases_amount=5, product=product, name='is')
#create first test suite
suite_a_cases = (cases[3]['name'], cases[1]['name'])
suite_a = self.create_suite(
mozwebqa_logged_in, product=product, name='suite A', case_name_list=suite_a_cases)
#create second test suite
suite_b_cases = (cases[2]['name'], cases[0]['name'], cases[4]['name'])
suite_b = self.create_suite(
mozwebqa_logged_in, product=product, name='suite B', case_name_list=suite_b_cases)
#create first test run (suite a, suite b)
first_suite_order = (suite_a['name'], suite_b['name'])
first_run = self.create_run(
mozwebqa_logged_in, activate=True, product=product,
version=version, suite_name_list=first_suite_order)
#execute first test run
home_page = MozTrapHomePage(mozwebqa_logged_in)
home_page.go_to_home_page()
home_page.go_to_run_test(
product_name=product['name'], version_name=version['name'], run_name=first_run['name'],
env_category=profile['category'], env_element=profile['element'])
run_tests_pg = MozTrapRunTestsPage(mozwebqa_logged_in)
actual_order = [(item.name, item.suite_name) for item in run_tests_pg.test_items]
expected_order = [(case, suite) for case in suite_a_cases for suite in (suite_a['name'],)] + \
[(case, suite) for case in suite_b_cases for suite in (suite_b['name'],)]
#assert that right order saved
Assert.equal(actual_order, expected_order)
#edit run to reorder suites
manage_runs_pg = MozTrapManageRunsPage(mozwebqa_logged_in)
manage_runs_pg.go_to_manage_runs_page()
#push run into draft mode
manage_runs_pg.filter_form.filter_by(lookup='name', value=first_run['name'])
manage_runs_pg.make_run_draft(first_run['name'])
#go to edit run page and reorder suites by name (suite b, suite a)
edit_run_pg = manage_runs_pg.go_to_edit_run_page(first_run['name'])
second_run = edit_run_pg.edit_run(first_run, reorder_suites=True)
#make run active again
manage_runs_pg.filter_form.filter_by(lookup='name', value=first_run['name'])
manage_runs_pg.activate_run(first_run['name'])
#execute run again
home_page.go_to_home_page()
home_page.go_to_run_test(
product_name=product['name'], version_name=version['name'], run_name=first_run['name'],
env_category=profile['category'], env_element=profile['element'])
#check actual order of items on run tests page
actual_order = [(item.name, item.suite_name) for item in run_tests_pg.test_items]
expected_order = [(case, suite) for case in suite_b_cases for suite in (suite_b['name'],)] + \
[(case, suite) for case in suite_a_cases for suite in (suite_a['name'],)]
#assert that right order saved
Assert.equal(actual_order, expected_order)
示例4: test_that_test_run_saves_right_order_of_test_cases
# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import activate_run [as 别名]
def test_that_test_run_saves_right_order_of_test_cases(self, api, mozwebqa, login, product, element):
self.connect_product_to_element(mozwebqa, product, element)
version = product['version']
# create several test case via bulk create
cases = self.create_bulk_cases(mozwebqa, product, api=api, cases_amount=5)
# create first test suite
suite_a_cases = (cases[3], cases[1])
suite_a = self.create_suite(
mozwebqa, product=product, api=api, name='suite A', case_list=suite_a_cases)
# create second test suite
suite_b_cases = (cases[2], cases[0], cases[4])
suite_b = self.create_suite(
mozwebqa, product=product, api=api, name='suite B', case_list=suite_b_cases)
# create first test run (suite a, suite b)
first_suite_order = (suite_a['name'], suite_b['name'])
first_run = self.create_run(
mozwebqa, product=product, activate=True,
version=version, suite_name_list=first_suite_order)
# execute first test run
home_page = MozTrapHomePage(mozwebqa)
home_page.go_to_home_page()
home_page.go_to_run_test(
product_name=product['name'], version_name=version['name'], run_name=first_run['name'],
env_category_name=element['category']['name'], env_element_name=element['name'])
run_tests_pg = MozTrapRunTestsPage(mozwebqa)
actual_order = [(item.case_name, item.suite_name) for item in run_tests_pg.test_results]
expected_order = [(case['name'], suite) for case in suite_a_cases for suite in (suite_a['name'],)] + \
[(case['name'], suite) for case in suite_b_cases for suite in (suite_b['name'],)]
# assert that right order saved
assert expected_order == actual_order
# edit run to reorder suites
manage_runs_pg = MozTrapManageRunsPage(mozwebqa)
manage_runs_pg.go_to_manage_runs_page()
# push run into draft mode
manage_runs_pg.filter_form.filter_by(lookup='name', value=first_run['name'])
manage_runs_pg.make_run_draft(first_run['name'])
# go to edit run page and reorder suites by name (suite b, suite a)
edit_run_pg = manage_runs_pg.go_to_edit_run_page(first_run['name'])
edit_run_pg.edit_run(first_run, reorder_suites=True)
# make run active again
manage_runs_pg.activate_run(first_run['name'])
# execute run again
home_page.go_to_home_page()
home_page.go_to_run_test(
product_name=product['name'], version_name=version['name'], run_name=first_run['name'],
env_category_name=element['category']['name'], env_element_name=element['name'])
# check actual order of items on run tests page
actual_order = [(item.case_name, item.suite_name) for item in run_tests_pg.test_results]
expected_order = [(case['name'], suite) for case in suite_b_cases for suite in (suite_b['name'],)] + \
[(case['name'], suite) for case in suite_a_cases for suite in (suite_a['name'],)]
# assert that right order saved
assert expected_order == actual_order
示例5: create_run
# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import activate_run [as 别名]
def create_run(self, mozwebqa, product, activate=False, version=None, suite_name_list=None):
create_run_pg = MozTrapCreateRunPage(mozwebqa)
if version is None:
version = self.create_version(mozwebqa, product=product)
create_run_pg.go_to_create_run_page()
product_version = u'%(product_name)s %(version_name)s' % {'product_name': product['name'], 'version_name': version['name']}
run = create_run_pg.create_run(product_version=product_version, suite_list=suite_name_list)
run['version'] = version
if activate:
manage_runs_pg = MozTrapManageRunsPage(mozwebqa)
manage_runs_pg.filter_form.filter_by(lookup='name', value=run['name'])
manage_runs_pg.activate_run(name=run['name'])
return run
示例6: test_for_edit_active_run_that_includes_suites_to_be_sure_they_are_listed
# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import activate_run [as 别名]
def test_for_edit_active_run_that_includes_suites_to_be_sure_they_are_listed(self, mozwebqa_logged_in):
#create product and version
product = self.create_product(mozwebqa_logged_in)
version = product['version']
#create two test suites
suite_a = self.create_suite(mozwebqa_logged_in, product=product, name='suite A')
suite_b = self.create_suite(mozwebqa_logged_in, product=product, name='suite B')
#create test run
suite_order = [suite_b['name'], suite_a['name']]
test_run = self.create_run(
mozwebqa_logged_in, product=product,
version=version, suite_name_list=suite_order)
manage_runs_pg = MozTrapManageRunsPage(mozwebqa_logged_in)
manage_runs_pg.go_to_manage_runs_page()
manage_runs_pg.filter_form.filter_by(lookup='name', value=test_run['name'])
manage_runs_pg.activate_run(name=test_run['name'])
edit_run_pg = manage_runs_pg.go_to_edit_run_page(test_run['name'])
#assert that multiselect widget is not present thus suites list is readonly
Assert.false(
edit_run_pg.is_multiselect_widget_present,
u'multiselect widget should not be present')
#assert that order of suites is correct
Assert.equal(
suite_order, edit_run_pg.readonly_included_suites,
u'suites are listed in wrong order')
edit_run_pg.save_run()
manage_runs_pg.filter_form.filter_by(lookup='name', value=test_run['name'])
test_run = manage_runs_pg.test_runs[0]
test_run.show_details()
#assert that order of suites is still correct
Assert.equal(
suite_order, test_run.included_suites,
u'suites are listed in wrong order')