def test_that_user_can_create_and_delete_product(self, mozwebqa_logged_in):
        manage_products_pg = MozTrapManageProductsPage(mozwebqa_logged_in)

        product = self.create_product(mozwebqa_logged_in)

        manage_products_pg.filter_products_by_name(name=product['name'])

        Assert.true(manage_products_pg.is_element_present(product['locator']))

        manage_products_pg.delete_product(name=product['name'])

        Assert.false(manage_products_pg.is_element_present(product['locator']))
    def test_that_user_can_filter_product_by_name_without_mouse(self, mozwebqa_logged_in):
        manage_products_pg = MozTrapManageProductsPage(mozwebqa_logged_in)

        product = self.create_product(mozwebqa_logged_in)

        manage_products_pg.filter_products_by_name_without_mouse(name='Another Product')

        Assert.false(manage_products_pg.is_element_present(product['locator']))

        manage_products_pg.remove_name_filter(name='Another Product')
        manage_products_pg.filter_products_by_name_without_mouse(name=product['name'])

        Assert.true(manage_products_pg.is_element_present(product['locator']))

        manage_products_pg.delete_product(name=product['name'])
Esempio n. 3
0
    def delete_product(self, mozwebqa, product):
        manage_products_pg = MozTrapManageProductsPage(mozwebqa)

        manage_products_pg.go_to_manage_products_page()
        manage_products_pg.filter_products_by_name(name=product['name'])
        manage_products_pg.delete_product(name=product['name'])