def test_cannot_delete_more_than_once(single_provider): """When Delete button appars, it does not want to go away""" filter_name = fauxfactory.gen_alphanumeric() assert search.save_filter("fill_count(Infrastructure Provider.VMs, >, 0)", filter_name) assert search.load_filter(filter_name) # circumvent the thing happening in previous test # Delete once if not search.delete_filter(): pytest.fail("Could not delete the filter even first time!") assert_no_cfme_exception() # Try it second time if search.delete_filter(): # If the button is there, it says True # This should not happen msg = "Delete twice accepted!" if is_cfme_exception(): msg += " CFME Exception text: `{}`".format(cfme_exception_text()) pytest.fail(msg)
def test_cannot_delete_more_than_once(request): """When Delete button appars, it does not want to go away""" sel.force_navigate("infra_vms") filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Virtual Machine.Files, >, 0)", filter_name) search.load_filter(filter_name) # circumvent the thing happening in previous test # Delete once if not search.delete_filter(): pytest.fail("Could not delete the filter even first time!") assert_no_cfme_exception() # Try it second time if search.delete_filter(): # If the button is there, it says True # This should not happen msg = "Delete twice accepted!" if is_cfme_exception(): msg += " CFME Exception text: `{}`".format(cfme_exception_text()) pytest.fail(msg)
def test_cannot_delete_more_than_once(request, nuke_browser_after_test): """When Delete button appars, it does not want to go away""" pytest.sel.force_navigate("infrastructure_hosts") filter_name = fauxfactory.gen_alphanumeric() search.save_filter(get_expression(False).format(0), filter_name) search.load_filter(filter_name) # circumvent the thing happening in previous test # Delete once if not search.delete_filter(): pytest.fail("Could not delete the filter even first time!") assert_no_cfme_exception() # Try it second time if search.delete_filter(): # If the button is there, it says True # This should not happen msg = "Delete twice accepted!" if is_cfme_exception(): msg += " CFME Exception text: `{}`".format(cfme_exception_text()) pytest.fail(msg)
def test_delete_button_should_appear_after_save(single_provider, rails_delete_filter): """Delete button appears only after load, not after save""" # bind filter_name to the function for fixture cleanup test_delete_button_should_appear_after_save.filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Infrastructure Provider.VMs, >, 0)", test_delete_button_should_appear_after_save.filter_name) if not search.delete_filter(): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def test_can_delete_filter(): sel.force_navigate("infra_vms") filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Virtual Machine.Files, >, 0)", filter_name) assert_no_cfme_exception() search.reset_filter() assert_no_cfme_exception() search.load_filter(filter_name) assert_no_cfme_exception() if not search.delete_filter(): raise pytest.fail("Cannot delete filter! Probably the delete button is not present!") assert_no_cfme_exception()
def test_can_delete_filter(): sel.force_navigate("infrastructure_hosts") filter_name = generate_random_string() search.save_filter("fill_count(Host.VMs, >, 0)", filter_name) assert_no_cfme_exception() search.reset_filter() assert_no_cfme_exception() search.load_filter(filter_name) assert_no_cfme_exception() if not search.delete_filter(): raise pytest.fail("Cannot delete filter! Probably the delete button is not present!") assert_no_cfme_exception()
def test_can_delete_filter(): pytest.sel.force_navigate("infrastructure_hosts") filter_name = fauxfactory.gen_alphanumeric() search.save_filter(get_expression(False).format(0), filter_name) assert_no_cfme_exception() search.reset_filter() assert_no_cfme_exception() search.load_filter(filter_name) assert_no_cfme_exception() if not search.delete_filter(): raise pytest.fail("Cannot delete filter! Probably the delete button is not present!") assert_no_cfme_exception()
def test_can_delete_filter(single_provider): filter_name = fauxfactory.gen_alphanumeric() logger.debug('Set filter_name to: {}'.format(filter_name)) assert search.save_filter("fill_count(Infrastructure Provider.VMs, >, 0)", filter_name) assert_no_cfme_exception() search.reset_filter() assert_no_cfme_exception() search.load_filter(filter_name) assert_no_cfme_exception() if not search.delete_filter(): raise pytest.fail("Cannot delete filter! Probably the delete button is not present!") assert_no_cfme_exception()
def test_can_delete_filter(): pytest.sel.force_navigate("infrastructure_providers") filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Infrastructure Provider.VMs, >, 0)", filter_name) assert_no_cfme_exception() search.reset_filter() assert_no_cfme_exception() search.load_filter(filter_name) assert_no_cfme_exception() if not search.delete_filter(): raise pytest.fail("Cannot delete filter! Probably the delete button is not present!") assert_no_cfme_exception()
def test_delete_button_should_appear_after_save(request): """Delete button appears only after load, not after save""" sel.force_navigate("infrastructure_hosts") filter_name = generate_random_string() search.save_filter("fill_count(Host.VMs, >, 0)", filter_name) def cleanup(): search.load_filter(filter_name) search.delete_filter() request.addfinalizer(cleanup) if not search.delete_filter(): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def test_delete_button_should_appear_after_save(request): """Delete button appears only after load, not after save""" sel.force_navigate("infra_vms") filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Virtual Machine.Files, >, 0)", filter_name) def cleanup(): sel.force_navigate("infra_vms") search.load_filter(filter_name) search.delete_filter() request.addfinalizer(cleanup) if not search.delete_filter(): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def test_delete_button_should_appear_after_save(request): """Delete button appears only after load, not after save""" pytest.sel.force_navigate("infrastructure_hosts") filter_name = fauxfactory.gen_alphanumeric() search.save_filter(get_expression(False).format(0), filter_name) @request.addfinalizer def cleanup(): pytest.sel.force_navigate("infrastructure_hosts") search.load_filter(filter_name) search.delete_filter() if not search.delete_filter(): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def test_delete_button_should_appear_after_save(request): """Delete button appears only after load, not after save""" pytest.sel.force_navigate("infrastructure_providers") filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Infrastructure Provider.VMs, >, 0)", filter_name) @request.addfinalizer def cleanup(): pytest.sel.force_navigate("infrastructure_providers") search.load_filter(filter_name) search.delete_filter() if not search.delete_filter(): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def test_delete_button_should_appear_after_save(request): """Delete button appears only after load, not after save""" navigate_to(Vm, 'VMsOnly') filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Virtual Machine.Files, >, 0)", filter_name) @request.addfinalizer def cleanup(): navigate_to(Vm, 'VMsOnly') search.load_filter(filter_name) search.delete_filter() if not search.delete_filter( ): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def test_delete_button_should_appear_after_save(request): """Delete button appears only after load, not after save""" pytest.sel.force_navigate("infrastructure_hosts") filter_name = fauxfactory.gen_alphanumeric() search.save_filter(get_expression(False).format(0), filter_name) @request.addfinalizer def cleanup(): pytest.sel.force_navigate("infrastructure_hosts") search.load_filter(filter_name) search.delete_filter() if not search.delete_filter( ): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def test_delete_button_should_appear_after_save(request): """Delete button appears only after load, not after save""" sel.force_navigate("infrastructure_providers") filter_name = fauxfactory.gen_alphanumeric() search.save_filter("fill_count(Infrastructure Provider.VMs, >, 0)", filter_name) def cleanup(): sel.force_navigate("infrastructure_providers") search.load_filter(filter_name) search.delete_filter() request.addfinalizer(cleanup) if not search.delete_filter( ): # Returns False if the button is not present pytest.fail("Could not delete filter right after saving!")
def cleanup(): navigate_to(host_collection, 'All') search.load_filter(filter_name) search.delete_filter()
def cleanup(): search.load_filter(filter_name) search.delete_filter()
def cleanup(): pytest.sel.force_navigate("infrastructure_hosts") search.load_filter(filter_name) search.delete_filter()
def cleanup(): navigate_to(Vm, 'VMsOnly') search.load_filter(filter_name) search.delete_filter()
def cleanup(): sel.force_navigate("infrastructure_providers") search.load_filter(filter_name) search.delete_filter()
def cleanup(): sel.force_navigate("infra_vms") search.load_filter(filter_name) search.delete_filter()
def cleanup(): navigate_to(Host, 'All') search.load_filter(filter_name) search.delete_filter()
def cleanup(): pytest.sel.force_navigate("infra_vms") search.load_filter(filter_name) search.delete_filter()