def test_filter_with_user_input_and_cancellation(single_provider): # Set up the filter search.fill_and_apply_filter( "fill_count(Infrastructure Provider.VMs, >=)", fill_callback={"COUNT": 0}, cancel_on_user_filling=True ) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(providers): sel.force_navigate("infrastructure_providers") # Set up the filter search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=)", {"COUNT": 0}, cancel_on_user_filling=True) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(): # Set up the filter search.fill_and_apply_filter( "fill_count(Infrastructure Provider.VMs, >=)", fill_callback={"COUNT": 0}, cancel_on_user_filling=True ) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(hosts, hosts_with_vm_count, host_with_median_vm): sel.force_navigate("infrastructure_hosts") median_host, median_vm_count = host_with_median_vm # Set up the filter search.fill_and_apply_filter(get_expression(True), {"COUNT": median_vm_count}, cancel_on_user_filling=True) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(providers): pytest.sel.force_navigate("infrastructure_providers") # Set up the filter search.fill_and_apply_filter( "fill_count(Infrastructure Provider.VMs, >=)", {"COUNT": 0}, cancel_on_user_filling=True ) assert_no_cfme_exception()
def test_quick_search_with_filter(request, single_provider): search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=, 0)") assert_no_cfme_exception() # Make sure that we empty the regular search field after the test request.addfinalizer(search.ensure_normal_search_empty) # Filter this host only search.normal_search(fauxfactory.gen_alphanumeric()) assert_no_cfme_exception()
def test_quick_search_with_filter(request): search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=, 0)") assert_no_cfme_exception() # Make sure that we empty the regular search field after the test request.addfinalizer(search.ensure_normal_search_empty) # Filter this host only search.normal_search(fauxfactory.gen_alphanumeric()) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(vms, subset_of_vms, expression_for_vms_subset): pytest.sel.force_navigate("infra_vms") vm = sample(subset_of_vms, 1)[0] # Set up the filter search.fill_and_apply_filter( "fill_field(Virtual Machine : Name, =)", {"Virtual Machine": vm}, cancel_on_user_filling=True ) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(vms, subset_of_vms, expression_for_vms_subset): sel.force_navigate("infra_vms") vm = pick(subset_of_vms, 1)[0] # Set up the filter search.fill_and_apply_filter("fill_field(Virtual Machine : Name, =)", {"Virtual Machine": vm}, cancel_on_user_filling=True) assert_no_cfme_exception()
def test_filter_without_user_input(hosts, hosts_with_vm_count, host_with_median_vm): navigate_to(Host, 'All') median_host, median_vm_count = host_with_median_vm # We will filter out hosts with less than median VMs more_than_median_hosts = list(dropwhile(lambda h: h[1] <= median_vm_count, hosts_with_vm_count)) # Set up the filter search.fill_and_apply_filter(get_expression(False).format(median_vm_count)) assert_no_cfme_exception() assert len(more_than_median_hosts) == len(host.get_all_hosts(do_not_navigate=True))
def test_filter_without_user_input(hosts, hosts_with_vm_count, host_with_median_vm): navigate_to(Host, 'All') median_host, median_vm_count = host_with_median_vm # We will filter out hosts with less than median VMs more_than_median_hosts = list(dropwhile(lambda h: h[1] <= median_vm_count, hosts_with_vm_count)) # Set up the filter search.fill_and_apply_filter(get_expression(False).format(median_vm_count)) assert_no_cfme_exception() assert len(more_than_median_hosts) == len(host.get_all_hosts())
def test_filter_with_user_input_and_cancellation(vms, subset_of_vms, expression_for_vms_subset): navigate_to(Vm, 'VMsOnly') vm = sample(subset_of_vms, 1)[0] # Set up the filter search.fill_and_apply_filter("fill_field(Virtual Machine : Name, =)", {"Virtual Machine": vm}, cancel_on_user_filling=True) assert_no_cfme_exception()
def test_quick_search_with_filter(request, providers): sel.force_navigate("infrastructure_providers") search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=, 0)") assert_no_cfme_exception() # Make sure that we empty the regular search field after the test request.addfinalizer(search.ensure_normal_search_empty) # Filter this host only search.normal_search(generate_random_string()) assert_no_cfme_exception()
def test_filter_without_user_input(vms, subset_of_vms, expression_for_vms_subset): sel.force_navigate("infra_vms") # Set up the filter search.fill_and_apply_filter(expression_for_vms_subset) assert_no_cfme_exception() vms_present = virtual_machines.get_all_vms(do_not_navigate=True) for vm in subset_of_vms: if vm not in vms_present: pytest.fail("Could not find VM {} after filtering!".format(vm))
def test_filter_without_user_input(hosts, hosts_with_vm_count, host_with_median_vm): pytest.sel.force_navigate("infrastructure_hosts") median_host, median_vm_count = host_with_median_vm # We will filter out hosts with less than median VMs more_than_median_hosts = list(dropwhile(lambda h: h[1] <= median_vm_count, hosts_with_vm_count)) # Set up the filter search.fill_and_apply_filter(get_expression(False).format(median_vm_count)) assert_no_cfme_exception() assert len(more_than_median_hosts) == len(host.get_all_hosts(do_not_navigate=True))
def test_filter_with_user_input(vms, subset_of_vms, expression_for_vms_subset): pytest.sel.force_navigate("infra_vms") vm = sample(subset_of_vms, 1)[0] # Set up the filter search.fill_and_apply_filter("fill_field(Virtual Machine : Name, =)", {"Virtual Machine": vm}) assert_no_cfme_exception() vms_present = virtual_machines.get_all_vms(do_not_navigate=True) if vm not in vms_present: pytest.fail("Could not find VM {} after filtering!".format(vm))
def test_filter_with_user_input(vms, subset_of_vms, expression_for_vms_subset): navigate_to(Vm, 'VMsOnly') vm = sample(subset_of_vms, 1)[0] # Set up the filter search.fill_and_apply_filter("fill_field(Virtual Machine : Name, =)", {"Virtual Machine": vm}) assert_no_cfme_exception() vms_present = virtual_machines.get_all_vms(do_not_navigate=True) if vm not in vms_present: pytest.fail("Could not find VM {} after filtering!".format(vm))
def test_filter_without_user_input(vms, subset_of_vms, expression_for_vms_subset): navigate_to(Vm, 'VMsOnly') # Set up the filter search.fill_and_apply_filter(expression_for_vms_subset) assert_no_cfme_exception() vms_present = virtual_machines.get_all_vms(do_not_navigate=True) for vm in subset_of_vms: if vm not in vms_present: pytest.fail("Could not find VM {} after filtering!".format(vm))
def test_filter_with_user_input_and_cancellation(hosts, hosts_with_vm_count, host_with_median_vm): sel.force_navigate("infrastructure_hosts") median_host, median_vm_count = host_with_median_vm # Set up the filter search.fill_and_apply_filter("fill_count(Host.VMs, >)", {"COUNT": median_vm_count}, cancel_on_user_filling=True) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(hosts, hosts_with_vm_count, host_with_median_vm): navigate_to(Host, 'All') median_host, median_vm_count = host_with_median_vm # Set up the filter search.fill_and_apply_filter(get_expression(True), {"COUNT": median_vm_count}, cancel_on_user_filling=True) assert_no_cfme_exception()
def test_filter_with_user_input_and_cancellation(hosts, hosts_with_vm_count, host_with_median_vm): navigate_to(Host, 'All') median_host, median_vm_count = host_with_median_vm # Set up the filter search.fill_and_apply_filter( get_expression(True), {"COUNT": median_vm_count}, cancel_on_user_filling=True ) assert_no_cfme_exception()
def test_filter_with_user_input(host_collection, hosts, hosts_with_vm_count, host_with_median_vm, infra_provider): navigate_to(host_collection, 'All') median_host, median_vm_count = host_with_median_vm # We will filter out hosts with less than median VMs more_than_median_hosts = list(dropwhile(lambda h: h[1] <= median_vm_count, hosts_with_vm_count)) # Set up the filter search.fill_and_apply_filter(get_expression(True), {"COUNT": median_vm_count}) assert_no_cfme_exception() assert len(more_than_median_hosts) == len(host_collection.all(infra_provider))
def test_quick_search_with_filter(vms, subset_of_vms, expression_for_vms_subset): sel.force_navigate("infra_vms") search.fill_and_apply_filter(expression_for_vms_subset) assert_no_cfme_exception() # Filter this host only chosen_vm = pick(subset_of_vms, 1)[0] search.normal_search(chosen_vm) assert_no_cfme_exception() # Check it is there all_vms_visible = virtual_machines.get_all_vms(do_not_navigate=True) assert len(all_vms_visible) == 1 and chosen_vm in all_vms_visible
def test_quick_search_with_filter(request, hosts, hosts_with_vm_count, host_with_median_vm): navigate_to(Host, 'All') median_host, median_vm_count = host_with_median_vm search.fill_and_apply_filter(get_expression(False, ">=").format(median_vm_count)) assert_no_cfme_exception() # Make sure that we empty the regular search field after the test request.addfinalizer(search.ensure_normal_search_empty) # Filter this host only search.normal_search(median_host) assert_no_cfme_exception() # Check it is there all_hosts_visible = host.get_all_hosts(do_not_navigate=True) assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
def test_quick_search_with_filter(request, vms, subset_of_vms, expression_for_vms_subset): sel.force_navigate("infra_vms") search.fill_and_apply_filter(expression_for_vms_subset) assert_no_cfme_exception() # Make sure that we empty the regular search field after the test request.addfinalizer(search.ensure_normal_search_empty) # Filter this host only chosen_vm = sample(subset_of_vms, 1)[0] search.normal_search(chosen_vm) assert_no_cfme_exception() # Check it is there all_vms_visible = virtual_machines.get_all_vms(do_not_navigate=True) assert len(all_vms_visible) == 1 and chosen_vm in all_vms_visible
def test_quick_search_with_filter(hosts, hosts_with_vm_count, host_with_median_vm): sel.force_navigate("infrastructure_hosts") median_host, median_vm_count = host_with_median_vm search.fill_and_apply_filter( "fill_count(Host.VMs, >=, %d)" % median_vm_count ) assert_no_cfme_exception() # Filter this host only search.normal_search(median_host) assert_no_cfme_exception() # Check it is there all_hosts_visible = host.get_all_hosts(do_not_navigate=True) assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
def test_filter_without_user_input(hosts, hosts_with_vm_count, host_with_median_vm): sel.force_navigate("infrastructure_hosts") median_host, median_vm_count = host_with_median_vm # We will filter out hosts with less than median VMs more_than_median_hosts = list( dropwhile(lambda h: h[1] <= median_vm_count, hosts_with_vm_count)) # Set up the filter search.fill_and_apply_filter("fill_count(Host.VMs, >, %d)" % median_vm_count) assert_no_cfme_exception() assert len(more_than_median_hosts) == len( host.get_all_hosts(do_not_navigate=True))
def test_quick_search_with_filter(hosts, hosts_with_vm_count, host_with_median_vm): sel.force_navigate("infrastructure_hosts") median_host, median_vm_count = host_with_median_vm search.fill_and_apply_filter("fill_count(Host.VMs, >=, %d)" % median_vm_count) assert_no_cfme_exception() # Filter this host only search.normal_search(median_host) assert_no_cfme_exception() # Check it is there all_hosts_visible = host.get_all_hosts(do_not_navigate=True) assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
def test_quick_search_with_filter(request, hosts, hosts_with_vm_count, host_with_median_vm): pytest.sel.force_navigate("infrastructure_hosts") median_host, median_vm_count = host_with_median_vm search.fill_and_apply_filter(get_expression(False, ">=").format(median_vm_count)) assert_no_cfme_exception() # Make sure that we empty the regular search field after the test request.addfinalizer(search.ensure_normal_search_empty) # Filter this host only search.normal_search(median_host) assert_no_cfme_exception() # Check it is there all_hosts_visible = host.get_all_hosts(do_not_navigate=True) assert len(all_hosts_visible) == 1 and median_host in all_hosts_visible
def test_quick_search_with_filter(request, vms, subset_of_vms, expression_for_vms_subset): navigate_to(Vm, 'VMsOnly') search.fill_and_apply_filter(expression_for_vms_subset) assert_no_cfme_exception() # Make sure that we empty the regular search field after the test request.addfinalizer(search.ensure_normal_search_empty) # Filter this host only chosen_vm = sample(subset_of_vms, 1)[0] search.normal_search(chosen_vm) assert_no_cfme_exception() # Check it is there all_vms_visible = virtual_machines.get_all_vms(do_not_navigate=True) assert len(all_vms_visible) == 1 and chosen_vm in all_vms_visible
def test_filter_with_user_input(single_provider): # Set up the filter logger.debug('DEBUG: test_with_user_input: fill and apply') search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=)", fill_callback={"COUNT": 0}) assert_no_cfme_exception()
def test_filter_without_user_input(single_provider): # Set up the filter search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=, 0)") assert_no_cfme_exception()
def test_filter_without_user_input(providers): sel.force_navigate("infrastructure_providers") # Set up the filter search.fill_and_apply_filter( "fill_count(Infrastructure Provider.VMs, >=, 0)") assert_no_cfme_exception()
def test_filter_without_user_input(providers): pytest.sel.force_navigate("infrastructure_providers") # Set up the filter search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=, 0)") assert_no_cfme_exception()
def test_filter_without_user_input(): # Set up the filter search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=, 0)") assert_no_cfme_exception()
def test_filter_with_user_input(): # Set up the filter logger.debug('DEBUG: test_with_user_input: fill and apply') search.fill_and_apply_filter("fill_count(Infrastructure Provider.VMs, >=)", fill_callback={"COUNT": 0}) assert_no_cfme_exception()