def test_tag_infra_item_through_details(location, tag):
    """Add a tag to a infra item
    """
    pytest.sel.force_navigate(location)
    pytest.sel.click(Quadicon.first())
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
def test_tag_infra_item_through_selecting(location, tag):
    """Add a tag to a infra item
    """
    pytest.sel.force_navigate(location)
    Quadicon.select_first_quad()
    mixins.add_tag(tag)
    Quadicon.select_first_quad()  # It goes back to the list view.
    mixins.remove_tag(tag)
Ejemplo n.º 3
0
def test_tag_item_through_details(request, location, tag):
    """Add a tag to an item."""
    pytest.sel.force_navigate(location)
    tb.set_vms_grid_view()
    if not Quadicon.any_present:
        pytest.skip("No Quadicon present, cannot test.")
    pytest.sel.click(Quadicon.first())
    request.addfinalizer(lambda: diaper(lambda: mixins.remove_tag(tag)))
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
def test_tag_orchestration_template(provisioning, tag, create_template):
    template_type = provisioning['stack_provisioning']['template_type']
    template = OrchestrationTemplate(template_type=template_type,
                                    template_name=fauxfactory.gen_alphanumeric(),
                                    description="my template")
    template.create(create_template)
    navigate_to(template, "Details")
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
    template.delete()
def test_tag_orchestration_template(provisioning, tag, create_template):
    template_type = provisioning['stack_provisioning']['template_type']
    template = OrchestrationTemplate(
        template_type=template_type,
        template_name=fauxfactory.gen_alphanumeric(),
        description="my template")
    template.create(create_template)
    navigate_to(template, "Details")
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
    template.delete()
def test_tag_orchestration_template(provisioning, tag):
    template_type = provisioning['stack_provisioning']['template_type']
    template = OrchestrationTemplate(template_type=template_type,
                                    template_name=fauxfactory.gen_alphanumeric(),
                                    description="my template")
    template.create(METHOD_TORSO)
    sel.force_navigate('select_template', context={
        'template_type': template.template_type,
        'template_name': template.template_name})
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
    template.delete()
def test_tag_orchestration_template(provisioning, tag, create_template):
    template_type = provisioning['stack_provisioning']['template_type']
    template = OrchestrationTemplate(template_type=template_type,
                                    template_name=fauxfactory.gen_alphanumeric(),
                                    description="my template")
    template.create(create_template)
    sel.force_navigate('select_template', context={
        'template_type': template.template_type,
        'template_name': template.template_name})
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
    template.delete()
Ejemplo n.º 8
0
def _tag_item_through_details(request, location, tag, appliance):
    """Add a tag to an item with going through the details page.

    Prerequisities:
        * Have a tag category and tag created.
        * Be on the page you want to test.

    Steps:
        * Click any quadicon.
        * On the details page, select ``Policy/Edit Tags`` and assign the tag to it.
        * Verify the tag is assigned. (TODO)
        * Select ``Policy/Edit Tags`` and remove the tag.
        * Verify the tag is not present. (TODO)
    """
    entity = _navigate_and_check(location, appliance)
    entity.click()
    request.addfinalizer(lambda: diaper(lambda: mixins.remove_tag(tag)))
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
Ejemplo n.º 9
0
def _tag_item_through_details(request, location, tag, appliance):
    """Add a tag to an item with going through the details page.

    Prerequisities:
        * Have a tag category and tag created.
        * Be on the page you want to test.

    Steps:
        * Click any quadicon.
        * On the details page, select ``Policy/Edit Tags`` and assign the tag to it.
        * Verify the tag is assigned. (TODO)
        * Select ``Policy/Edit Tags`` and remove the tag.
        * Verify the tag is not present. (TODO)
    """
    entity = _navigate_and_check(location, appliance)
    entity.click()
    request.addfinalizer(lambda: diaper(lambda: mixins.remove_tag(tag)))
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
Ejemplo n.º 10
0
def test_tag_item_through_details(request, location, tag):
    """Add a tag to an item with going through the details page.

    Prerequisities:
        * Have a tag category and tag created.
        * Be on the page you want to test.

    Steps:
        * Click any quadicon.
        * On the details page, select ``Policy/Edit Tags`` and assign the tag to it.
        * Verify the tag is assigned. (TODO)
        * Select ``Policy/Edit Tags`` and remove the tag.
        * Verify the tag is not present. (TODO)
    """
    if not navigate_and_check(location):
        pytest.skip("No Quadicon present, cannot test.")
    pytest.sel.click(Quadicon.first())
    request.addfinalizer(lambda: diaper(lambda: mixins.remove_tag(tag)))
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
Ejemplo n.º 11
0
 def _check_item_visibility(vis_object, visibility_result):
     """
     Args:
         visibility_result: pass 'True' is item should be visible,
                            'False' if not
     """
     navigate_to(vis_object, 'Details')
     if visibility_result:
         mixins.add_tag(tag)
     else:
         try:
             mixins.remove_tag(tag)
         except TypeError:
             logger.debug('Tag is already removed')
     actual_visibility = False
     with user_restricted:
         try:
             navigate_to(vis_object, 'Details')
             actual_visibility = True
         except Exception:
             logger.debug('Tagged item is not visible')
     assert actual_visibility == visibility_result
