示例#1
0
 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)
     )
示例#2
0
 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'))
示例#3
0
 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'))
示例#4
0
 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'))
示例#5
0
 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'))
示例#6
0
 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'))
示例#7
0
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"
示例#9
0
 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'))
示例#10
0
 def am_i_here(self):
     return match_location(controller="miq_task", title="All UI Tasks") and tabs.is_tab_selected(self.tab_name)
示例#11
0
 def am_i_here(self):
     return match_location(summary="Datastore") and sel.is_displayed("#seq_fields")
示例#12
0
 def am_i_here(self):
     return match_location(summary="Adding a new Automate Namespace")
示例#13
0
 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'))
示例#14
0
 def am_i_here(self):
     return match_location(summary='Automate Namespace "{}"'.format(self.obj.name))
示例#15
0
 def am_i_here(self):
     if match_location(title='Configuration', controller='configuration'):
         return tabs.is_tab_selected('Default Views')
示例#16
0
 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'))
示例#17
0
 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'))
示例#18
0
 def am_i_here(self):
     return match_location(summary="Adding a new Automate Method")
示例#19
0
 def am_i_here(self):
     return match_location(summary='Editing Class Schema "{}"'.format(self.obj.name))
示例#20
0
 def am_i_here(self):
     return match_location(summary='Automate Class "{}"'.format(self.obj.name_in_table))
示例#21
0
 def am_i_here(self):
     return match_location(summary="Adding a new Class")
示例#22
0
 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'))
示例#23
0
 def am_i_here(self):
     return match_location(controller='miq_task', title='All UI Tasks') and \
         tabs.is_tab_selected(self.tab_name)
示例#24
0
 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'))
示例#25
0
 def am_i_here(self):
     return match_location(summary='Editing Automate Method "{}"'.format(self.obj.name))
示例#26
0
 def am_i_here(self):
     return match_location(summary="Adding a new Automate Instance")
示例#27
0
 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'))
示例#28
0
 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'))
示例#29
0
 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'))