class ResourcePoolEntities(View): """Entities on the main list page""" title = Text('//div[@id="main-content"]//h1') table = Table("//div[@id='list_grid']//table") search = View.nested(Search) # element attributes changed from id to class in upstream-fine+, capture both with locator flash = FlashMessages('.//div[@id="flash_msg_div"]' '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
class TimeProfileForm(View): description = Input(id='description') scope = BootstrapSelect('profile_type') timezone = BootstrapSelect('profile_tz') days = BootstrapSwitch(name='all_days') hours = BootstrapSwitch(name='all_hours') cancel = Button('Cancel') help_block = Text('//span[contains(@class, "help-block")]')
class ClusterDetailsEntities(View): """A cluster properties on the details page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') relationships = SummaryTable(title='Relationships') totals_for_hosts = SummaryTable(title='Totals for Hosts') totals_for_vms = SummaryTable(title='Totals for VMs') configuration = SummaryTable(title='Configuration') smart_management = SummaryTable(title='Smart Management')
class StackOutputsEntities(View): """The entities of the resources page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') outputs = Table('//div[@id="list_grid"]//table') # element attributes changed from id to class in upstream-fine+, capture both with locator flash = FlashMessages( './/div[@id="flash_msg_div"]' '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
class ClusterEntities(View): """A list of clusters""" title = Text('//div[@id="main-content"]//h1') table = Table('//div[@id="list_grid"]//table') search = View.nested(Search) # element attributes changed from id to class in upstream-fine+, capture both with locator flash = FlashMessages( './/div[@id="flash_msg_div"]' '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
class KeyPairDetailsEntities(View): breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') flash = FlashMessages( './/div[@id="flash_msg_div"]' '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]') properties = SummaryTable(title='Properties') relationships = SummaryTable(title='Relationships') smart_management = SummaryTable(title='Smart Management')
class ResourcePoolView(BaseLoggedInPage): """Base view for header and nav checking, navigatable views should inherit this""" title = Text('//div[@id="main-content"]//h1') @property def in_resource_pool(self): nav_chain = ['Compute', 'Infrastructure', 'Resource Pools'] return (self.logged_in_as_current_user and self.navigation.currently_selected == nav_chain)
class NodeUtilizationView(NodeView): """View for utilization of a node""" title = Text('//div[@id="main-content"]//h1') @property def is_displayed(self): """Is this page currently being displayed""" return (self.in_node and self.title.text == '{} Capacity & Utilization'.format( self.context['object'].name))
class TenantDetailsEntities(View): """The entities on the details page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') relationships = SummaryTable(title='Relationships') quotas = SummaryTable(title='Quotas') smart_management = SummaryTable(title='Smart Management') # element attributes changed from id to class in upstream-fine+, capture both with locator flash = FlashMessages('.//div[@id="flash_msg_div"]' '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
class DeploymentRoleView(BaseLoggedInPage): """A base view for all the Deployment Role pages""" title = Text('.//div[@id="center_div" or @id="main-content"]//h1') @property def in_dep_role(self): """Determine if the Deployment page is currently open""" return (self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Infrastructure', 'Deployment Roles'])
class ClusterDetailsEntities(View): """A cluster properties on the details page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') relationships = SummaryTable(title='Relationships') totals_for_hosts = SummaryTable(title='Totals for Hosts') totals_for_vms = SummaryTable(title='Totals for VMs') configuration = SummaryTable(title='Configuration') smart_management = SummaryTable(title='Smart Management') # element attributes changed from id to class in upstream-fine+, capture both with locator flash = FlashMessages('.//div[@id="flash_msg_div"]' '/div[@id="flash_text_div" or contains(@class, "flash_text_div")]')
class TimeProfileAddForm(View): description = Input(id='description') scope = BootstrapSelect('profile_type') timezone = BootstrapSelect('profile_tz') days = BootstrapSwitch(name='all_days') hours = BootstrapSwitch(name='all_hours') save_button = Button(VersionPick({Version.lowest(): 'Save', '5.9': 'Add'})) configuration = Dropdown('Configuration') table = Table("//div[@id='main_div']//table") save_edit_button = Button('Save') cancel_button = Button('Cancel') help_block = Text("//span[contains(@class, 'help-block')]")
class FlavorEditTagsView(FlavorView): @property def is_displayed(self): return (self.in_availability_zones and self.entities.title.text == 'Tag Assignment' and '{} (Summary)'.format(self.context['object'].name) in self.entities.breadcrumb.locations) breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h3') save = Button('Save') reset = Button('Reset') cancel = Button('Cancel')
class DeploymentRoleEditTagsView(DeploymentRoleView): """The edit tags of Deployment Role""" breadcrumb = BreadCrumb() title = Text('#explorer_title_text') select_tag = BootstrapSelect('tag_cat') select_value = BootstrapSelect('tag_add') save_button = Button('Save') reset_button = Button('Reset') cancel = Button('Cancel') @property def is_displayed(self): """Is this page currently being displayed""" return (self.in_dep_role and self.breadcrumb.active_location == 'Tag Assignment')
class AvailabilityZoneEditTagsView(AvailabilityZoneView): breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h3') # TODO Add tag table support when rowspan is supported in SummaryTable # TODO Add quadicon area save = Button('Save') reset = Button('Reset') cancel = Button('Cancel') @property def is_displayed(self): return ( self.in_availability_zones and self.title.text == 'Tag Assignment' and '{} (Summary)'.format(self.context['object'].name) in self.breadcrumb.locations)
class MySettingsEntities(View): table = Table('//div[@id="main_div"]//table') breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h3')
class TenantEditTagEntities(View): """The entities on the edit tags page""" breadcrumb = BreadCrumb() title = Text('#explorer_title_text') included_widgets = View.include(BaseNonInteractiveEntitiesView, use_parent=True)
class TenantEditEntities(View): """The entities on the add/edit page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1')
class KeyPairAddEntities(View): breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1')
class StackParametersEntities(View): """The entities of the resources page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') parameters = Table('//div[@id="list_grid"]//table')
class KeyPairDetailsEntities(View): breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') properties = SummaryTable(title='Properties') relationships = SummaryTable(title='Relationships') smart_management = SummaryTable(title='Smart Management')
class AvailabilityZoneDetailsEntities(View): """View containing the widgets for the main content pane on the details page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') relationships = SummaryTable(title='Relationships') smart_management = SummaryTable(title='Smart Management')
class TimeprofileAddEntities(View): breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h3')
class StackOutputsEntities(View): """The entities of the resources page""" breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1') outputs = Table('//div[@id="gtl_div"]//table')
class FlavorEntities(View): title = Text('//div[@id="main-content"]//h1') table = Table("//div[@id='gtl_div']//table") search = View.nested(Search)
class SecurityGroupAddEntities(View): breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h1')
class AvailabilityZoneEntities(View): """View containing the widgets for the main content pane""" title = Text('//div[@id="main-content"]//h1') table = Table("//div[@id='gtl_div']//table") search = View.nested(Search)
class InfraNetworkingEntities(View): """Entities on the main page""" title = Text('//div[@id="main-content"]//h1')
class TimeProfilesView(BaseLoggedInPage): table = Table("//div[@id='main_div']//table") help_block = Text("//span[contains(@class, 'help-block')]") configuration = Dropdown('Configuration')
class TimeProfileEntities(View): table = Table('//div[@id="main_div"]//table') breadcrumb = BreadCrumb() title = Text('//div[@id="main-content"]//h3')