def test_server_name(appliance):
    """Tests that changing the server name updates the about page"""
    flash_msg = 'Configuration settings saved for CFME Server "{}'

    navigate_to(appliance.server, 'Server')
    old_server_name = sel.value(
        BasicInformation.basic_information.appliance_name)

    new_server_name = old_server_name + "-CFME"
    settings_pg = BasicInformation(appliance_name=new_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(new_server_name))
    appliance.server.name = new_server_name
    # CFME updates about box only after any navigation BZ(1408681)
    navigate_to(appliance.server, 'Dashboard')

    current_server_name = get_detail('Server Name')
    if version.current_version() >= '5.7':
        # New modal
        sel.click(
            '//div[contains(@class, "about-modal-pf")]//button[@class="close"]'
        )

    assert new_server_name == current_server_name, \
        "Server name in About section does not match the new name"

    clear_property_cache(store.current_appliance, 'configuration_details')

    settings_pg = BasicInformation(appliance_name=old_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(old_server_name))
    appliance.server.name = old_server_name

    clear_property_cache(store.current_appliance, 'configuration_details')
def test_server_name():
    """Tests that changing the server name updates the about page"""
    flash_msg = 'Configuration settings saved for CFME Server "{}'

    navigate_to(current_appliance.server, 'Server')
    old_server_name = sel.value(BasicInformation.basic_information.appliance_name)
    new_server_name = old_server_name + "-CFME"
    settings_pg = BasicInformation(appliance_name=new_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(new_server_name))
    # CFME updates about box only after any navigation BZ(1408681)
    navigate_to(current_appliance.server, 'Dashboard')

    # if version.current_version() < '5.7':
    #     current_server_name = InfoBlock('Session Information', 'Server Name').text
    #     navigate_to(current_appliance.server, 'About')
    # else:
    current_server_name = get_detail('Server Name')
    close_button = sel.element('//div[contains(@class, "about-modal-pf")]//button[@class="close"]')
    close_button.click()

    assert new_server_name == current_server_name, \
        "Server name in About section does not match the new name"

    clear_property_cache(store.current_appliance, 'configuration_details')

    settings_pg = BasicInformation(appliance_name=old_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(old_server_name))

    clear_property_cache(store.current_appliance, 'configuration_details')
Пример #3
0
def test_server_name(appliance):
    """Tests that changing the server name updates the about page"""
    flash_msg = 'Configuration settings saved for CFME Server "{}'

    navigate_to(appliance.server, 'Server')
    old_server_name = sel.value(BasicInformation.basic_information.appliance_name)

    new_server_name = old_server_name + "-CFME"
    settings_pg = BasicInformation(appliance_name=new_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(new_server_name))
    appliance.server.name = new_server_name
    # CFME updates about box only after any navigation BZ(1408681) - closed wontfix
    navigate_to(appliance.server, 'Dashboard')

    # opens and closes about modal
    current_server_name = about.get_detail(about.SERVER)

    assert new_server_name == current_server_name, \
        "Server name in About section does not match the new name"

    clear_property_cache(appliance, 'configuration_details')

    settings_pg = BasicInformation(appliance_name=old_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(old_server_name))
    appliance.server.name = old_server_name

    clear_property_cache(appliance, 'configuration_details')
Пример #4
0
def ensure_no_filter_applied():
    """If any filter is applied in the quadicon view, it will be disabled."""
    # The expression filter
    if is_advanced_filter_applied():
        sel.click(search_box.clear_advanced_search)
    # The simple filter
    if len(sel.value(search_box.search_field).strip()) > 0:
        sel.set_text(search_box.search_field, "")
        sel.click(search_box.search_icon)
Пример #5
0
def ensure_no_filter_applied():
    """If any filter is applied in the quadicon view, it will be disabled."""
    # The expression filter
    if is_advanced_filter_applied():
        sel.click(search_box.clear_advanced_search)
    # The simple filter
    if len(sel.value(search_box.search_field).strip()) > 0:
        sel.set_text(search_box.search_field, "")
        sel.click(search_box.search_icon)
