Exemple #1
0
    def test_creating_a_tag_with_a_product_value_and_cases(self, api, base_url, selenium, login, product):
        # create some cases for product
        cases = self.create_bulk_cases(base_url, selenium, product, api=api)
        manage_tags_pg = MozTrapManageTagsPage(base_url, selenium)
        manage_tags_pg.go_to_manage_tags_page()

        create_tag_pg = manage_tags_pg.click_create_tag_button()
        tag = MockTag(product=product['name'])
        create_tag_pg.create_tag(tag, save_tag=False)

        expected_case_names = [case.name for case in cases]
Exemple #2
0
    def test_creating_a_tag_with_no_product_value_set(self, base_url, selenium, login):
        manage_tags_pg = MozTrapManageTagsPage(base_url, selenium)
        manage_tags_pg.go_to_manage_tags_page()

        create_tag_pg = manage_tags_pg.click_create_tag_button()
        assert not create_tag_pg.is_multiselect_widget_visible

        tag = MockTag()
        create_tag_pg.create_tag(tag)

        manage_tags_pg.filter_form.filter_by(lookup='name', value=tag['name'])
        displayed_tags = manage_tags_pg.tags()

        assert tag['name'] in [t.name for t in displayed_tags]
    def test_creating_a_tag_with_a_product_value_and_cases(
            self, mozwebqa_logged_in, product):
        # create some cases for product
        cases = self.create_bulk_cases(mozwebqa_logged_in,
                                       product,
                                       use_API=True)
        manage_tags_pg = MozTrapManageTagsPage(mozwebqa_logged_in)
        manage_tags_pg.go_to_manage_tags_page()

        create_tag_pg = manage_tags_pg.click_create_tag_button()
        tag = MockTag(product=product['name'])
        create_tag_pg.create_tag(tag, save_tag=False)

        expected_case_names = [case.name for case in cases]
Exemple #4
0
    def test_creating_a_tag_with_a_product_value_and_no_cases(self, base_url, selenium, login, product):
        manage_tags_pg = MozTrapManageTagsPage(base_url, selenium)
        manage_tags_pg.go_to_manage_tags_page()

        create_tag_pg = manage_tags_pg.click_create_tag_button()
        tag = MockTag(product=product['name'])
        create_tag_pg.create_tag(tag, save_tag=False)

        assert create_tag_pg.is_multiselect_widget_visible

        create_tag_pg.save_tag()
        manage_tags_pg.filter_form.filter_by(lookup='name', value=tag['name'])
        displayed_tags = manage_tags_pg.tags()

        assert tag['name'] in [t.name for t in displayed_tags]
    def test_creating_a_tag_with_no_product_value_set(self, mozwebqa, login):
        manage_tags_pg = MozTrapManageTagsPage(mozwebqa)
        manage_tags_pg.go_to_manage_tags_page()

        create_tag_pg = manage_tags_pg.click_create_tag_button()
        Assert.false(
            create_tag_pg.is_multiselect_widget_visible,
            'multiselect widget should be hidden until product is not selected'
        )

        tag = MockTag()
        create_tag_pg.create_tag(tag)

        manage_tags_pg.filter_form.filter_by(lookup='name', value=tag['name'])
        displayed_tags = manage_tags_pg.tags()

        Assert.true(
            tag['name'] in [t.name for t in displayed_tags],
            'tag with "%s" name is not displayed on the page' % tag['name'])
    def test_creating_a_tag_with_a_product_value_and_no_cases(
            self, mozwebqa_logged_in, product):
        manage_tags_pg = MozTrapManageTagsPage(mozwebqa_logged_in)
        manage_tags_pg.go_to_manage_tags_page()

        create_tag_pg = manage_tags_pg.click_create_tag_button()
        tag = MockTag(product=product['name'])
        create_tag_pg.create_tag(tag, save_tag=False)

        Assert.true(
            create_tag_pg.is_multiselect_widget_visible,
            'multiselect widget should be visible after product was selected')

        create_tag_pg.save_tag()
        manage_tags_pg.filter_form.filter_by(lookup='name', value=tag['name'])
        displayed_tags = manage_tags_pg.tags()

        Assert.true(
            tag['name'] in [t.name for t in displayed_tags],
            'tag with "%s" name is not displayed on the page' % tag['name'])