Esempio n. 1
0
    def create_version(self, mozwebqa, product=None):
        create_version_pg = MozTrapCreateVersionPage(mozwebqa)

        if product is None:
            product = self.create_product(mozwebqa)
            version = product['version']
            manage_versions_pg = MozTrapManageVersionsPage(mozwebqa)
            manage_versions_pg.go_to_manage_versions_page()
        else:
            create_version_pg.go_to_create_version_page()
            version = create_version_pg.create_version(product_name=product['name'])

        version['product'] = product

        return version
    def test_that_user_can_filter_version_by_name(self, mozwebqa_logged_in):
        manage_versions_pg = MozTrapManageVersionsPage(mozwebqa_logged_in)

        version = self.create_version(mozwebqa_logged_in)

        manage_versions_pg.filter_versions_by_name(name='Another Version')

        Assert.false(manage_versions_pg.is_element_present(version['manage_locator']))

        manage_versions_pg.remove_name_filter(name='Another Version')
        manage_versions_pg.filter_versions_by_name(name=version['name'])

        Assert.true(manage_versions_pg.is_element_present(version['manage_locator']))

        self.delete_version(mozwebqa_logged_in, version, delete_product=True)
Esempio n. 3
0
    def delete_version(self, mozwebqa, version, delete_product=False):
        manage_versions_pg = MozTrapManageVersionsPage(mozwebqa)

        manage_versions_pg.go_to_manage_versions_page()
        manage_versions_pg.filter_versions_by_name(name=version['name'])
        manage_versions_pg.delete_version(name=version['name'], product_name=version['product']['name'])

        if delete_product:
            self.delete_product(mozwebqa, product=version['product'])
    def test_that_user_can_clone_version(self, mozwebqa_logged_in):
        manage_versions_pg = MozTrapManageVersionsPage(mozwebqa_logged_in)

        version = self.create_version(mozwebqa_logged_in)

        manage_versions_pg.filter_versions_by_name(name=version['name'])

        cloned_version = manage_versions_pg.clone_version(name=version['name'], product_name=version['product']['name'])

        Assert.true(manage_versions_pg.is_element_present(cloned_version['manage_locator']))

        manage_versions_pg.delete_version(name=cloned_version['name'], product_name=cloned_version['product_name'])

        Assert.false(manage_versions_pg.is_element_present(cloned_version['manage_locator']))

        self.delete_version(mozwebqa_logged_in, version, delete_product=True)