def test_that_user_can_select_product(self, mozwebqa_logged_in): home_pg = MozTrapHomePage(mozwebqa_logged_in) product = self.create_product(mozwebqa_logged_in) home_pg.go_to_homepage_page() Assert.false(home_pg.is_element_visible(*product['version']['homepage_locator'])) home_pg.select_item(product['name']) Assert.true(home_pg.is_element_visible(*product['version']['homepage_locator'])) self.delete_product(mozwebqa_logged_in, product=product)
def test_that_user_can_select_version(self, mozwebqa_logged_in): home_pg = MozTrapHomePage(mozwebqa_logged_in) run = self.create_run(mozwebqa_logged_in, activate=True) home_pg.go_to_homepage_page() home_pg.select_item(run['version']['product']['name']) Assert.false(home_pg.is_element_visible(*run['homepage_locator'])) home_pg.select_item(run['version']['name']) Assert.true(home_pg.is_element_visible(*run['homepage_locator'])) self.delete_product(mozwebqa_logged_in, product=run['version']['product'])
def test_that_user_can_select_product(self, mozwebqa_logged_in): home_pg = MozTrapHomePage(mozwebqa_logged_in) product = self.create_product(mozwebqa_logged_in) home_pg.go_to_homepage_page() Assert.false( home_pg.is_element_visible( *product['version']['homepage_locator'])) home_pg.select_item(product['name']) Assert.true( home_pg.is_element_visible( *product['version']['homepage_locator'])) self.delete_product(mozwebqa_logged_in, product=product)
def create_and_run_test(self, mozwebqa, profile=None): home_pg = MozTrapHomePage(mozwebqa) manage_suites_pg = MozTrapManageSuitesPage(mozwebqa) run_tests_pg = MozTrapRunTestsPage(mozwebqa) if profile is None: profile = self.create_profile(mozwebqa) product = self.create_product(mozwebqa, profile=profile['name']) suite = self.create_suite(mozwebqa, product=product) case = self.create_case(mozwebqa, product=product, version=product['version'], suite_name=suite['name']) case['profile'] = profile run = self.create_run(mozwebqa, activate=True, product=product, version=product['version'], suite_name_list=[suite['name']]) home_pg.go_to_homepage_page() home_pg.go_to_run_test(product_name=product['name'], version_name=product['version']['name'], run_name=run['name'], env_category=profile['category'], env_element=profile['element']) return case