Browse Source
* AutoComplete(test): refactor custom input autocomplete with userEvent and screen * AutoComplete(test): refactor dataSource is object array with screen and userEvent * AutoComplete(test): update file name to tsx and refactor with screen * AutoComplete(test): option test refactor * AutoComplete(test): className test refactor * remove fireEvent * ignore ts error * disable no-console Co-authored-by: ian.xufeng <ian.xufeng@shopee.com>pull/36923/head
clean99
2 years ago
committed by
GitHub
4 changed files with 66 additions and 145 deletions
@ -1,121 +0,0 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`AutoComplete legacy dataSource should accept react element option 1`] = ` |
|||
<div |
|||
class="ant-select ant-select-auto-complete ant-select-single ant-select-open ant-select-show-search" |
|||
> |
|||
<div |
|||
class="ant-select-selector" |
|||
> |
|||
<span |
|||
class="ant-select-selection-search" |
|||
> |
|||
<input |
|||
aria-activedescendant="rc_select_TEST_OR_SSR_list_-1" |
|||
aria-autocomplete="list" |
|||
aria-controls="rc_select_TEST_OR_SSR_list" |
|||
aria-expanded="true" |
|||
aria-haspopup="listbox" |
|||
aria-owns="rc_select_TEST_OR_SSR_list" |
|||
autocomplete="off" |
|||
class="ant-select-selection-search-input" |
|||
id="rc_select_TEST_OR_SSR" |
|||
role="combobox" |
|||
type="search" |
|||
value="" |
|||
/> |
|||
</span> |
|||
<span |
|||
class="ant-select-selection-placeholder" |
|||
/> |
|||
</div> |
|||
<div> |
|||
<div |
|||
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up" |
|||
style="opacity: 0; min-width: 0; width: 0px;" |
|||
> |
|||
<div> |
|||
<div |
|||
id="rc_select_TEST_OR_SSR_list" |
|||
role="listbox" |
|||
style="height: 0px; width: 0px; overflow: hidden;" |
|||
> |
|||
<div |
|||
aria-label="ReactNode" |
|||
aria-selected="false" |
|||
id="rc_select_TEST_OR_SSR_list_0" |
|||
role="option" |
|||
> |
|||
key |
|||
</div> |
|||
</div> |
|||
<div |
|||
class="rc-virtual-list" |
|||
style="position: relative;" |
|||
> |
|||
<div |
|||
class="rc-virtual-list-holder" |
|||
style="max-height: 256px; overflow-y: auto;" |
|||
> |
|||
<div> |
|||
<div |
|||
class="rc-virtual-list-holder-inner" |
|||
style="display: flex; flex-direction: column;" |
|||
> |
|||
<div |
|||
aria-selected="false" |
|||
class="ant-select-item ant-select-item-option" |
|||
title="ReactNode" |
|||
> |
|||
<div |
|||
class="ant-select-item-option-content" |
|||
> |
|||
ReactNode |
|||
</div> |
|||
<span |
|||
aria-hidden="true" |
|||
class="ant-select-item-option-state" |
|||
style="user-select: none;" |
|||
unselectable="on" |
|||
/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
`; |
|||
|
|||
exports[`AutoComplete rtl render component should be rendered correctly in RTL direction 1`] = ` |
|||
<div |
|||
class="ant-select ant-select-rtl ant-select-auto-complete ant-select-single ant-select-show-search" |
|||
> |
|||
<div |
|||
class="ant-select-selector" |
|||
> |
|||
<span |
|||
class="ant-select-selection-search" |
|||
> |
|||
<input |
|||
aria-activedescendant="rc_select_TEST_OR_SSR_list_0" |
|||
aria-autocomplete="list" |
|||
aria-controls="rc_select_TEST_OR_SSR_list" |
|||
aria-haspopup="listbox" |
|||
aria-owns="rc_select_TEST_OR_SSR_list" |
|||
autocomplete="off" |
|||
class="ant-select-selection-search-input" |
|||
id="rc_select_TEST_OR_SSR" |
|||
role="combobox" |
|||
type="search" |
|||
value="" |
|||
/> |
|||
</span> |
|||
<span |
|||
class="ant-select-selection-placeholder" |
|||
/> |
|||
</div> |
|||
</div> |
|||
`; |
@ -0,0 +1,32 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`AutoComplete rtl render component should be rendered correctly in RTL direction 1`] = ` |
|||
<div |
|||
class="ant-select ant-select-rtl ant-select-auto-complete ant-select-single ant-select-show-search" |
|||
> |
|||
<div |
|||
class="ant-select-selector" |
|||
> |
|||
<span |
|||
class="ant-select-selection-search" |
|||
> |
|||
<input |
|||
aria-activedescendant="rc_select_TEST_OR_SSR_list_0" |
|||
aria-autocomplete="list" |
|||
aria-controls="rc_select_TEST_OR_SSR_list" |
|||
aria-haspopup="listbox" |
|||
aria-owns="rc_select_TEST_OR_SSR_list" |
|||
autocomplete="off" |
|||
class="ant-select-selection-search-input" |
|||
id="rc_select_TEST_OR_SSR" |
|||
role="combobox" |
|||
type="search" |
|||
value="" |
|||
/> |
|||
</span> |
|||
<span |
|||
class="ant-select-selection-placeholder" |
|||
/> |
|||
</div> |
|||
</div> |
|||
`; |
Loading…
Reference in new issue