Ejemplo n.º 12
0
def test_tag_item_through_details(request, location, tag):
    """Add a tag to an item with going through the details page.

    Prerequisities:
        * Have a tag category and tag created.
        * Be on the page you want to test.

    Steps:
        * Click any quadicon.
        * On the details page, select ``Policy/Edit Tags`` and assign the tag to it.
        * Verify the tag is assigned. (TODO)
        * Select ``Policy/Edit Tags`` and remove the tag.
        * Verify the tag is not present. (TODO)
    """
    pytest.sel.force_navigate(location)
    tb.select('Grid View')
    if not Quadicon.any_present():
        pytest.skip("No Quadicon present, cannot test.")
    pytest.sel.click(Quadicon.first())
    request.addfinalizer(lambda: diaper(lambda: mixins.remove_tag(tag)))
    mixins.add_tag(tag)
    mixins.remove_tag(tag)
Ejemplo n.º 13
0
 def _check_item_visibility(vis_object, visibility_result):
     """
     Args:
         visibility_result: pass 'True' is item should be visible,
                            'False' if not
     """
     navigate_to(vis_object, 'Details')
     if visibility_result:
         mixins.add_tag(tag)
     else:
         try:
             mixins.remove_tag(tag)
         except TypeError:
             logger.debug('Tag is already removed')
     actual_visibility = False
     with user_restricted:
         try:
             navigate_to(vis_object, 'Details')
             actual_visibility = True
         except Exception:
             logger.debug('Tagged item is not visible')
     assert actual_visibility == visibility_result
Ejemplo n.º 14
0
 def untag(self, tag):
     """Removes the selected tag off the system"""
     navigate_to(self, 'Details')
     mixins.remove_tag(tag)
Ejemplo n.º 15
0
 def remove_tag(self, tag):
     self.load_details(refresh=True)
     mixins.remove_tag(tag)
Ejemplo n.º 16
0
 def remove_tag(self, tag):
     self.load_details(refresh=True)
     mixins.remove_tag(tag)
Ejemplo n.º 17
0
 def _delete():
     pytest.sel.force_navigate(location)
     tb.set_vms_grid_view()
     Quadicon.select_first_quad()
     mixins.remove_tag(tag)
Ejemplo n.º 18
0
 def _delete():
     pytest.sel.force_navigate(location)
     tb.select('Grid View')
     Quadicon.select_first_quad()
     mixins.remove_tag(tag)
Ejemplo n.º 19
0
 def untag(self, tag):
     """Removes the selected tag off the system"""
     self.navigate()
     mixins.remove_tag(tag)
Ejemplo n.º 20
0
 def remove_tag(self, tag, **kwargs):
     """Untag the Keypair by given tag"""
     navigate_to(self, 'Details')
     mixins.remove_tag(tag)
Ejemplo n.º 21
0
 def _delete():
     # Ignoring the result of the check here
     _navigate_and_check(location, appliance)
     mixins.remove_tag(tag)
Ejemplo n.º 22
0
 def _delete():
     pytest.sel.force_navigate(location)
     tb.set_vms_grid_view()
     Quadicon.select_first_quad()
     mixins.remove_tag(tag)
Ejemplo n.º 23
0
 def _delete():
     # Ignoring the result of the check here
     _navigate_and_check(location)
     Quadicon.select_first_quad()
     mixins.remove_tag(tag)
Ejemplo n.º 24
0
 def untag(self, tag):
     """Removes the selected tag off the system"""
     self.navigate()
     mixins.remove_tag(tag)
Ejemplo n.º 25
0
 def _delete():
     # Ignoring the result of the check here
     _navigate_and_check(location, appliance)
     mixins.remove_tag(tag)
Ejemplo n.º 26
0
 def untag(self, tag):
     """Removes the selected tag off the system"""
     navigate_to(self, 'EditTags')
     mixins.remove_tag(tag)
Ejemplo n.º 27
0
 def untag(self, tag):
     """Removes the selected tag off the system"""
     sel.force_navigate('infrastructure_host', context={'host': self})
     mixins.remove_tag(tag)
Ejemplo n.º 28
0
 def remove_tag(self, tag, **kwargs):
     """Untag the Keypair by given tag"""
     navigate_to(self, 'Details')
     mixins.remove_tag(tag)
 def untag(self, tag):
     """Removes the selected tag off the system"""
     navigate_to(self, "EditTags")
     mixins.remove_tag(tag)