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(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')
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')
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))
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))
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')