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')
Example #3
0
def test_server_name(request, appliance):
    """Tests that changing the server name updates the about page"""

    view = navigate_to(appliance.server, 'Details')
    old_server_name = view.server.basic_information.appliance_name.read()

    @request.addfinalizer
    def _ensure_name_reset():
        appliance.server.settings.update_basic_information({'appliance_name': old_server_name})

    new_server_name = "{}-TEST".format(old_server_name)
    appliance.server.settings.update_basic_information({'appliance_name': new_server_name})
    flash_message = (
        'Configuration settings saved for {} Server "{} [{}]" in Zone "{}"'.format(
            appliance.product_name,
            appliance.server.name,
            appliance.server.sid,
            appliance.server.zone.name))

    view.flash.assert_message(flash_message)

    # 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, server=appliance.server)

    assert new_server_name == current_server_name, (
        "Server name in About section does not match the new name")
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')
Example #5
0
def test_version(appliance):
    """Check version presented in UI against version retrieved directly from the machine.

    Version retrieved from appliance is in this format: 1.2.3.4
    Version in the UI is always: 1.2.3.4.20140505xyzblabla

    So we check whether the UI version starts with SSH version
    """
    ssh_version = str(appliance.version)
    ui_version = about.get_detail(about.VERSION, server=appliance.server)
    assert ui_version.startswith(ssh_version), "UI: {}, SSH: {}".format(ui_version, ssh_version)
def test_version():
    """Check version presented in UI against version retrieved directly from the machine.

    Version retrieved from appliance is in this format: 1.2.3.4
    Version in the UI is always: 1.2.3.4.20140505xyzblabla

    So we check whether the UI version starts with SSH version
    """
    ssh_version = str(version.current_version())
    ui_version = about.get_detail(about.VERSION)
    assert ui_version.startswith(ssh_version), "UI: {}, SSH: {}".format(
        ui_version, ssh_version)
def test_version():
    """Check version presented in UI against version retrieved directly from the machine.

    Version retrieved from appliance is in this format: 1.2.3.4
    Version in the UI is always: 1.2.3.4.20140505xyzblabla

    So we check whether the UI version starts with SSH version
    """
    ssh_version = str(version.current_version())
    ui_version = get_detail(version.pick({
        version.LOWEST: ('Session Information', 'Version'),
        '5.7': 'Version'}))
    assert ui_version.startswith(ssh_version), "UI: {}, SSH: {}".format(ui_version, ssh_version)
Example #8
0
def test_about_zone(appliance):
    """
    Polarion:
        assignee: pvala
        casecomponent: WebUI
        caseimportance: medium
        initialEstimate: 1/4h
        testSteps:
            1. Open `About` modal and check the value of Zone.

    Bugzilla:
        1402112
    """
    about_version = about.get_detail(about.ZONE, appliance.server)
    assert about_version == appliance.server.zone.name
Example #9
0
def test_version():
    """Check version presented in UI against version retrieved directly from the machine.

    Version retrieved from appliance is in this format: 1.2.3.4
    Version in the UI is always: 1.2.3.4.20140505xyzblabla

    So we check whether the UI version starts with SSH version
    """
    ssh_version = str(version.current_version())
    ui_version = get_detail(
        version.pick({
            version.LOWEST: ('Session Information', 'Version'),
            '5.7': 'Version'
        }))
    assert ui_version.startswith(ssh_version), "UI: {}, SSH: {}".format(
        ui_version, ssh_version)
Example #10
0
def test_appliance_version(appliance):
    """Check version presented in UI against version retrieved directly from the machine.

    Version retrieved from appliance is in this format: 1.2.3.4
    Version in the UI is always: 1.2.3.4.20140505xyzblabla

    So we check whether the UI version starts with SSH version

    Polarion:
        assignee: jhenner
        caseimportance: high
        initialEstimate: 1/4h
    """
    ssh_version = str(appliance.version)
    ui_version = about.get_detail(about.VERSION, server=appliance.server)
    assert ui_version.startswith(ssh_version), "UI: {}, SSH: {}".format(ui_version, ssh_version)
Example #11
0
def test_appliance_version(appliance):
    """Check version presented in UI against version retrieved directly from the machine.

    Version retrieved from appliance is in this format: 1.2.3.4
    Version in the UI is always: 1.2.3.4.20140505xyzblabla

    So we check whether the UI version starts with SSH version

    Polarion:
        assignee: jhenner
        casecomponent: Appliance
        caseimportance: high
        initialEstimate: 1/4h
    """
    ssh_version = str(appliance.version)
    ui_version = about.get_detail(about.VERSION, server=appliance.server)
    assert ui_version.startswith(ssh_version), "UI: {}, SSH: {}".format(ui_version, ssh_version)
def test_server_name(appliance):
    """Tests that changing the server name updates the about page"""

    view = navigate_to(appliance.server.settings, 'Details')
    old_server_name = view.basic_information.appliance_name.read()
    new_server_name = "{}-CFME".format(old_server_name)
    appliance.server.settings.update_basic_information(
        {'appliance_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')
    appliance.server.settings.update_basic_information(
        {'appliance_name': old_server_name})
    clear_property_cache(appliance, 'configuration_details')
Example #13
0
def test_server_name(request, appliance):
    """Tests that changing the server name updates the about page

    Polarion:
        assignee: pvala
        casecomponent: Configuration
        caseimportance: low
        initialEstimate: 1/15h
    """

    view = navigate_to(appliance.server, 'Details')
    old_server_name = view.server.basic_information.appliance_name.read()
    assert old_server_name != ''  # name should at least be set

    @request.addfinalizer
    def _ensure_name_reset():
        appliance.rename(old_server_name)

    new_server_name = fauxfactory.gen_alpha(length=20)
    assert view.server.basic_information.appliance_name.fill(new_server_name)
    assert view.server.save.is_enabled
    view.server.save.click()  # no boolean return
    assert appliance.server.name == new_server_name

    view.flash.assert_success_message(
        'Configuration settings saved for {} Server "{} [{}]" in Zone "{}"'.
        format(appliance.product_name, appliance.server.name,
               appliance.server.sid, appliance.server.zone.name))

    # CFME updates about box only after any navigation BZ(1408681) - closed wontfix
    view = navigate_to(appliance.server, 'Dashboard')
    view.browser.refresh()

    # opens and closes about modal
    assert new_server_name == about.get_detail(
        about.SERVER, server=appliance.server), (
            "Server name in About section does not match the new name")