def create_profile(self, mozwebqa): create_profile_pg = MozTrapCreateProfilePage(mozwebqa) create_profile_pg.go_to_create_profile_page() profile = create_profile_pg.create_profile() return profile
def create_profile(self, base_url, selenium): create_profile_pg = MozTrapCreateProfilePage(base_url, selenium) create_profile_pg.go_to_create_profile_page() profile = create_profile_pg.create_profile() return profile
def delete_profile(self, mozwebqa, profile): create_profile_pg = MozTrapCreateProfilePage(mozwebqa) manage_profiles_pg = MozTrapManageProfilesPage(mozwebqa) manage_profiles_pg.go_to_manage_profiles_page() manage_profiles_pg.filter_form.filter_by(lookup='name', value=profile['name']) manage_profiles_pg.delete_profile(name=profile['name']) create_profile_pg.go_to_create_profile_page() create_profile_pg.delete_environment_category(category_name=profile['category'])
def test_that_user_can_create_and_delete_profile(self, mozwebqa, login): from pages.create_profile_page import MozTrapCreateProfilePage manage_profiles_pg = MozTrapManageProfilesPage(mozwebqa) create_profile_pg = MozTrapCreateProfilePage(mozwebqa) profile = self.create_profile(mozwebqa) manage_profiles_pg.filter_form.filter_by(lookup='name', value=profile['name']) assert manage_profiles_pg.is_element_present(*profile['locator']) manage_profiles_pg.delete_profile(name=profile['name']) assert not manage_profiles_pg.is_element_present(*profile['locator']) create_profile_pg.go_to_create_profile_page() create_profile_pg.delete_environment_category(category_name=profile['category'])
def test_that_user_can_create_and_delete_profile(self, mozwebqa_logged_in): from pages.create_profile_page import MozTrapCreateProfilePage manage_profiles_pg = MozTrapManageProfilesPage(mozwebqa_logged_in) create_profile_pg = MozTrapCreateProfilePage(mozwebqa_logged_in) profile = self.create_profile(mozwebqa_logged_in) manage_profiles_pg.filter_profiles_by_name(name=profile['name']) Assert.true(manage_profiles_pg.is_element_present(*profile['locator'])) manage_profiles_pg.delete_profile(name=profile['name']) Assert.false(manage_profiles_pg.is_element_present(*profile['locator'])) create_profile_pg.go_to_create_profile_page() create_profile_pg.delete_environment_category(category_name=profile['category'])
def delete_profile(self, mozwebqa, profile): create_profile_pg = MozTrapCreateProfilePage(mozwebqa) manage_profiles_pg = MozTrapManageProfilesPage(mozwebqa) manage_profiles_pg.go_to_manage_profiles_page() manage_profiles_pg.filter_profiles_by_name(name=profile['name']) manage_profiles_pg.delete_profile(name=profile['name']) create_profile_pg.go_to_create_profile_page() create_profile_pg.delete_environment_category(category_name=profile['category'])
def delete_profile(self, base_url, selenium, profile): create_profile_pg = MozTrapCreateProfilePage(base_url, selenium) manage_profiles_pg = MozTrapManageProfilesPage(base_url, selenium) manage_profiles_pg.go_to_manage_profiles_page() manage_profiles_pg.filter_form.filter_by(lookup='name', value=profile['name']) manage_profiles_pg.delete_profile(name=profile['name']) create_profile_pg.go_to_create_profile_page() create_profile_pg.delete_environment_category( category_name=profile['category'])
def test_that_user_can_create_and_delete_profile(self, mozwebqa, login): from pages.create_profile_page import MozTrapCreateProfilePage manage_profiles_pg = MozTrapManageProfilesPage(mozwebqa) create_profile_pg = MozTrapCreateProfilePage(mozwebqa) profile = self.create_profile(mozwebqa) manage_profiles_pg.filter_form.filter_by(lookup='name', value=profile['name']) Assert.true(manage_profiles_pg.is_element_present(*profile['locator'])) manage_profiles_pg.delete_profile(name=profile['name']) Assert.false(manage_profiles_pg.is_element_present(*profile['locator'])) create_profile_pg.go_to_create_profile_page() create_profile_pg.delete_environment_category(category_name=profile['category'])
def test_that_user_can_create_and_delete_profile(self, base_url, selenium, login): from pages.create_profile_page import MozTrapCreateProfilePage manage_profiles_pg = MozTrapManageProfilesPage(base_url, selenium) create_profile_pg = MozTrapCreateProfilePage(base_url, selenium) profile = self.create_profile(base_url, selenium) manage_profiles_pg.filter_form.filter_by(lookup='name', value=profile['name']) assert manage_profiles_pg.is_element_present(*profile['locator']) manage_profiles_pg.delete_profile(name=profile['name']) assert not manage_profiles_pg.is_element_present(*profile['locator']) create_profile_pg.go_to_create_profile_page() create_profile_pg.delete_environment_category( category_name=profile['category'])