Skip to content

Commit

Permalink
test(Select): add collapsedItems test
Browse files Browse the repository at this point in the history
  • Loading branch information
RSS1102 committed Nov 25, 2024
1 parent 172463e commit 17090ff
Show file tree
Hide file tree
Showing 2 changed files with 440 additions and 79 deletions.
289 changes: 289 additions & 0 deletions src/select/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,71 @@ exports[`Select > :props > :clearable 1`] = `
</div>
`;

exports[`Select > :props > :collapsedItems 1`] = `
<div
class="t-select__wrap"
>
<div
class="t-select-input t-select-input--multiple t-select-input--empty t-select"
>
<div
class="t-input__wrap t-tag-input t-tag-input--break-line t-is-empty t-tag-input__with-suffix-icon"
>
<div
class="t-input t-is-readonly t-input--prefix t-input--suffix"
>
<!---->
<div
class="t-input__prefix"
>
</div>
<input
class="t-input__inner"
placeholder="请选择"
readonly=""
spellcheck="false"
type="text"
unselectable="on"
/>
<span
class="t-input__input-pre"
>
请选择
</span>
<!---->
<!---->
<span
class="t-input__suffix t-input__suffix-icon"
>
<svg
class="t-fake-arrow t-select__right-icon"
fill="none"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921"
stroke="black"
stroke-opacity="0.9"
stroke-width="1.3"
/>
</svg>
</span>
</div>
<!---->
</div>
<!---->
<!---->
</div>
</div>
`;

exports[`Select > :props > :creatable 1`] = `
<div
class="t-select__wrap"
Expand Down Expand Up @@ -638,6 +703,230 @@ exports[`Select > :props > :size 1`] = `
</div>
`;

exports[`Select > Select Option > :props > :disabled 1`] = `
<div
class="t-select__wrap"
>
<div
class="t-select-input t-select"
>
<div
class="t-input__wrap"
>
<div
class="t-input t-is-readonly t-input--suffix"
>
<!---->
<!---->
<input
class="t-input__inner"
placeholder="请选择"
readonly=""
spellcheck="false"
type="text"
unselectable="on"
/>
<!---->
<!---->
<!---->
<span
class="t-input__suffix t-input__suffix-icon"
>
<svg
class="t-fake-arrow t-select__right-icon"
fill="none"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921"
stroke="black"
stroke-opacity="0.9"
stroke-width="1.3"
/>
</svg>
</span>
</div>
<!---->
</div>
<!---->
<!---->
</div>
</div>
`;

exports[`Select > Select Option > :props > :label 1`] = `
<div
class="t-select__wrap"
>
<div
class="t-select-input t-select"
>
<div
class="t-input__wrap"
>
<div
class="t-input t-is-readonly t-input--suffix"
>
<!---->
<!---->
<input
class="t-input__inner"
placeholder="请选择"
readonly=""
spellcheck="false"
type="text"
unselectable="on"
/>
<!---->
<!---->
<!---->
<span
class="t-input__suffix t-input__suffix-icon"
>
<svg
class="t-fake-arrow t-select__right-icon"
fill="none"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921"
stroke="black"
stroke-opacity="0.9"
stroke-width="1.3"
/>
</svg>
</span>
</div>
<!---->
</div>
<!---->
<!---->
</div>
</div>
`;

exports[`Select > Select Option > :props > :value 1`] = `
<div
class="t-select__wrap"
>
<div
class="t-select-input t-select"
>
<div
class="t-input__wrap"
>
<div
class="t-input t-is-readonly t-input--suffix"
>
<!---->
<!---->
<input
class="t-input__inner"
placeholder="请选择"
readonly=""
spellcheck="false"
type="text"
unselectable="on"
/>
<!---->
<!---->
<!---->
<span
class="t-input__suffix t-input__suffix-icon"
>
<svg
class="t-fake-arrow t-select__right-icon"
fill="none"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921"
stroke="black"
stroke-opacity="0.9"
stroke-width="1.3"
/>
</svg>
</span>
</div>
<!---->
</div>
<!---->
<!---->
</div>
</div>
`;

exports[`Select > Select OptionGroup > :props > :value 1`] = `
<div
class="t-select__wrap"
>
<div
class="t-select-input t-select"
>
<div
class="t-input__wrap"
>
<div
class="t-input t-is-readonly t-input--suffix"
>
<!---->
<!---->
<input
class="t-input__inner"
placeholder="请选择"
readonly=""
spellcheck="false"
type="text"
unselectable="on"
/>
<!---->
<!---->
<!---->
<span
class="t-input__suffix t-input__suffix-icon"
>
<svg
class="t-fake-arrow t-select__right-icon"
fill="none"
height="16"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921"
stroke="black"
stroke-opacity="0.9"
stroke-width="1.3"
/>
</svg>
</span>
</div>
<!---->
</div>
<!---->
<!---->
</div>
</div>
`;

exports[`Select Option > :props > :disabled 1`] = `
<div
class="t-select__wrap"
Expand Down
Loading

0 comments on commit 17090ff

Please sign in to comment.