def test_projects_rel(provider, rel):
    sel.force_navigate('containers_projects')
    list_tbl_project = CheckboxTable(
        table_locator="//div[@id='list_grid']//table")
    ui_projects = [r.name.text for r in list_tbl_project.rows()]
    mgmt_objs = provider.mgmt.list_project()  # run only if table is not empty

    if ui_projects:
        # verify that mgmt pods exist in ui listed pods
        assert set(ui_projects).issubset(
            [obj.name for obj in mgmt_objs]), 'Missing objects'

    for name in ui_projects:
        obj = Project(name, provider)

        val = obj.get_detail('Relationships', rel)
        if val == '0':
            continue
        obj.click_element('Relationships', rel)

        try:
            val = int(val)
            assert len([r for r in list_tbl_project.rows()]) == val
        except ValueError:
            assert val == InfoBlock.text('Properties', 'Name')
def test_containers_projects_summary_properties(provider):
    """ Properties fields tests in Project summary
        This test checks correct population of the Properties Fields in Containers Projects'
        details menu
        Steps:
            * Goes to Containers -- > Projects menu
            * Go through each Container Project in the menu and check validity of Properties fields
        """
    navigate_to(Project, 'All')
    project_name = [r.name.text for r in list_tbl.rows()]
    for name in project_name:
        for field in projects_properties_fields:
            obj = Project(name, provider)
            val = obj.get_detail('Properties', field)
            assert val
Exemplo n.º 3
0
def test_containers_projects_summary_properties(provider):
    """ Properties fields tests in Project summary
        This test checks correct population of the Properties Fields in Containers Projects'
        details menu
        Steps:
            * Goes to Containers -- > Projects menu
            * Go through each Container Project in the menu and check validity of Properties fields
        """
    sel.force_navigate('containers_projects')
    project_name = [r.name.text for r in list_tbl.rows()]
    for name in project_name:
        for field in projects_properties_fields:
            obj = Project(name, provider)
            val = obj.get_detail('Properties', field)
            assert val
def test_containers_projects_summary_relationships(provider):
    """ Relationships fields tests in Project summary
        This test checks correct population of the Relationships Fields in Containers Projects'
        details menu
        Steps:
            * Goes to Containers -- > Projects menu
            * Go through each Container Project in the menu and check validity of
            Relationships fields
        """
    sel.force_navigate('containers_projects')
    project_name = [r.name.text for r in list_tbl.rows()]
    for name in project_name:
        for field in projects_relationships_fields:
            obj = Project(name, provider)
            val = obj.get_detail('Relationships', field)
            assert val
Exemplo n.º 5
0
def test_projects_rel(provider, rel):
    sel.force_navigate('containers_projects')
    ui_projects = [r.name.text for r in list_tbl.rows()]
    mgmt_objs = provider.mgmt.list_project()  # run only if table is not empty

    if ui_projects:
        # verify that mgmt pods exist in ui listed pods
        assert set(ui_projects).issubset([obj.name for obj in mgmt_objs
                                          ]), 'Missing objects'

    for name in ui_projects:
        obj = Project(name, provider)

        val = obj.get_detail('Relationships', rel)
        if val == '0':
            continue
        obj.click_element('Relationships', rel)

        try:
            val = int(val)
            assert len([r for r in list_tbl.rows()]) == val
        except ValueError:
            assert val == InfoBlock.text('Properties', 'Name')