Пример #6
0
def ensure_no_filter_applied():
    """If any filter is applied in the quadicon view, it will be disabled."""
    # The expression filter
    if is_advanced_filter_applied():
        logger.debug("search.ensure_no_filter_applied: advanced filter applied, removing")
        # Clear filter using breadcrumb link
        ensure_advanced_search_closed()
        sel.click(search_box.clear_advanced_search)

    # The simple filter
    if len(sel.value(search_box.search_field).strip()) > 0:
        logger.debug("search.ensure_no_filter_applied: simple filter applied, removing")
        sel.set_text(search_box.search_field, "")
        sel.click(search_box.search_icon)

    reset_filter()
Пример #7
0
def test_server_name():
    """Tests that changing the server name updates the about page"""
    form_infoblocks = InfoBlock('form')
    flash_msg = 'Configuration settings saved for CFME Server "{}'

    sel.force_navigate('cfg_settings_currentserver_server')
    old_server_name = sel.value(BasicInformation.basic_information.appliance_name)
    new_server_name = old_server_name + "-CFME"
    settings_pg = BasicInformation(appliance_name=new_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(new_server_name))

    sel.force_navigate('about')
    assert new_server_name == form_infoblocks.text('Session Information', 'Server Name'),\
        "Server name in About section does not match the new name"

    settings_pg = BasicInformation(appliance_name=old_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(old_server_name))
Пример #8
0
def ensure_no_filter_applied():
    """If any filter is applied in the quadicon view, it will be disabled."""
    # The expression filter
    if is_advanced_filter_applied():
        logger.debug(
            'search.ensure_no_filter_applied: advanced filter applied, removing'
        )
        # Clear filter using breadcrumb link
        ensure_advanced_search_closed()
        sel.click(search_box.clear_advanced_search)

    # The simple filter
    if len(sel.value(search_box.search_field).strip()) > 0:
        logger.debug(
            'search.ensure_no_filter_applied: simple filter applied, removing')
        sel.set_text(search_box.search_field, "")
        sel.click(search_box.search_icon)

    reset_filter()
Пример #9
0
def test_server_name():
    """Tests that changing the server name updates the about page"""
    form_infoblocks = InfoBlock('form')
    flash_msg = 'Configuration settings saved for CFME Server "{}'

    sel.force_navigate('cfg_settings_currentserver_server')
    old_server_name = sel.value(
        BasicInformation.basic_information.appliance_name)
    new_server_name = old_server_name + "-CFME"
    settings_pg = BasicInformation(appliance_name=new_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(new_server_name))

    sel.force_navigate('about')
    assert new_server_name == form_infoblocks.text('Session Information', 'Server Name'),\
        "Server name in About section does not match the new name"

    settings_pg = BasicInformation(appliance_name=old_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(old_server_name))
Пример #10
0
def test_server_name():
    """Tests that changing the server name updates the about page"""
    flash_msg = 'Configuration settings saved for CFME Server "{}'

    navigate_to(current_appliance.server, 'Server')
    old_server_name = sel.value(BasicInformation.basic_information.appliance_name)
    new_server_name = old_server_name + "-CFME"
    settings_pg = BasicInformation(appliance_name=new_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(new_server_name))

    sel.force_navigate('about')
    assert new_server_name == InfoBlock('Session Information', 'Server Name').text,\
        "Server name in About section does not match the new name"

    clear_property_cache(store.current_appliance, 'configuration_details')

    settings_pg = BasicInformation(appliance_name=old_server_name)
    settings_pg.update()
    flash.assert_message_contain(flash_msg.format(old_server_name))

    clear_property_cache(store.current_appliance, 'configuration_details')
Пример #11
0
 def get_date(self):
     """Returns selected date from options"""
     self._object.load_chart_reference()
     if sel.is_displayed(self._date):
         return sel.value(self._date)
     return None
Пример #12
0
 def get_date(self):
     """Returns selected date from options"""
     self._object.load_chart_reference()
     if sel.is_displayed(self._date):
         return sel.value(self._date)
     return None