当前位置: 首页>>代码示例>>Python>>正文


Python MozTrapManageRunsPage.go_to_manage_runs_page方法代码示例

本文整理汇总了Python中pages.manage_runs_page.MozTrapManageRunsPage.go_to_manage_runs_page方法的典型用法代码示例。如果您正苦于以下问题:Python MozTrapManageRunsPage.go_to_manage_runs_page方法的具体用法?Python MozTrapManageRunsPage.go_to_manage_runs_page怎么用?Python MozTrapManageRunsPage.go_to_manage_runs_page使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pages.manage_runs_page.MozTrapManageRunsPage的用法示例。


在下文中一共展示了MozTrapManageRunsPage.go_to_manage_runs_page方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 go_to_manage_runs_page [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")
开发者ID:sashakruglov,项目名称:moztrap-tests,代码行数:29,代码来源:test_manage_runs_page.py

示例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 go_to_manage_runs_page [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
开发者ID:bobsilverberg,项目名称:moztrap-tests,代码行数:31,代码来源:test_manage_runs_page.py

示例3: test_that_pinning_filter_on_product_version_set_defaults_in_new_run

# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import go_to_manage_runs_page [as 别名]
    def test_that_pinning_filter_on_product_version_set_defaults_in_new_run(self, mozwebqa_logged_in):
        product = self.create_product(mozwebqa_logged_in)
        product_version_name = u'%s %s' % (product['name'], product['version']['name'])

        from pages.manage_runs_page import MozTrapManageRunsPage
        manage_runs_pg = MozTrapManageRunsPage(mozwebqa_logged_in)
        manage_runs_pg.go_to_manage_runs_page()
        filter_item = manage_runs_pg.filter_form.filter_by(lookup='productversion', value=product_version_name)

        #check that filter is not orange before it's pinned
        Assert.not_equal(
            filter_item.get_filter_color(),
            PINNED_FILTER_COLOR,
            u'filter is orange before it was pinned')

        filter_item.pin_filter()

        #check that filter is orange after it's been pinned
        Assert.equal(
            filter_item.get_filter_color(),
            PINNED_FILTER_COLOR,
            u'pinned filter\'s color is not orange')

        create_run_pg = manage_runs_pg.click_create_run_button()

        Assert.equal(
            create_run_pg.product_version_value,
            product_version_name,
            u'default product version is incorrect')
开发者ID:AndreiH,项目名称:moztrap-tests,代码行数:31,代码来源:test_pinning_filters.py

示例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 go_to_manage_runs_page [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)
开发者ID:yoshiyokotani,项目名称:moztrap-tests,代码行数:60,代码来源:test_run_tests_page.py

示例5: delete_run

# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import go_to_manage_runs_page [as 别名]
    def delete_run(self, mozwebqa, run, delete_version=False, delete_product=False):
        manage_runs_pg = MozTrapManageRunsPage(mozwebqa)

        manage_runs_pg.go_to_manage_runs_page()
        manage_runs_pg.filter_form.filter_by(lookup='name', value=run['name'])
        manage_runs_pg.delete_run(name=run['name'])

        if delete_version:
            self.delete_version(mozwebqa, version=run['version'], delete_product=delete_product)
开发者ID:AndreiH,项目名称:moztrap-tests,代码行数:11,代码来源:base_test.py

示例6: delete_run

# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import go_to_manage_runs_page [as 别名]
    def delete_run(self, base_url, selenium, run, delete_version=False):
        manage_runs_pg = MozTrapManageRunsPage(base_url, selenium)

        manage_runs_pg.go_to_manage_runs_page()
        manage_runs_pg.filter_form.filter_by(lookup='name', value=run['name'])
        manage_runs_pg.delete_run(name=run['name'])

        if delete_version:
            self.delete_version(base_url, selenium, version=run['version'])
开发者ID:carcablop,项目名称:moztrap-tests,代码行数:11,代码来源:base_test.py

示例7: 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 go_to_manage_runs_page [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
开发者ID:bobsilverberg,项目名称:moztrap-tests,代码行数:57,代码来源:test_run_tests_page.py

示例8: test_that_pinning_filter_on_product_version_set_defaults_in_new_run

# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import go_to_manage_runs_page [as 别名]
    def test_that_pinning_filter_on_product_version_set_defaults_in_new_run(self, mozwebqa, login, product):
        product_version_name = u'%s %s' % (product['name'], product['version']['name'])

        manage_runs_pg = MozTrapManageRunsPage(mozwebqa)
        manage_runs_pg.go_to_manage_runs_page()
        filter_item = manage_runs_pg.filter_form.filter_by(lookup='productversion', value=product_version_name)

        # check that filter is not orange before it's pinned
        self.check_pinned_filter(filter_item, is_pinned=False)
        filter_item.pin_filter()

        # check that filter is orange after it's been pinned
        self.check_pinned_filter(filter_item, is_pinned=True)

        create_run_pg = manage_runs_pg.click_create_run_button()

        assert product_version_name == create_run_pg.product_version_value
开发者ID:bobsilverberg,项目名称:moztrap-tests,代码行数:19,代码来源:test_pinning_filters.py

示例9: 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 go_to_manage_runs_page [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')
开发者ID:yoshiyokotani,项目名称:moztrap-tests,代码行数:39,代码来源:test_run_tests_page.py

示例10: test_that_pinning_name_field_filter_only_works_for_current_page

# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import go_to_manage_runs_page [as 别名]
    def test_that_pinning_name_field_filter_only_works_for_current_page(self, api, mozwebqa, login, product):
        good_case_name = u'mozilla'
        good_suite_name = u'MozTrap'

        self.create_bulk_cases(mozwebqa, product, api=api, name=good_case_name, cases_amount=3)
        self.create_bulk_cases(mozwebqa, product, api=api, name=u'ALLIZOM', cases_amount=2)
        self.create_suite(mozwebqa, product, api=api, name=good_suite_name)
        self.create_suite(mozwebqa, product, api=api, name=u'PartZom')

        manage_cases_pg = MozTrapManageCasesPage(mozwebqa)
        manage_cases_pg.go_to_manage_cases_page()

        # filter cases by name and assert that only cases with mozilla in their name are found
        cases_filter = manage_cases_pg.filter_form.filter_by(lookup='name', value=good_case_name)
        assert good_case_name == cases_filter.content_text
        self.check_pinned_filter(cases_filter, is_pinned=False)
        for case in manage_cases_pg.test_cases:
            assert good_case_name in case.name.lower()

        # pin filter and assert that it turns orange
        cases_filter.pin_filter()
        self.check_pinned_filter(cases_filter, is_pinned=True)

        manage_suites_pg = MozTrapManageSuitesPage(mozwebqa)
        manage_suites_pg.go_to_manage_suites_page()

        # check that there is no filters applied
        assert [] == manage_suites_pg.filter_form.filter_items

        # filter suites by name and assert that only suites with moztrap in their name are found
        suites_filter = manage_suites_pg.filter_form.filter_by(lookup='name', value=good_suite_name)
        assert good_suite_name.lower() == suites_filter.content_text
        self.check_pinned_filter(suites_filter, is_pinned=False)
        for suite in manage_suites_pg.test_suites:
            assert good_suite_name in suite.name

        # pin filter and assert that it turns orange
        suites_filter.pin_filter()
        self.check_pinned_filter(suites_filter, is_pinned=True)

        # and check everything again on manage cases page
        manage_cases_pg.go_to_manage_cases_page()
        applied_filter = manage_cases_pg.filter_form.filter_items
        assert 1 == len(applied_filter)
        assert good_case_name == applied_filter[0].content_text
        for case in manage_cases_pg.test_cases:
            assert good_case_name in case.name.lower()

        # and check everything one more time on manage suites page
        manage_suites_pg.go_to_manage_suites_page()
        applied_filter = manage_suites_pg.filter_form.filter_items
        assert 1 == len(applied_filter)
        assert good_suite_name.lower() == applied_filter[0].content_text
        for suite in manage_suites_pg.test_suites:
            assert good_suite_name in suite.name

        # and go to manage runs page and see no filters there
        manage_runs_pg = MozTrapManageRunsPage(mozwebqa)
        manage_runs_pg.go_to_manage_runs_page()

        # check that there is no filters applied
        assert [] == manage_runs_pg.filter_form.filter_items
开发者ID:bobsilverberg,项目名称:moztrap-tests,代码行数:64,代码来源:test_pinning_filters.py

示例11: test_that_pinning_name_field_filter_only_works_for_current_page

# 需要导入模块: from pages.manage_runs_page import MozTrapManageRunsPage [as 别名]
# 或者: from pages.manage_runs_page.MozTrapManageRunsPage import go_to_manage_runs_page [as 别名]
    def test_that_pinning_name_field_filter_only_works_for_current_page(self, mozwebqa_logged_in, product):
        good_case_name = u'mozilla'
        good_suite_name = u'MozTrap'

        self.create_bulk_cases(mozwebqa_logged_in, product, use_API=True, name=good_case_name, cases_amount=3)
        self.create_bulk_cases(mozwebqa_logged_in, product, use_API=True, name=u'ALLIZOM', cases_amount=2)
        self.create_suite(mozwebqa_logged_in, product, use_API=True, name=good_suite_name)
        self.create_suite(mozwebqa_logged_in, product, use_API=True, name=u'PartZom')

        manage_cases_pg = MozTrapManageCasesPage(mozwebqa_logged_in)
        manage_cases_pg.go_to_manage_cases_page()

        #filter cases by name and assert that only cases with mozilla in their name are found
        cases_filter = manage_cases_pg.filter_form.filter_by(lookup='name', value=good_case_name)
        Assert.equal(cases_filter.content_text, good_case_name)
        self.check_pinned_filter(cases_filter, is_pinned=False)
        for case in manage_cases_pg.test_cases:
            Assert.contains(good_case_name, case.name.lower())

        #pin filter and assert that it turns orange
        cases_filter.pin_filter()
        self.check_pinned_filter(cases_filter, is_pinned=True)

        manage_suites_pg = MozTrapManageSuitesPage(mozwebqa_logged_in)
        manage_suites_pg.go_to_manage_suites_page()

        #check that there is no filters applied
        Assert.equal(manage_suites_pg.filter_form.filter_items, [])

        #filter suites by name and assert that only suites with moztrap in their name are found
        suites_filter = manage_suites_pg.filter_form.filter_by(lookup='name', value=good_suite_name)
        Assert.equal(suites_filter.content_text, good_suite_name.lower())
        self.check_pinned_filter(suites_filter, is_pinned=False)
        for suite in manage_suites_pg.test_suites:
            Assert.contains(good_suite_name, suite.name)

        #pin filter and assert that it turns orange
        suites_filter.pin_filter()
        self.check_pinned_filter(suites_filter, is_pinned=True)

        #and check everything again on manage cases page
        manage_cases_pg.go_to_manage_cases_page()
        applied_filter = manage_cases_pg.filter_form.filter_items
        Assert.equal(len(applied_filter), 1)
        Assert.equal(applied_filter[0].content_text, good_case_name)
        for case in manage_cases_pg.test_cases:
            Assert.contains(good_case_name, case.name.lower())

        #and check everything one more time on manage suites page
        manage_suites_pg.go_to_manage_suites_page()
        applied_filter = manage_suites_pg.filter_form.filter_items
        Assert.equal(len(applied_filter), 1)
        Assert.equal(applied_filter[0].content_text, good_suite_name.lower())
        for suite in manage_suites_pg.test_suites:
            Assert.contains(good_suite_name, suite.name)

        #and go to manage runs page and see no filters there
        manage_runs_pg = MozTrapManageRunsPage(mozwebqa_logged_in)
        manage_runs_pg.go_to_manage_runs_page()

        #check that there is no filters applied
        Assert.equal(manage_runs_pg.filter_form.filter_items, [])
开发者ID:GovardhanN,项目名称:moztrap-tests,代码行数:64,代码来源:test_pinning_filters.py


注:本文中的pages.manage_runs_page.MozTrapManageRunsPage.go_to_manage_runs_page方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。