app/javascript/spec/vm-floating-ips-form/__snapshots__/vm-floating-ips-form.spec.js.snap
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Associate / Disassociate form component should render associate form variant 1`] = `
<Provider
store={
Object {
"asyncReducers": Object {
"FormButtons": [Function],
"miqCustomTabReducer": [Function],
"notificationReducer": [Function],
},
"dispatch": [Function],
"getState": [Function],
"injectReducers": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
Symbol(observable): [Function],
}
}
>
<VmFloatingIPsForm
isAssociate={true}
recordId="1"
>
<Connect(MiqFormRenderer)
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
>
<MiqFormRenderer
buttonsLabels={Object {}}
canReset={false}
className="form-react"
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
disableSubmit={
Array [
"pristine",
"invalid",
]
}
dispatch={[Function]}
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
showFormControls={true}
>
<FormRenderer
FormTemplate={[Function]}
clearOnUnmount={false}
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"spy-field": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
dispatch={[Function]}
initialValues={Object {}}
onCancel={[Function]}
onReset={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<ReactFinalForm
decorators={
Array [
[Function],
]
}
dispatch={[Function]}
initialValues={Object {}}
mutators={
Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
}
}
onSubmit={[Function]}
render={[Function]}
subscription={
Object {
"pristine": true,
"submitting": true,
"valid": true,
}
}
>
<Component
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<WrappedFormTemplate
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<FormTemplate
Button={[Function]}
ButtonGroup={[Function]}
Description={[Function]}
FormWrapper={[Function]}
Header={[Function]}
Title={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<Form
className="form-react"
onSubmit={[Function]}
>
<Form
className="form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<form
className="bx--form form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
key="floating_ip"
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<FormConditionWrapper
field={
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SelectWithOnChange
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
component="select"
id="floating_ip"
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
loadingMessage="Loading..."
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
SelectComponent={[Function]}
id="floating_ip"
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
loadOptions={[Function]}
loadOptionsChangeCounter={1}
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
placeholder="<Choose>"
simpleValue={false}
value=""
>
<ClearedSelect
className=""
closeMenuOnSelect={true}
hideSelectedOptions={false}
id="floating_ip"
invalidText=""
isClearable={false}
isFetching={false}
isSearchable={false}
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
name="floating_ip"
noOptionsMessage={[Function]}
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onInputChange={[Function]}
options={
Array [
Object {
"label": "<Choose>",
"value": undefined,
},
Object {
"label": "1.2.3.4",
"value": 1,
},
Object {
"label": "2.3.4.5",
"value": 2,
},
Object {
"label": "3.4.5.6",
"value": 3,
},
Object {
"label": "4.5.6.7",
"value": 4,
},
Object {
"label": "5.6.7.8",
"value": 5,
},
]
}
placeholder="<Choose>"
value=""
>
<Select
className=""
disabled={false}
helperText=""
id="floating_ip"
inline={false}
invalid={false}
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
light={false}
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<div
className="bx--form-item"
>
<div
className="bx--select"
>
<label
className="bx--label"
htmlFor="floating_ip"
>
<IsRequired>
<span
aria-hidden="true"
className="ddorg__carbon-component-mapper_is-required isRequired-0-2-4"
>
*
</span>
Floating IP
</IsRequired>
</label>
<div
className="bx--select-input__wrapper"
data-invalid={null}
>
<select
className="bx--select-input"
id="floating_ip"
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<SelectItem
disabled={false}
hidden={false}
key="0"
label="<Choose>"
text="<Choose>"
value=""
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="<Choose>"
value=""
>
<Choose>
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="1"
label="1.2.3.4"
text="1.2.3.4"
value={1}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="1.2.3.4"
value={1}
>
1.2.3.4
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="2"
label="2.3.4.5"
text="2.3.4.5"
value={2}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="2.3.4.5"
value={2}
>
2.3.4.5
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="3"
label="3.4.5.6"
text="3.4.5.6"
value={3}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="3.4.5.6"
value={3}
>
3.4.5.6
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="4"
label="4.5.6.7"
text="4.5.6.7"
value={4}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="4.5.6.7"
value={4}
>
4.5.6.7
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="5"
label="5.6.7.8"
text="5.6.7.8"
value={5}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="5.6.7.8"
value={5}
>
5.6.7.8
</option>
</SelectItem>
</select>
<ForwardRef(ChevronDown16)
className="bx--select__arrow"
>
<Icon
className="bx--select__arrow"
fill="currentColor"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<svg
aria-hidden={true}
className="bx--select__arrow"
fill="currentColor"
focusable="false"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"
/>
</svg>
</Icon>
</ForwardRef(ChevronDown16)>
</div>
</div>
</div>
</Select>
</ClearedSelect>
</Select>
</Select>
</SelectWithOnChange>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<SingleField
component="spy-field"
key="spy-field"
name="spy-field"
>
<FormConditionWrapper
field={
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SpyField
component="spy-field"
name="spy-field"
>
<FormSpy
onChange={[Function]}
subscription={
Object {
"pristine": true,
"valid": true,
}
}
/>
</SpyField>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<FormSpy>
<FormControls
Button={[Function]}
ButtonGroup={[Function]}
FormSpy={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={true}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formSpyProps={
Object {
"active": undefined,
"dirty": false,
"dirtyFields": Object {},
"dirtyFieldsSinceLastSubmit": Object {},
"dirtySinceLastSubmit": false,
"error": undefined,
"errors": Object {
"floating_ip": "Required",
},
"form": Object {
"batch": [Function],
"blur": [Function],
"change": [Function],
"destroyOnUnregister": false,
"focus": [Function],
"getFieldState": [Function],
"getRegisteredFields": [Function],
"getState": [Function],
"initialize": [Function],
"isValidationPaused": [Function],
"mutators": Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
},
"pauseValidation": [Function],
"registerField": [Function],
"reset": [Function],
"resetFieldState": [Function],
"restart": [Function],
"resumeValidation": [Function],
"setConfig": [Function],
"submit": [Function],
"subscribe": [Function],
},
"hasSubmitErrors": false,
"hasValidationErrors": true,
"initialValues": Object {},
"invalid": true,
"modified": Object {
"floating_ip": false,
},
"modifiedSinceLastSubmit": false,
"pristine": true,
"submitError": undefined,
"submitErrors": undefined,
"submitFailed": false,
"submitSucceeded": false,
"submitting": false,
"touched": Object {
"floating_ip": false,
},
"valid": false,
"validating": false,
"values": Object {},
"visited": Object {
"floating_ip": false,
},
}
}
onCancel={[Function]}
onReset={[Function]}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
submitLabel="Save"
>
<ButtonGroup>
<ButtonSet
className=""
>
<div
className="bx--btn-set"
>
<Button
buttonType="submit"
disabled={true}
key="form-submit"
label="Save"
type="submit"
variant="primary"
>
<Button
disabled={true}
kind="primary"
type="submit"
variant="primary"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--primary bx--btn--disabled"
disabled={true}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="submit"
variant="primary"
>
Save
</button>
</Button>
</Button>
<Button
buttonType="cancel"
key="form-cancel"
label="Cancel"
onClick={[Function]}
type="button"
>
<Button
kind="secondary"
onClick={[Function]}
type="button"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--secondary"
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="button"
>
Cancel
</button>
</Button>
</Button>
</div>
</ButtonSet>
</ButtonGroup>
</FormControls>
</FormSpy>
</form>
</Form>
</Form>
</FormTemplate>
</WrappedFormTemplate>
</Component>
</ReactFinalForm>
</FormRenderer>
</MiqFormRenderer>
</Connect(MiqFormRenderer)>
</VmFloatingIPsForm>
</Provider>
`;
exports[`Associate / Disassociate form component should render disassociate form variant 1`] = `
<Provider
store={
Object {
"asyncReducers": Object {
"FormButtons": [Function],
"miqCustomTabReducer": [Function],
"notificationReducer": [Function],
},
"dispatch": [Function],
"getState": [Function],
"injectReducers": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
Symbol(observable): [Function],
}
}
>
<VmFloatingIPsForm
isAssociate={false}
recordId="1"
>
<Connect(MiqFormRenderer)
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
>
<MiqFormRenderer
buttonsLabels={Object {}}
canReset={false}
className="form-react"
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
disableSubmit={
Array [
"pristine",
"invalid",
]
}
dispatch={[Function]}
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
showFormControls={true}
>
<FormRenderer
FormTemplate={[Function]}
clearOnUnmount={false}
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"spy-field": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
dispatch={[Function]}
initialValues={Object {}}
onCancel={[Function]}
onReset={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<ReactFinalForm
decorators={
Array [
[Function],
]
}
dispatch={[Function]}
initialValues={Object {}}
mutators={
Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
}
}
onSubmit={[Function]}
render={[Function]}
subscription={
Object {
"pristine": true,
"submitting": true,
"valid": true,
}
}
>
<Component
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<WrappedFormTemplate
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<FormTemplate
Button={[Function]}
ButtonGroup={[Function]}
Description={[Function]}
FormWrapper={[Function]}
Header={[Function]}
Title={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<Form
className="form-react"
onSubmit={[Function]}
>
<Form
className="form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<form
className="bx--form form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
key="floating_ip"
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<FormConditionWrapper
field={
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SelectWithOnChange
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
component="select"
id="floating_ip"
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
loadingMessage="Loading..."
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
SelectComponent={[Function]}
id="floating_ip"
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
loadOptions={[Function]}
loadOptionsChangeCounter={1}
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
placeholder="<Choose>"
simpleValue={false}
value=""
>
<ClearedSelect
className=""
closeMenuOnSelect={true}
hideSelectedOptions={false}
id="floating_ip"
invalidText=""
isClearable={false}
isFetching={false}
isSearchable={false}
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
name="floating_ip"
noOptionsMessage={[Function]}
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onInputChange={[Function]}
options={
Array [
Object {
"label": "<Choose>",
"value": undefined,
},
Object {
"label": "1.2.3.4",
"value": 1,
},
Object {
"label": "2.3.4.5",
"value": 2,
},
Object {
"label": "3.4.5.6",
"value": 3,
},
Object {
"label": "4.5.6.7",
"value": 4,
},
Object {
"label": "5.6.7.8",
"value": 5,
},
]
}
placeholder="<Choose>"
value=""
>
<Select
className=""
disabled={false}
helperText=""
id="floating_ip"
inline={false}
invalid={false}
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
light={false}
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<div
className="bx--form-item"
>
<div
className="bx--select"
>
<label
className="bx--label"
htmlFor="floating_ip"
>
<IsRequired>
<span
aria-hidden="true"
className="ddorg__carbon-component-mapper_is-required isRequired-0-2-4"
>
*
</span>
Floating IP
</IsRequired>
</label>
<div
className="bx--select-input__wrapper"
data-invalid={null}
>
<select
className="bx--select-input"
id="floating_ip"
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<SelectItem
disabled={false}
hidden={false}
key="0"
label="<Choose>"
text="<Choose>"
value=""
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="<Choose>"
value=""
>
<Choose>
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="1"
label="1.2.3.4"
text="1.2.3.4"
value={1}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="1.2.3.4"
value={1}
>
1.2.3.4
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="2"
label="2.3.4.5"
text="2.3.4.5"
value={2}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="2.3.4.5"
value={2}
>
2.3.4.5
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="3"
label="3.4.5.6"
text="3.4.5.6"
value={3}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="3.4.5.6"
value={3}
>
3.4.5.6
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="4"
label="4.5.6.7"
text="4.5.6.7"
value={4}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="4.5.6.7"
value={4}
>
4.5.6.7
</option>
</SelectItem>
<SelectItem
disabled={false}
hidden={false}
key="5"
label="5.6.7.8"
text="5.6.7.8"
value={5}
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
label="5.6.7.8"
value={5}
>
5.6.7.8
</option>
</SelectItem>
</select>
<ForwardRef(ChevronDown16)
className="bx--select__arrow"
>
<Icon
className="bx--select__arrow"
fill="currentColor"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<svg
aria-hidden={true}
className="bx--select__arrow"
fill="currentColor"
focusable="false"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"
/>
</svg>
</Icon>
</ForwardRef(ChevronDown16)>
</div>
</div>
</div>
</Select>
</ClearedSelect>
</Select>
</Select>
</SelectWithOnChange>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<SingleField
component="spy-field"
key="spy-field"
name="spy-field"
>
<FormConditionWrapper
field={
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SpyField
component="spy-field"
name="spy-field"
>
<FormSpy
onChange={[Function]}
subscription={
Object {
"pristine": true,
"valid": true,
}
}
/>
</SpyField>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<FormSpy>
<FormControls
Button={[Function]}
ButtonGroup={[Function]}
FormSpy={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={true}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formSpyProps={
Object {
"active": undefined,
"dirty": false,
"dirtyFields": Object {},
"dirtyFieldsSinceLastSubmit": Object {},
"dirtySinceLastSubmit": false,
"error": undefined,
"errors": Object {
"floating_ip": "Required",
},
"form": Object {
"batch": [Function],
"blur": [Function],
"change": [Function],
"destroyOnUnregister": false,
"focus": [Function],
"getFieldState": [Function],
"getRegisteredFields": [Function],
"getState": [Function],
"initialize": [Function],
"isValidationPaused": [Function],
"mutators": Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
},
"pauseValidation": [Function],
"registerField": [Function],
"reset": [Function],
"resetFieldState": [Function],
"restart": [Function],
"resumeValidation": [Function],
"setConfig": [Function],
"submit": [Function],
"subscribe": [Function],
},
"hasSubmitErrors": false,
"hasValidationErrors": true,
"initialValues": Object {},
"invalid": true,
"modified": Object {
"floating_ip": false,
},
"modifiedSinceLastSubmit": false,
"pristine": true,
"submitError": undefined,
"submitErrors": undefined,
"submitFailed": false,
"submitSucceeded": false,
"submitting": false,
"touched": Object {
"floating_ip": false,
},
"valid": false,
"validating": false,
"values": Object {},
"visited": Object {
"floating_ip": false,
},
}
}
onCancel={[Function]}
onReset={[Function]}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
submitLabel="Save"
>
<ButtonGroup>
<ButtonSet
className=""
>
<div
className="bx--btn-set"
>
<Button
buttonType="submit"
disabled={true}
key="form-submit"
label="Save"
type="submit"
variant="primary"
>
<Button
disabled={true}
kind="primary"
type="submit"
variant="primary"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--primary bx--btn--disabled"
disabled={true}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="submit"
variant="primary"
>
Save
</button>
</Button>
</Button>
<Button
buttonType="cancel"
key="form-cancel"
label="Cancel"
onClick={[Function]}
type="button"
>
<Button
kind="secondary"
onClick={[Function]}
type="button"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--secondary"
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="button"
>
Cancel
</button>
</Button>
</Button>
</div>
</ButtonSet>
</ButtonGroup>
</FormControls>
</FormSpy>
</form>
</Form>
</Form>
</FormTemplate>
</WrappedFormTemplate>
</Component>
</ReactFinalForm>
</FormRenderer>
</MiqFormRenderer>
</Connect(MiqFormRenderer)>
</VmFloatingIPsForm>
</Provider>
`;
exports[`Associate / Disassociate form component should render form 1`] = `
<Connect(MiqFormRenderer)
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
/>
`;
exports[`Associate / Disassociate form component should submit Associate API call 1`] = `
<Provider
store={
Object {
"asyncReducers": Object {
"FormButtons": [Function],
"miqCustomTabReducer": [Function],
"notificationReducer": [Function],
},
"dispatch": [Function],
"getState": [Function],
"injectReducers": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
Symbol(observable): [Function],
}
}
>
<VmFloatingIPsForm
isAssociate={true}
recordId="1"
>
<Connect(MiqFormRenderer)
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
>
<MiqFormRenderer
buttonsLabels={Object {}}
canReset={false}
className="form-react"
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
disableSubmit={
Array [
"pristine",
"invalid",
]
}
dispatch={[Function]}
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
showFormControls={true}
>
<FormRenderer
FormTemplate={[Function]}
clearOnUnmount={false}
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"spy-field": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
dispatch={[Function]}
initialValues={Object {}}
onCancel={[Function]}
onReset={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<ReactFinalForm
decorators={
Array [
[Function],
]
}
dispatch={[Function]}
initialValues={Object {}}
mutators={
Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
}
}
onSubmit={[Function]}
render={[Function]}
subscription={
Object {
"pristine": true,
"submitting": true,
"valid": true,
}
}
>
<Component
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<WrappedFormTemplate
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<FormTemplate
Button={[Function]}
ButtonGroup={[Function]}
Description={[Function]}
FormWrapper={[Function]}
Header={[Function]}
Title={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<Form
className="form-react"
onSubmit={[Function]}
>
<Form
className="form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<form
className="bx--form form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
key="floating_ip"
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<FormConditionWrapper
field={
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SelectWithOnChange
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
component="select"
id="floating_ip"
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
loadingMessage="Loading..."
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
SelectComponent={[Function]}
id="floating_ip"
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
loadOptions={[Function]}
loadOptionsChangeCounter={1}
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
placeholder="<Choose>"
simpleValue={false}
value=""
>
<ClearedSelect
id="floating_ip"
invalidText=""
isClearable={false}
isDisabled={true}
isFetching={true}
isSearchable={false}
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
loadingMessage="Loading..."
name="floating_ip"
noOptionsMessage={[Function]}
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onInputChange={[Function]}
options={Array []}
placeholder="<Choose>"
value=""
>
<Select
disabled={false}
helperText=""
id="floating_ip"
inline={false}
invalid={false}
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
light={false}
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<div
className="bx--form-item"
>
<div
className="bx--select"
>
<label
className="bx--label"
htmlFor="floating_ip"
>
<IsRequired>
<span
aria-hidden="true"
className="ddorg__carbon-component-mapper_is-required isRequired-0-2-4"
>
*
</span>
Floating IP
</IsRequired>
</label>
<div
className="bx--select-input__wrapper"
data-invalid={null}
>
<select
className="bx--select-input"
id="floating_ip"
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<SelectItem
disabled={false}
hidden={false}
text="<Choose>"
value=""
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
value=""
>
<Choose>
</option>
</SelectItem>
</select>
<ForwardRef(ChevronDown16)
className="bx--select__arrow"
>
<Icon
className="bx--select__arrow"
fill="currentColor"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<svg
aria-hidden={true}
className="bx--select__arrow"
fill="currentColor"
focusable="false"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"
/>
</svg>
</Icon>
</ForwardRef(ChevronDown16)>
</div>
</div>
</div>
</Select>
</ClearedSelect>
</Select>
</Select>
</SelectWithOnChange>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<SingleField
component="spy-field"
key="spy-field"
name="spy-field"
>
<FormConditionWrapper
field={
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SpyField
component="spy-field"
name="spy-field"
>
<FormSpy
onChange={[Function]}
subscription={
Object {
"pristine": true,
"valid": true,
}
}
/>
</SpyField>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<FormSpy>
<FormControls
Button={[Function]}
ButtonGroup={[Function]}
FormSpy={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={true}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formSpyProps={
Object {
"active": undefined,
"dirty": false,
"dirtyFields": Object {},
"dirtyFieldsSinceLastSubmit": Object {},
"dirtySinceLastSubmit": false,
"error": undefined,
"errors": Object {
"floating_ip": "Required",
},
"form": Object {
"batch": [Function],
"blur": [Function],
"change": [Function],
"destroyOnUnregister": false,
"focus": [Function],
"getFieldState": [Function],
"getRegisteredFields": [Function],
"getState": [Function],
"initialize": [Function],
"isValidationPaused": [Function],
"mutators": Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
},
"pauseValidation": [Function],
"registerField": [Function],
"reset": [Function],
"resetFieldState": [Function],
"restart": [Function],
"resumeValidation": [Function],
"setConfig": [Function],
"submit": [Function],
"subscribe": [Function],
},
"hasSubmitErrors": false,
"hasValidationErrors": true,
"initialValues": Object {},
"invalid": true,
"modified": Object {
"floating_ip": false,
},
"modifiedSinceLastSubmit": false,
"pristine": true,
"submitError": undefined,
"submitErrors": undefined,
"submitFailed": false,
"submitSucceeded": false,
"submitting": false,
"touched": Object {
"floating_ip": false,
},
"valid": false,
"validating": false,
"values": Object {},
"visited": Object {
"floating_ip": false,
},
}
}
onCancel={[Function]}
onReset={[Function]}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
submitLabel="Save"
>
<ButtonGroup>
<ButtonSet
className=""
>
<div
className="bx--btn-set"
>
<Button
buttonType="submit"
disabled={true}
key="form-submit"
label="Save"
type="submit"
variant="primary"
>
<Button
disabled={true}
kind="primary"
type="submit"
variant="primary"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--primary bx--btn--disabled"
disabled={true}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="submit"
variant="primary"
>
Save
</button>
</Button>
</Button>
<Button
buttonType="cancel"
key="form-cancel"
label="Cancel"
onClick={[Function]}
type="button"
>
<Button
kind="secondary"
onClick={[Function]}
type="button"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--secondary"
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="button"
>
Cancel
</button>
</Button>
</Button>
</div>
</ButtonSet>
</ButtonGroup>
</FormControls>
</FormSpy>
</form>
</Form>
</Form>
</FormTemplate>
</WrappedFormTemplate>
</Component>
</ReactFinalForm>
</FormRenderer>
</MiqFormRenderer>
</Connect(MiqFormRenderer)>
</VmFloatingIPsForm>
</Provider>
`;
exports[`Associate / Disassociate form component should submit Disassociate API call 1`] = `
<Provider
store={
Object {
"asyncReducers": Object {
"FormButtons": [Function],
"miqCustomTabReducer": [Function],
"notificationReducer": [Function],
},
"dispatch": [Function],
"getState": [Function],
"injectReducers": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
Symbol(observable): [Function],
}
}
>
<VmFloatingIPsForm
isAssociate={false}
recordId="1"
>
<Connect(MiqFormRenderer)
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
>
<MiqFormRenderer
buttonsLabels={Object {}}
canReset={false}
className="form-react"
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
disableSubmit={
Array [
"pristine",
"invalid",
]
}
dispatch={[Function]}
onCancel={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
],
}
}
showFormControls={true}
>
<FormRenderer
FormTemplate={[Function]}
clearOnUnmount={false}
componentMapper={
Object {
"checkbox": [Function],
"code-editor": [Function],
"date-picker": [Function],
"dual-list-select": [Function],
"edit-password-field": [Function],
"field-array": [Function],
"file-upload": [Function],
"font-icon-picker": [Function],
"font-icon-picker-ddf": [Function],
"multi-select": [Function],
"password-field": [Function],
"plain-text": [Function],
"radio": [Function],
"select": [Function],
"slider": [Function],
"spy-field": [Function],
"sub-form": [Function],
"switch": [Function],
"tabs": [Function],
"text-field": [Function],
"textarea": [Function],
"time-picker": [Function],
"tree-selector": [Function],
"tree-view": [Function],
"validate-credentials": [Function],
"wizard": [Function],
}
}
dispatch={[Function]}
initialValues={Object {}}
onCancel={[Function]}
onReset={[Function]}
onSubmit={[Function]}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<ReactFinalForm
decorators={
Array [
[Function],
]
}
dispatch={[Function]}
initialValues={Object {}}
mutators={
Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
}
}
onSubmit={[Function]}
render={[Function]}
subscription={
Object {
"pristine": true,
"submitting": true,
"valid": true,
}
}
>
<Component
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
>
<WrappedFormTemplate
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<FormTemplate
Button={[Function]}
ButtonGroup={[Function]}
Description={[Function]}
FormWrapper={[Function]}
Header={[Function]}
Title={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={
Array [
"pristine",
"invalid",
]
}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formWrapperProps={
Object {
"className": "form-react",
}
}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
showFormControls={true}
submitLabel="Save"
>
<Form
className="form-react"
onSubmit={[Function]}
>
<Form
className="form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<form
className="bx--form form-0-2-3 form-react"
noValidate={true}
onSubmit={[Function]}
>
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
key="floating_ip"
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<FormConditionWrapper
field={
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SelectWithOnChange
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
component="select"
id="floating_ip"
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
loadingMessage="Loading..."
name="floating_ip"
placeholder="<Choose>"
validate={
Array [
Object {
"type": "required",
},
]
}
>
<Select
SelectComponent={[Function]}
id="floating_ip"
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
loadOptions={[Function]}
loadOptionsChangeCounter={1}
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
placeholder="<Choose>"
simpleValue={false}
value=""
>
<ClearedSelect
id="floating_ip"
invalidText=""
isClearable={false}
isDisabled={true}
isFetching={true}
isSearchable={false}
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
loadingMessage="Loading..."
name="floating_ip"
noOptionsMessage={[Function]}
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onInputChange={[Function]}
options={Array []}
placeholder="<Choose>"
value=""
>
<Select
disabled={false}
helperText=""
id="floating_ip"
inline={false}
invalid={false}
invalidText=""
labelText={
<IsRequired>
Floating IP
</IsRequired>
}
light={false}
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<div
className="bx--form-item"
>
<div
className="bx--select"
>
<label
className="bx--label"
htmlFor="floating_ip"
>
<IsRequired>
<span
aria-hidden="true"
className="ddorg__carbon-component-mapper_is-required isRequired-0-2-4"
>
*
</span>
Floating IP
</IsRequired>
</label>
<div
className="bx--select-input__wrapper"
data-invalid={null}
>
<select
className="bx--select-input"
id="floating_ip"
loadingMessage="Loading..."
name="floating_ip"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
value=""
>
<SelectItem
disabled={false}
hidden={false}
text="<Choose>"
value=""
>
<option
className="bx--select-option"
disabled={false}
hidden={false}
value=""
>
<Choose>
</option>
</SelectItem>
</select>
<ForwardRef(ChevronDown16)
className="bx--select__arrow"
>
<Icon
className="bx--select__arrow"
fill="currentColor"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<svg
aria-hidden={true}
className="bx--select__arrow"
fill="currentColor"
focusable="false"
height={16}
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 16 16"
width={16}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"
/>
</svg>
</Icon>
</ForwardRef(ChevronDown16)>
</div>
</div>
</div>
</Select>
</ClearedSelect>
</Select>
</Select>
</SelectWithOnChange>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<SingleField
component="spy-field"
key="spy-field"
name="spy-field"
>
<FormConditionWrapper
field={
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
}
}
>
<FormFieldHideWrapper
hideField={false}
>
<SpyField
component="spy-field"
name="spy-field"
>
<FormSpy
onChange={[Function]}
subscription={
Object {
"pristine": true,
"valid": true,
}
}
/>
</SpyField>
</FormFieldHideWrapper>
</FormConditionWrapper>
</SingleField>
<FormSpy>
<FormControls
Button={[Function]}
ButtonGroup={[Function]}
FormSpy={[Function]}
buttonOrder={
Array [
"submit",
"reset",
"cancel",
]
}
canReset={false}
cancelLabel="Cancel"
disableSubmit={true}
formFields={
Array [
<SingleField
component="select"
id="floating_ip"
includeEmpty={true}
isRequired={true}
label="Floating IP"
loadOptions={[Function]}
name="floating_ip"
validate={
Array [
Object {
"type": "required",
},
]
}
/>,
<SingleField
component="spy-field"
name="spy-field"
/>,
]
}
formSpyProps={
Object {
"active": undefined,
"dirty": false,
"dirtyFields": Object {},
"dirtyFieldsSinceLastSubmit": Object {},
"dirtySinceLastSubmit": false,
"error": undefined,
"errors": Object {
"floating_ip": "Required",
},
"form": Object {
"batch": [Function],
"blur": [Function],
"change": [Function],
"destroyOnUnregister": false,
"focus": [Function],
"getFieldState": [Function],
"getRegisteredFields": [Function],
"getState": [Function],
"initialize": [Function],
"isValidationPaused": [Function],
"mutators": Object {
"concat": [Function],
"insert": [Function],
"move": [Function],
"pop": [Function],
"push": [Function],
"remove": [Function],
"removeBatch": [Function],
"shift": [Function],
"swap": [Function],
"unshift": [Function],
"update": [Function],
},
"pauseValidation": [Function],
"registerField": [Function],
"reset": [Function],
"resetFieldState": [Function],
"restart": [Function],
"resumeValidation": [Function],
"setConfig": [Function],
"submit": [Function],
"subscribe": [Function],
},
"hasSubmitErrors": false,
"hasValidationErrors": true,
"initialValues": Object {},
"invalid": true,
"modified": Object {
"floating_ip": false,
},
"modifiedSinceLastSubmit": false,
"pristine": true,
"submitError": undefined,
"submitErrors": undefined,
"submitFailed": false,
"submitSucceeded": false,
"submitting": false,
"touched": Object {
"floating_ip": false,
},
"valid": false,
"validating": false,
"values": Object {},
"visited": Object {
"floating_ip": false,
},
}
}
onCancel={[Function]}
onReset={[Function]}
resetLabel="Reset"
schema={
Object {
"fields": Array [
Object {
"component": "select",
"id": "floating_ip",
"includeEmpty": true,
"isRequired": true,
"label": "Floating IP",
"loadOptions": [Function],
"name": "floating_ip",
"validate": Array [
Object {
"type": "required",
},
],
},
Object {
"component": "spy-field",
"initialize": undefined,
"name": "spy-field",
},
],
}
}
submitLabel="Save"
>
<ButtonGroup>
<ButtonSet
className=""
>
<div
className="bx--btn-set"
>
<Button
buttonType="submit"
disabled={true}
key="form-submit"
label="Save"
type="submit"
variant="primary"
>
<Button
disabled={true}
kind="primary"
type="submit"
variant="primary"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--primary bx--btn--disabled"
disabled={true}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="submit"
variant="primary"
>
Save
</button>
</Button>
</Button>
<Button
buttonType="cancel"
key="form-cancel"
label="Cancel"
onClick={[Function]}
type="button"
>
<Button
kind="secondary"
onClick={[Function]}
type="button"
>
<button
aria-describedby={null}
aria-pressed={null}
className="bx--btn bx--btn--secondary"
disabled={false}
onBlur={[Function]}
onClick={[Function]}
onFocus={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
tabIndex={0}
type="button"
>
Cancel
</button>
</Button>
</Button>
</div>
</ButtonSet>
</ButtonGroup>
</FormControls>
</FormSpy>
</form>
</Form>
</Form>
</FormTemplate>
</WrappedFormTemplate>
</Component>
</ReactFinalForm>
</FormRenderer>
</MiqFormRenderer>
</Connect(MiqFormRenderer)>
</VmFloatingIPsForm>
</Provider>
`;