2020-02-29 16:44:04 +08:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should change type when click 1`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
>
|
|
|
|
111
|
|
|
|
</textarea>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-02-29 16:44:04 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should change type when click 2`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-04-14 23:04:23 +08:00
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon-hidden ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-04-14 23:04:23 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should not show icon if defaultValue is undefined, null or empty string 1`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-04-14 23:04:23 +08:00
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon-hidden ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-04-14 23:04:23 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should not show icon if defaultValue is undefined, null or empty string 2`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-04-14 23:04:23 +08:00
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon-hidden ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-04-14 23:04:23 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should not show icon if defaultValue is undefined, null or empty string 3`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-04-14 23:04:23 +08:00
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon-hidden ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-04-14 23:04:23 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should not show icon if value is undefined, null or empty string 1`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-04-14 23:04:23 +08:00
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon-hidden ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-04-14 23:04:23 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should not show icon if value is undefined, null or empty string 2`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-04-14 23:04:23 +08:00
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon-hidden ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-04-14 23:04:23 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea allowClear should not show icon if value is undefined, null or empty string 3`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
2020-02-29 16:44:04 +08:00
|
|
|
>
|
2020-04-14 23:04:23 +08:00
|
|
|
<span
|
2020-10-10 11:30:58 +08:00
|
|
|
class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
aria-label="close-circle"
|
|
|
|
class="anticon anticon-close-circle ant-input-textarea-clear-icon-hidden ant-input-textarea-clear-icon"
|
|
|
|
role="button"
|
|
|
|
tabindex="-1"
|
2020-04-14 23:04:23 +08:00
|
|
|
>
|
2020-10-10 11:30:58 +08:00
|
|
|
<svg
|
|
|
|
aria-hidden="true"
|
|
|
|
class=""
|
|
|
|
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>
|
2020-04-14 23:04:23 +08:00
|
|
|
</span>
|
2020-10-10 11:30:58 +08:00
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea should support disabled 1`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
|
|
|
>
|
|
|
|
<textarea
|
|
|
|
class="ant-input ant-input-disabled"
|
|
|
|
disabled=""
|
|
|
|
/>
|
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`TextArea should support maxLength 1`] = `
|
2020-10-10 11:30:58 +08:00
|
|
|
<div
|
|
|
|
class="ant-input-textarea"
|
|
|
|
>
|
|
|
|
<textarea
|
|
|
|
class="ant-input"
|
|
|
|
maxlength="10"
|
|
|
|
/>
|
|
|
|
</div>
|
2020-02-29 16:44:04 +08:00
|
|
|
`;
|