def am_i_here(self): if not match_location(): return False summary = summary_title() return summary.startswith("Automate Method [{} - Updated".format(self.obj.display_name)) or summary.startswith( "Automate Method [{} - Updated".format(self.obj.name) )
def in_tenants(self): """Determine if the Tenants page is currently open""" return ( self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Clouds', 'Tenants'] and # TODO: Needs to be converted once there's a Widgetastic alternative match_location(controller='cloud_tenant', title='Cloud Tenants'))
def in_stacks(self): """Determine if the Stacks page is currently open""" return ( self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Clouds', 'Stacks'] and # TODO: Needs to be converted once there's a Widgetastic alternative match_location(controller='orchestration_stack', title='Stacks'))
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 and # TODO: Also needs to be converted to Widgetastic match_location(controller='resource_pool', title='Resource Pools'))
def in_cluster(self): """Determine if the browser has navigated to the Cluster page""" return ( self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Infrastructure', 'Clusters'] and # TODO: needs to be converted to Widgetastic once we have a replacement match_location(controller='ems_cluster', title='Clusters'))
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 and # TODO: Also needs to be converted to Widgetastic match_location(controller='resource_pool', title='Resource Pools'))
def test_start_page(request, setup_a_provider, start_page): """ Tests start page Metadata: test_flag: visuals """ request.addfinalizer(set_default_page) visual.login_page = start_page login.logout() login.login_admin() match_args = landing_pages[start_page] assert match_location(**match_args), "Landing Page Failed"
def test_cloud_start_page(request, appliance, start_page): """ Tests start page Metadata: test_flag: visuals """ request.addfinalizer(set_default_page) visual.login_page = start_page appliance.server.logout() appliance.server.login_admin() match_args = landing_pages[start_page] assert match_location(**match_args), "Landing Page Failed"
def in_availability_zones(self): return (self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Clouds', 'Flavors'] and match_location(controller='flavor', title='Flavors'))
def am_i_here(self): return match_location(controller="miq_task", title="All UI Tasks") and tabs.is_tab_selected(self.tab_name)
def am_i_here(self): return match_location(summary="Datastore") and sel.is_displayed("#seq_fields")
def am_i_here(self): return match_location(summary="Adding a new Automate Namespace")
def in_cloud_instance(self): return (self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Clouds', 'Instances'] and match_location(controller='vm_cloud', title='Instances'))
def am_i_here(self): return match_location(summary='Automate Namespace "{}"'.format(self.obj.name))
def am_i_here(self): if match_location(title='Configuration', controller='configuration'): return tabs.is_tab_selected('Default Views')
def in_volume(self): nav = Volume.nav.pick(self.context['object'].appliance.version) return (self.logged_in_as_current_user and self.navigation.currently_selected == nav and match_location(controller='cloud_volume', title='Cloud Volumes'))
def in_keypair(self): return( self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Clouds', 'Key Pairs'] and match_location(controller='auth_key_pair_cloud', title='Key Pairs'))
def am_i_here(self): return match_location(summary="Adding a new Automate Method")
def am_i_here(self): return match_location(summary='Editing Class Schema "{}"'.format(self.obj.name))
def am_i_here(self): return match_location(summary='Automate Class "{}"'.format(self.obj.name_in_table))
def am_i_here(self): return match_location(summary="Adding a new Class")
def in_volume(self): nav = Volume.nav.pick(self.context['object'].appliance.version) return ( self.logged_in_as_current_user and self.navigation.currently_selected == nav and match_location(controller='cloud_volume', title='Cloud Volumes'))
def am_i_here(self): return match_location(controller='miq_task', title='All UI Tasks') and \ tabs.is_tab_selected(self.tab_name)
def in_keypair(self): return (self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Clouds', 'Key Pairs'] and match_location( controller='auth_key_pair_cloud', title='Key Pairs'))
def am_i_here(self): return match_location(summary='Editing Automate Method "{}"'.format(self.obj.name))
def am_i_here(self): return match_location(summary="Adding a new Automate Instance")
def in_infra_vms(self): return ( self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Infrastructure', 'Virtual Machines'] and match_location(controller='vm_infra', title='Virtual Machines'))
def in_availability_zones(self): return ( self.logged_in_as_current_user and self.navigation.currently_selected == ['Compute', 'Clouds', 'Availability Zones'] and match_location(controller='availability_zone', title='Availability Zones'))