コード例 #1
0
ファイル: reports.py プロジェクト: apagac/cfme_tests
 def __init__(self, *args, **kwargs):
     ParametrizedView.__init__(self, *args, **kwargs)
     self.download.click()
     self.link.click()
コード例 #2
0
 def __init__(self, *args, **kwargs):
     ParametrizedView.__init__(self, *args, **kwargs)
     self.download.click()
     self.link.click()
コード例 #3
0
 class TestView(View):
     ROOT = ".//div[@id='ws-react-c-chip-group-single']"
     chips = ParametrizedView.nested(Chip)
コード例 #4
0
class DatastoreTileIconEntity(BaseTileIconEntity):
    quad_icon = ParametrizedView.nested(DatastoreQuadIconEntity)
コード例 #5
0
class HostTileIconEntity(BaseTileIconEntity):
    quad_icon = ParametrizedView.nested(HostQuadIconEntity)
コード例 #6
0
ファイル: credentials.py プロジェクト: lcouzens/cfme_tests
 class entities(View):  # noqa
     summary = ParametrizedView.nested(ParametrizedSummaryTable)
コード例 #7
0
class InstanceTileIconEntity(BaseTileIconEntity):
    """ Provider child of Tile Icon entity

    """
    quad_icon = ParametrizedView.nested(InstanceQuadIconEntity)
コード例 #8
0
class VolumeTileIconEntity(BaseTileIconEntity):
    quad_icon = ParametrizedView.nested(VolumeQuadIconEntity)
コード例 #9
0
class HostDetailsEntities(View):
    """Represents Details page."""
    summary = ParametrizedView.nested(ParametrizedSummaryTable)
コード例 #10
0
class DepRoleTileIconEntity(BaseTileIconEntity):
    quad_icon = ParametrizedView.nested(DepRoleQuadIconEntity)
コード例 #11
0
class PhysicalServerTileIconEntity(BaseTileIconEntity):
    quad_icon = ParametrizedView.nested(PhysicalServerQuadIconEntity)
コード例 #12
0
 def __init__(self, *args, **kwargs):
     ParametrizedView.__init__(self, *args, **kwargs)
コード例 #13
0
class StandAloneChipGroup(View):
    """
    Represents a chip group that is "on its own", i.e. not a part of a chip group toolbar
    """

    ROOT = ParametrizedLocator("{@locator}")

    overflow = OverflowChip()
    chips = ParametrizedView.nested(Chip)

    def __init__(self, parent, locator=None, logger=None):
        super().__init__(parent, logger=logger)
        self.locator = locator or GROUP_ROOT

    @property
    def label(self):
        # It's unlikely we'll have a labelled chip group that is not in a toolbar
        # ... but just in case
        elements = self.browser.elements(STANDALONE_GROUP_LABEL)
        return self.browser.text(elements[0]) if elements else None

    def show_more(self):
        """Expands a chip group"""
        self.overflow.show_more()

    def show_less(self):
        """Collapses a chip group"""
        self.overflow.show_less()

    @property
    def is_multiselect(self):
        return self.overflow.is_displayed

    def get_chips(self, show_more=True):
        """
        A helper to expand the chip group before reading its chips
        """
        if self.is_multiselect and show_more:
            self.show_more()
        return self.chips

    def __iter__(self):
        for chip in self.get_chips():
            yield chip

    def remove_chip_by_name(self, name):
        """Removes a chip from the group by name"""
        for chip in self:
            if chip.text.lower() == name.lower():
                chip.remove()
                break
        else:
            raise ValueError(f"Could not find chip with name '{name}'")

    def remove_all_chips(self):
        """Removes all chips from the group"""
        for chip in self:
            chip.remove()

    def read(self):
        return [chip.text for chip in self]
コード例 #14
0
class StandAloneChipGroup(ChipGroup):
    chips = ParametrizedView.nested(OldChip)
    overflow = ParametrizedView.nested(OldOverflowChip)
コード例 #15
0
class Cards(CardGroup):
    def __init__(self, parent, locator=None, logger=None, **kwargs):
        View.__init__(self, parent, logger=logger, **kwargs)
        self.locator = locator or './/section[@class="pf-c-page__main-section"]/div'

    cards = ParametrizedView.nested(PageCard)
コード例 #16
0
class Cards(CardGroup):
    def __init__(self, parent, locator=None, logger=None, **kwargs):
        View.__init__(self, parent, logger=logger, **kwargs)
        self.locator = locator or './/div[contains(@class, "pf-l-gallery")]'

    cards = ParametrizedView.nested(PageCard)