def test_type_required_validation(request, soft_assert):
    """Test to validate type while adding a provider"""
    prov = CloudProvider()

    request.addfinalizer(prov.delete_if_exists)
    if version.current_version() < "5.5":
        with error.expected('Type is required'):
            prov.create()
    else:
        navigate_to(prov, 'Add')
        fill(prov.properties_form.name_text, "foo")
        soft_assert("ng-invalid-required" in prov.properties_form.type_select.classes)
        soft_assert(not prov.add_provider_button.can_be_clicked)
Exemplo n.º 2
0
def test_type_required_validation(request, soft_assert):
    """Test to validate type while adding a provider"""
    prov = CloudProvider()

    request.addfinalizer(prov.delete_if_exists)
    if version.current_version() < "5.5":
        with error.expected('Type is required'):
            prov.create()
    else:
        navigate_to(prov, 'Add')
        fill(prov.properties_form.name_text, "foo")
        soft_assert("ng-invalid-required" in prov.properties_form.type_select.classes)
        soft_assert(not prov.add_provider_button.can_be_clicked)
Exemplo n.º 3
0
def test_type_required_validation(request):
    """Test to validate type while adding a provider"""
    prov = CloudProvider()
    request.addfinalizer(prov.delete_if_exists)
    view = navigate_to(prov, 'Add')
    view.fill({'name': 'foo'})
    assert not view.add.active
def test_openstack_provider_has_api_version():
    """Check whether the Keystone API version field is present for Openstack."""
    prov = CloudProvider()
    navigate_to(prov, 'Add')
    fill(prop_region.properties_form, {"type_select": "OpenStack"})
    pytest.sel.wait_for_ajax()
    assert pytest.sel.is_displayed(
        prov.properties_form.api_version), "API version select is not visible"
Exemplo n.º 5
0
def test_openstack_provider_has_api_version():
    """Check whether the Keystone API version field is present for Openstack."""
    prov = CloudProvider()
    view = navigate_to(prov, 'Add')
    view.fill({"prov_type": "OpenStack"})
    assert view.api_version.is_displayed, "API version select is not visible"