fix(blocksAntd): Updated Password Input tests.

This commit is contained in:
Sandile 2021-09-08 12:49:03 +02:00
parent 9075c1c7f0
commit 7f322300b7
6 changed files with 337 additions and 634 deletions

View File

@ -4,10 +4,6 @@
type: PasswordInput
properties:
title: My PasswordInput Title
- id: 'properties.allowClear: false'
type: PasswordInput
properties:
allowClear: false
- id: 'properties.autoFocus: true'
type: PasswordInput
properties:

View File

@ -26,13 +26,14 @@ import meta from '../src/blocks/PasswordInput/PasswordInput.json';
jest.mock('antd/lib/input', () => {
const comp = jest.fn(() => 'mocked');
comp.Password = jest.fn(() => 'mocked');
return comp;
});
const mocks = [
{
name: 'default',
fn: Input,
fn: Input.Password,
},
];

View File

@ -33,7 +33,7 @@ jest.mock('antd/lib/input', () => {
const mocks = [
{
name: 'default',
fn: Input,
fn: Input.TextArea,
},
];

View File

@ -4,7 +4,6 @@ exports[`Mock render - default - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -20,31 +19,10 @@ Array [
]
`;
exports[`Mock render - properties.allowClear: false - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": false,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
"id": "properties.allowClear: false_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"size": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.autoFocus: true - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": true,
"className": "{}",
"disabled": undefined,
@ -64,7 +42,6 @@ exports[`Mock render - properties.disabled: true - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": true,
@ -84,7 +61,6 @@ exports[`Mock render - properties.label align: right - value[0] - default 1`] =
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -104,7 +80,6 @@ exports[`Mock render - properties.label colon: false - value[0] - default 1`] =
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -124,7 +99,6 @@ exports[`Mock render - properties.label disabled: true - value[0] - default 1`]
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -144,7 +118,6 @@ exports[`Mock render - properties.label extra: showing extra - value[0] - defaul
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -164,7 +137,6 @@ exports[`Mock render - properties.label inline: true - value[0] - default 1`] =
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -184,7 +156,6 @@ exports[`Mock render - properties.label span: 12 - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -204,7 +175,6 @@ exports[`Mock render - properties.placeholder: Type your text here - value[0] -
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -224,7 +194,6 @@ exports[`Mock render - properties.size: large - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -244,7 +213,6 @@ exports[`Mock render - properties.size: small - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
@ -259,3 +227,22 @@ Array [
],
]
`;
exports[`Mock render - properties.title: My PasswordInput Title - value[0] - default 1`] = `
Array [
Array [
Object {
"autoFocus": undefined,
"className": "{}",
"disabled": undefined,
"id": "properties.title: My PasswordInput Title_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"size": undefined,
"value": null,
},
Object {},
],
]
`;

View File

@ -83,89 +83,6 @@ exports[`Render default - value[0] 1`] = `
</div>
`;
exports[`Render properties.allowClear: false - value[0] 1`] = `
<div
className="ant-row ant-form-item {\\"style\\":{\\"marginBottom\\":0}}"
id="properties.allowClear: false"
style={Object {}}
>
<div
className="ant-col ant-form-item-label ant-form-item-label-left {\\"style\\":{\\"whiteSpace\\":\\"normal\\",\\"marginBottom\\":8}} ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<label
className="{\\"style\\":[{\\"height\\":\\"fit-content !important\\",\\"minHeight\\":32},null]}"
htmlFor="properties.allowClear: false_input"
title="properties.allowClear: false"
>
<span
className="{}"
/>
</label>
</div>
<div
className="ant-col ant-form-item-control ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<span
className="ant-input-password {} ant-input-affix-wrapper"
onMouseUp={[Function]}
>
<input
action="click"
className="ant-input"
id="properties.allowClear: false_input"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
style={null}
type="password"
value=""
/>
<span
className="ant-input-suffix"
>
<span
aria-label="eye-invisible"
className="anticon anticon-eye-invisible ant-input-password-icon"
onClick={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
role="img"
tabIndex={-1}
>
<svg
aria-hidden="true"
data-icon="eye-invisible"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"
/>
<path
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"
/>
</svg>
</span>
</span>
</span>
</div>
</div>
</div>
</div>
`;
exports[`Render properties.autoFocus: true - value[0] 1`] = `
<div
className="ant-row ant-form-item {\\"style\\":{\\"marginBottom\\":0}}"
@ -1249,89 +1166,6 @@ exports[`Render required = true default - value[0] 1`] = `
</div>
`;
exports[`Render required = true properties.allowClear: false - value[0] 1`] = `
<div
className="ant-row ant-form-item {\\"style\\":{\\"marginBottom\\":0}}"
id="properties.allowClear: false"
style={Object {}}
>
<div
className="ant-col ant-form-item-label ant-form-item-label-left {\\"style\\":{\\"whiteSpace\\":\\"normal\\",\\"marginBottom\\":8}} ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<label
className="ant-form-item-required {\\"style\\":[{\\"height\\":\\"fit-content !important\\",\\"minHeight\\":32},null]}"
htmlFor="properties.allowClear: false_input"
title="properties.allowClear: false"
>
<span
className="{}"
/>
</label>
</div>
<div
className="ant-col ant-form-item-control ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<span
className="ant-input-password {} ant-input-affix-wrapper"
onMouseUp={[Function]}
>
<input
action="click"
className="ant-input"
id="properties.allowClear: false_input"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
style={null}
type="password"
value=""
/>
<span
className="ant-input-suffix"
>
<span
aria-label="eye-invisible"
className="anticon anticon-eye-invisible ant-input-password-icon"
onClick={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
role="img"
tabIndex={-1}
>
<svg
aria-hidden="true"
data-icon="eye-invisible"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"
/>
<path
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"
/>
</svg>
</span>
</span>
</span>
</div>
</div>
</div>
</div>
`;
exports[`Render required = true properties.autoFocus: true - value[0] 1`] = `
<div
className="ant-row ant-form-item {\\"style\\":{\\"marginBottom\\":0}}"
@ -2443,117 +2277,6 @@ exports[`Render validation.status = error default - value[0] 1`] = `
</div>
`;
exports[`Render validation.status = error properties.allowClear: false - value[0] 1`] = `
<div
className="ant-row ant-form-item ant-form-item-has-feedback ant-form-item-has-error {\\"style\\":{\\"marginBottom\\":0}}"
id="properties.allowClear: false"
style={Object {}}
>
<div
className="ant-col ant-form-item-label ant-form-item-label-left {\\"style\\":{\\"whiteSpace\\":\\"normal\\",\\"marginBottom\\":8}} ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<label
className="{\\"style\\":[{\\"height\\":\\"fit-content !important\\",\\"minHeight\\":32},null]}"
htmlFor="properties.allowClear: false_input"
title="properties.allowClear: false"
>
<span
className="{}"
/>
</label>
</div>
<div
className="ant-col ant-form-item-control ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<span
className="ant-input-password {} ant-input-affix-wrapper"
onMouseUp={[Function]}
>
<input
action="click"
className="ant-input"
id="properties.allowClear: false_input"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
style={null}
type="password"
value=""
/>
<span
className="ant-input-suffix"
>
<span
aria-label="eye-invisible"
className="anticon anticon-eye-invisible ant-input-password-icon"
onClick={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
role="img"
tabIndex={-1}
>
<svg
aria-hidden="true"
data-icon="eye-invisible"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"
/>
<path
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"
/>
</svg>
</span>
</span>
</span>
</div>
<span
className="ant-form-item-children-icon"
>
<span
aria-label="close-circle"
className="anticon anticon-close-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</div>
<div
className="ant-form-item-explain ant-form-item-extra {\\"style\\":[{\\"marginTop\\":0},null]}"
>
validation error
</div>
</div>
</div>
`;
exports[`Render validation.status = error properties.autoFocus: true - value[0] 1`] = `
<div
className="ant-row ant-form-item ant-form-item-has-feedback ant-form-item-has-error {\\"style\\":{\\"marginBottom\\":0}}"
@ -3966,89 +3689,6 @@ exports[`Render validation.status = null default - value[0] 1`] = `
</div>
`;
exports[`Render validation.status = null properties.allowClear: false - value[0] 1`] = `
<div
className="ant-row ant-form-item {\\"style\\":{\\"marginBottom\\":0}}"
id="properties.allowClear: false"
style={Object {}}
>
<div
className="ant-col ant-form-item-label ant-form-item-label-left {\\"style\\":{\\"whiteSpace\\":\\"normal\\",\\"marginBottom\\":8}} ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<label
className="{\\"style\\":[{\\"height\\":\\"fit-content !important\\",\\"minHeight\\":32},null]}"
htmlFor="properties.allowClear: false_input"
title="properties.allowClear: false"
>
<span
className="{}"
/>
</label>
</div>
<div
className="ant-col ant-form-item-control ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<span
className="ant-input-password {} ant-input-affix-wrapper"
onMouseUp={[Function]}
>
<input
action="click"
className="ant-input"
id="properties.allowClear: false_input"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
style={null}
type="password"
value=""
/>
<span
className="ant-input-suffix"
>
<span
aria-label="eye-invisible"
className="anticon anticon-eye-invisible ant-input-password-icon"
onClick={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
role="img"
tabIndex={-1}
>
<svg
aria-hidden="true"
data-icon="eye-invisible"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"
/>
<path
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"
/>
</svg>
</span>
</span>
</span>
</div>
</div>
</div>
</div>
`;
exports[`Render validation.status = null properties.autoFocus: true - value[0] 1`] = `
<div
className="ant-row ant-form-item {\\"style\\":{\\"marginBottom\\":0}}"
@ -5155,112 +4795,6 @@ exports[`Render validation.status = success default - value[0] 1`] = `
</div>
`;
exports[`Render validation.status = success properties.allowClear: false - value[0] 1`] = `
<div
className="ant-row ant-form-item ant-form-item-has-feedback ant-form-item-has-success {\\"style\\":{\\"marginBottom\\":0}}"
id="properties.allowClear: false"
style={Object {}}
>
<div
className="ant-col ant-form-item-label ant-form-item-label-left {\\"style\\":{\\"whiteSpace\\":\\"normal\\",\\"marginBottom\\":8}} ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<label
className="{\\"style\\":[{\\"height\\":\\"fit-content !important\\",\\"minHeight\\":32},null]}"
htmlFor="properties.allowClear: false_input"
title="properties.allowClear: false"
>
<span
className="{}"
/>
</label>
</div>
<div
className="ant-col ant-form-item-control ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<span
className="ant-input-password {} ant-input-affix-wrapper"
onMouseUp={[Function]}
>
<input
action="click"
className="ant-input"
id="properties.allowClear: false_input"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
style={null}
type="password"
value=""
/>
<span
className="ant-input-suffix"
>
<span
aria-label="eye-invisible"
className="anticon anticon-eye-invisible ant-input-password-icon"
onClick={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
role="img"
tabIndex={-1}
>
<svg
aria-hidden="true"
data-icon="eye-invisible"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"
/>
<path
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"
/>
</svg>
</span>
</span>
</span>
</div>
<span
className="ant-form-item-children-icon"
>
<span
aria-label="check-circle"
className="anticon anticon-check-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="check-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
/>
</svg>
</span>
</span>
</div>
</div>
</div>
`;
exports[`Render validation.status = success properties.autoFocus: true - value[0] 1`] = `
<div
className="ant-row ant-form-item ant-form-item-has-feedback ant-form-item-has-success {\\"style\\":{\\"marginBottom\\":0}}"
@ -6648,117 +6182,6 @@ exports[`Render validation.status = warning default - value[0] 1`] = `
</div>
`;
exports[`Render validation.status = warning properties.allowClear: false - value[0] 1`] = `
<div
className="ant-row ant-form-item ant-form-item-has-feedback ant-form-item-has-warning {\\"style\\":{\\"marginBottom\\":0}}"
id="properties.allowClear: false"
style={Object {}}
>
<div
className="ant-col ant-form-item-label ant-form-item-label-left {\\"style\\":{\\"whiteSpace\\":\\"normal\\",\\"marginBottom\\":8}} ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<label
className="{\\"style\\":[{\\"height\\":\\"fit-content !important\\",\\"minHeight\\":32},null]}"
htmlFor="properties.allowClear: false_input"
title="properties.allowClear: false"
>
<span
className="{}"
/>
</label>
</div>
<div
className="ant-col ant-form-item-control ant-col-xs-24 ant-col-sm-24"
style={Object {}}
>
<div
className="ant-form-item-control-input"
>
<div
className="ant-form-item-control-input-content"
>
<span
className="ant-input-password {} ant-input-affix-wrapper"
onMouseUp={[Function]}
>
<input
action="click"
className="ant-input"
id="properties.allowClear: false_input"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
style={null}
type="password"
value=""
/>
<span
className="ant-input-suffix"
>
<span
aria-label="eye-invisible"
className="anticon anticon-eye-invisible ant-input-password-icon"
onClick={[Function]}
onMouseDown={[Function]}
onMouseUp={[Function]}
role="img"
tabIndex={-1}
>
<svg
aria-hidden="true"
data-icon="eye-invisible"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"
/>
<path
d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"
/>
</svg>
</span>
</span>
</span>
</div>
<span
className="ant-form-item-children-icon"
>
<span
aria-label="exclamation-circle"
className="anticon anticon-exclamation-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="exclamation-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
/>
</svg>
</span>
</span>
</div>
<div
className="ant-form-item-explain ant-form-item-extra {\\"style\\":[{\\"marginTop\\":0},null]}"
>
validation warning
</div>
</div>
</div>
`;
exports[`Render validation.status = warning properties.autoFocus: true - value[0] 1`] = `
<div
className="ant-row ant-form-item ant-form-item-has-feedback ant-form-item-has-warning {\\"style\\":{\\"marginBottom\\":0}}"
@ -8092,10 +7515,6 @@ exports[`Test Schema default 1`] = `true`;
exports[`Test Schema default 2`] = `null`;
exports[`Test Schema properties.allowClear: false 1`] = `true`;
exports[`Test Schema properties.allowClear: false 2`] = `null`;
exports[`Test Schema properties.autoFocus: true 1`] = `true`;
exports[`Test Schema properties.autoFocus: true 2`] = `null`;

View File

@ -1,31 +1,331 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Mock render - default - value[0] - default 1`] = `Array []`;
exports[`Mock render - default - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "default_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.allowClear: false - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.allowClear: false - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": false,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.allowClear: false_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.autoFocus: true - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.autoFocus: true - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": true,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.autoFocus: true_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.autoSize: true - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.autoSize: true - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": true,
"className": "{}",
"disabled": undefined,
"id": "properties.autoSize: true_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.disabled: true - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.disabled: true - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": true,
"id": "properties.disabled: true_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.label align: right - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.label align: right - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.label align: right_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.label colon: false - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.label colon: false - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.label colon: false_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.label disabled: true - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.label disabled: true - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.label disabled: true_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.label extra: showing extra - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.label extra: showing extra - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.label extra: showing extra_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.label inline: true - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.label inline: true - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.label inline: true_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.label span: 12 - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.label span: 12 - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.label span: 12_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.minRows: 2 maxRows: 6 - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.minRows: 2 maxRows: 6 - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"maxRows": 6,
"minRows": 2,
},
"className": "{}",
"disabled": undefined,
"id": "properties.minRows: 2 maxRows: 6_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.placeholder: Type your text here - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.placeholder: Type your text here - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.placeholder: Type your text here_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": "Type your text here",
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.rows: 5 - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.rows: 5 - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"maxRows": 5,
"minRows": 5,
},
"className": "{}",
"disabled": undefined,
"id": "properties.rows: 5_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;
exports[`Mock render - properties.title: My TextArea Title - value[0] - default 1`] = `Array []`;
exports[`Mock render - properties.title: My TextArea Title - value[0] - default 1`] = `
Array [
Array [
Object {
"allowClear": undefined,
"autoFocus": undefined,
"autoSize": Object {
"minRows": 3,
},
"className": "{}",
"disabled": undefined,
"id": "properties.title: My TextArea Title_input",
"onChange": [Function],
"onPressEnter": [Function],
"placeholder": undefined,
"value": null,
},
Object {},
],
]
`;