chore: fix test

This commit is contained in:
期贤 2023-05-01 23:30:44 +08:00
parent 5899b7dc9d
commit 745243b77f
22 changed files with 1388 additions and 1657 deletions

3
.npmrc
View File

@ -1,3 +1,4 @@
# .npmrc
node-options=--max_old_space_size=8192
public-hoist-pattern[]=@types*
public-hoist-pattern[]=@types*
auto-install-peers=false

View File

@ -38,6 +38,8 @@
"ie >= 11"
],
"resolutions": {
"@types/react": "^18.0.38",
"@types/react-dom": "^18.0.11",
"@types/responselike": "^1.0.0",
"antd": "^5.3.3",
"prettier": "2.x",

View File

@ -45,7 +45,7 @@
},
"peerDependencies": {
"antd": ">=4.23.0",
"react": ">=16.9.0"
"react": ">=17.0.0"
},
"publishConfig": {
"access": "public"

View File

@ -39,15 +39,13 @@
"@ant-design/pro-skeleton": "^2.1.1",
"@ant-design/pro-utils": "^2.8.4",
"@babel/runtime": "^7.18.0",
"rc-resize-observer": "^0.2.3",
"rc-util": "^5.0.6",
"use-json-comparison": "^1.0.5"
},
"devDependencies": {
"rc-resize-observer": "^0.2.3"
},
"peerDependencies": {
"antd": ">=4.23.0",
"react": ">=16.9.0"
"react": ">=17.0.0"
},
"publishConfig": {
"access": "public"

View File

@ -19,15 +19,15 @@
"dist",
"lib"
],
"scripts": {
"build": "father build"
},
"browserslist": [
"last 2 versions",
"Firefox ESR",
"> 1%",
"ie >= 11"
],
"scripts": {
"build": "father build"
},
"dependencies": {
"@ant-design/icons": "^5.0.0",
"@ant-design/pro-provider": "^2.8.3",
@ -49,6 +49,6 @@
},
"peerDependencies": {
"antd": ">=4.23.0",
"react": ">=16.9.0"
"react": ">=17.0.0"
}
}

View File

@ -59,14 +59,8 @@ const useFetchData = <DataSource extends RequestData<any>>(
* @property {function} [onRequestError]
* @property {number} [debounceTime=20] 20ms
*/
const {
onLoad,
manual,
polling,
onRequestError,
debounceTime = 20,
effects = [],
} = options || {};
const { onLoad, manual, polling, onRequestError, debounceTime = 20, effects = [] } =
options || {};
/** 是否首次加载的指示器 */
const manualRequestRef = useRef<boolean>(manual);

File diff suppressed because it is too large Load Diff

View File

@ -722,7 +722,6 @@ exports[`docs/components demos 📸 renders ./docs/components/valueType.tsx corr
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"

View File

@ -9690,7 +9690,6 @@ exports[`card demos 📸 renders ./packages/card/src/demos/tabs.tsx correctly 1`
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"

View File

@ -1727,7 +1727,6 @@ exports[`descriptions demos 📸 renders ./packages/descriptions/src/demos/dynam
aria-activedescendant="layout_list_0"
aria-autocomplete="list"
aria-controls="layout_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="layout_list"
autocomplete="off"
@ -1931,7 +1930,6 @@ exports[`descriptions demos 📸 renders ./packages/descriptions/src/demos/dynam
aria-activedescendant="size_list_0"
aria-autocomplete="list"
aria-controls="size_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="size_list"
autocomplete="off"

View File

@ -2649,7 +2649,6 @@ exports[`field demos 📸 renders ./packages/field/src/demos/base_test.tsx corre
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -3132,7 +3131,6 @@ exports[`field demos 📸 renders ./packages/field/src/demos/base_test.tsx corre
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -4453,7 +4451,6 @@ exports[`field demos 📸 renders ./packages/field/src/demos/search-value-autoCl
aria-activedescendant="name_list_0"
aria-autocomplete="list"
aria-controls="name_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="name_list"
autocomplete="off"
@ -4681,7 +4678,6 @@ exports[`field demos 📸 renders ./packages/field/src/demos/select-request.tsx
aria-activedescendant="select_list_0"
aria-autocomplete="list"
aria-controls="select_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="select_list"
autocomplete="off"

View File

@ -546,7 +546,6 @@ exports[`Field 🐴 edit and no plain 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -629,7 +628,6 @@ exports[`Field 🐴 edit and no plain 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -1733,7 +1731,6 @@ exports[`Field 🐴 edit and plain 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -1816,7 +1813,6 @@ exports[`Field 🐴 edit and plain 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"

View File

@ -57,7 +57,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Dependency/demos
aria-activedescendant="globalUseMode_list_0"
aria-autocomplete="list"
aria-controls="globalUseMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="globalUseMode_list"
autocomplete="off"
@ -201,7 +200,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Dependency/demos
aria-activedescendant="default_users_0_useMode_list_0"
aria-autocomplete="list"
aria-controls="default_users_0_useMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="default_users_0_useMode_list"
autocomplete="off"
@ -2148,7 +2146,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/c
aria-activedescendant="validate_other_select_list_0"
aria-autocomplete="list"
aria-controls="validate_other_select_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="validate_other_select_list"
autocomplete="off"
@ -2272,7 +2269,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/c
aria-activedescendant="validate_other_select2_list_0"
aria-autocomplete="list"
aria-controls="validate_other_select2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="validate_other_select2_list"
autocomplete="off"
@ -2393,7 +2389,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/c
aria-activedescendant="validate_other_useMode_list_0"
aria-autocomplete="list"
aria-controls="validate_other_useMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="validate_other_useMode_list"
autocomplete="off"
@ -2607,7 +2602,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/c
aria-activedescendant="validate_other_select-multiple_list_0"
aria-autocomplete="list"
aria-controls="validate_other_select-multiple_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="validate_other_select-multiple_list"
autocomplete="off"
@ -8629,7 +8623,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/f
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -9225,7 +9218,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/s
aria-activedescendant="userQuery_list_0"
aria-autocomplete="list"
aria-controls="userQuery_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="userQuery_list"
autocomplete="off"
@ -9310,7 +9302,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/s
aria-activedescendant="userQuery2_list_0"
aria-autocomplete="list"
aria-controls="userQuery2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="userQuery2_list"
autocomplete="off"
@ -9396,7 +9387,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/FieldSet/demos/s
aria-activedescendant="userQuery3_list_0"
aria-autocomplete="list"
aria-controls="userQuery3_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="userQuery3_list"
autocomplete="off"
@ -11031,7 +11021,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/cust
aria-activedescendant="creatorButtonProps_icon_list_0"
aria-autocomplete="list"
aria-controls="creatorButtonProps_icon_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="creatorButtonProps_icon_list"
autocomplete="off"
@ -11178,7 +11167,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/cust
aria-activedescendant="creatorButtonProps_position_list_0"
aria-autocomplete="list"
aria-controls="creatorButtonProps_position_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="creatorButtonProps_position_list"
autocomplete="off"
@ -11301,7 +11289,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/cust
aria-activedescendant="creatorButtonProps_type_list_0"
aria-autocomplete="list"
aria-controls="creatorButtonProps_type_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="creatorButtonProps_type_list"
autocomplete="off"
@ -11558,7 +11545,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/cust
aria-activedescendant="copyIconProps_Icon_list_0"
aria-autocomplete="list"
aria-controls="copyIconProps_Icon_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="copyIconProps_Icon_list"
autocomplete="off"
@ -11832,7 +11818,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/cust
aria-activedescendant="deleteIconProps_Icon_list_0"
aria-autocomplete="list"
aria-controls="deleteIconProps_Icon_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="deleteIconProps_Icon_list"
autocomplete="off"
@ -12302,7 +12287,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/depe
aria-activedescendant="default_users_0_addr_list_0"
aria-autocomplete="list"
aria-controls="default_users_0_addr_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="default_users_0_addr_list"
autocomplete="off"
@ -13480,7 +13464,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/list
aria-activedescendant="users_0_sex_list_0"
aria-autocomplete="list"
aria-controls="users_0_sex_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="users_0_sex_list"
autocomplete="off"
@ -13710,7 +13693,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/list
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -13775,7 +13757,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/Group/demos/list
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -15889,6 +15870,7 @@ exports[`form demos 📸 renders ./packages/form/src/components/LoginForm/demos/
class="ant-checkbox-input"
id="autoLogin"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -16360,6 +16342,7 @@ exports[`form demos 📸 renders ./packages/form/src/components/LoginForm/demos/
class="ant-checkbox-input"
id="autoLogin"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -21706,7 +21689,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/QueryFilter/demo
aria-activedescendant="sex_list_0"
aria-autocomplete="list"
aria-controls="sex_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="sex_list"
autocomplete="off"
@ -28746,7 +28728,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -29099,7 +29080,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="type_list_0"
aria-autocomplete="list"
aria-controls="type_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="type_list"
autocomplete="off"
@ -29234,7 +29214,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="type_list_0"
aria-autocomplete="list"
aria-controls="type_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="type_list"
autocomplete="off"
@ -29601,7 +29580,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -30014,7 +29992,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="select-multiple_list_0"
aria-autocomplete="list"
aria-controls="select-multiple_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="select-multiple_list"
autocomplete="off"
@ -30188,7 +30165,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -30371,7 +30347,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="groupState_list_0"
aria-autocomplete="list"
aria-controls="groupState_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="groupState_list"
autocomplete="off"
@ -30755,7 +30730,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -31120,7 +31094,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -31335,7 +31308,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -31864,7 +31836,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="groupState_list_0"
aria-autocomplete="list"
aria-controls="groupState_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="groupState_list"
autocomplete="off"
@ -32102,7 +32073,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="list_0_state_list_0"
aria-autocomplete="list"
aria-controls="list_0_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="list_0_state_list"
autocomplete="off"
@ -32533,7 +32503,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="groupState_list_0"
aria-autocomplete="list"
aria-controls="groupState_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="groupState_list"
autocomplete="off"
@ -33094,7 +33063,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="0_state_list_0"
aria-autocomplete="list"
aria-controls="0_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="0_state_list"
autocomplete="off"
@ -33359,7 +33327,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="1_groupState_list_0"
aria-autocomplete="list"
aria-controls="1_groupState_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1_groupState_list"
autocomplete="off"
@ -33596,7 +33563,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="2_list_0_state_list_0"
aria-autocomplete="list"
aria-controls="2_list_0_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="2_list_0_state_list"
autocomplete="off"
@ -33929,7 +33895,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="2_groupState_list_0"
aria-autocomplete="list"
aria-controls="2_groupState_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="2_groupState_list"
autocomplete="off"
@ -34268,7 +34233,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -34389,7 +34353,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/SchemaForm/demos
aria-activedescendant="text_list_0"
aria-autocomplete="list"
aria-controls="text_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="text_list"
autocomplete="off"
@ -34762,7 +34725,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="step1_jobInfo_type_list_0"
aria-autocomplete="list"
aria-controls="step1_jobInfo_type_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="step1_jobInfo_type_list"
autocomplete="off"
@ -36077,7 +36039,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="time_remark_list_0"
aria-autocomplete="list"
aria-controls="time_remark_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark_list"
autocomplete="off"
@ -36196,7 +36157,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="time_remark2_list_0"
aria-autocomplete="list"
aria-controls="time_remark2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark2_list"
autocomplete="off"
@ -36659,7 +36619,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="base_source_list_0"
aria-autocomplete="list"
aria-controls="base_source_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="base_source_list"
autocomplete="off"
@ -36744,7 +36703,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="base_target_list_0"
aria-autocomplete="list"
aria-controls="base_target_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="base_target_list"
autocomplete="off"
@ -37283,7 +37241,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="base_l_list_0"
aria-autocomplete="list"
aria-controls="base_l_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="base_l_list"
autocomplete="off"
@ -37907,7 +37864,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="time_remark_list_0"
aria-autocomplete="list"
aria-controls="time_remark_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark_list"
autocomplete="off"
@ -38026,7 +37982,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="time_remark2_list_0"
aria-autocomplete="list"
aria-controls="time_remark2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark2_list"
autocomplete="off"
@ -40461,7 +40416,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="time_remark_list_0"
aria-autocomplete="list"
aria-controls="time_remark_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark_list"
autocomplete="off"
@ -40580,7 +40534,6 @@ exports[`form demos 📸 renders ./packages/form/src/components/StepsForm/demos/
aria-activedescendant="time_remark2_list_0"
aria-autocomplete="list"
aria-controls="time_remark2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark2_list"
autocomplete="off"
@ -41325,7 +41278,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/base.tsx correctly 1`
aria-activedescendant="unusedMode_list_0"
aria-autocomplete="list"
aria-controls="unusedMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="unusedMode_list"
autocomplete="off"
@ -42878,7 +42830,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/base-test.tsx correct
aria-activedescendant="unusedMode_list_0"
aria-autocomplete="list"
aria-controls="unusedMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="unusedMode_list"
autocomplete="off"
@ -43918,6 +43869,7 @@ exports[`form demos 📸 renders ./packages/form/src/demos/components-test.tsx c
class="ant-radio-input"
id="validate_other_test"
type="radio"
value=""
/>
<span
class="ant-radio-inner"
@ -43954,6 +43906,7 @@ exports[`form demos 📸 renders ./packages/form/src/demos/components-test.tsx c
class="ant-checkbox-input"
id="validate_other_test2"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -44556,6 +44509,7 @@ exports[`form demos 📸 renders ./packages/form/src/demos/config-provider.tsx c
class="ant-radio-input"
id="validate_other_test"
type="radio"
value=""
/>
<span
class="ant-radio-inner"
@ -44592,6 +44546,7 @@ exports[`form demos 📸 renders ./packages/form/src/demos/config-provider.tsx c
class="ant-checkbox-input"
id="validate_other_test2"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -45176,7 +45131,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/dependency.tsx correc
aria-activedescendant="useMode_list_0"
aria-autocomplete="list"
aria-controls="useMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="useMode_list"
autocomplete="off"
@ -45295,7 +45249,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/dependency.tsx correc
aria-activedescendant="useMode_list_0"
aria-autocomplete="list"
aria-controls="useMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="useMode_list"
autocomplete="off"
@ -46606,7 +46559,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/form-layout-grid.tsx
aria-activedescendant="level_list_0"
aria-autocomplete="list"
aria-controls="level_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="level_list"
autocomplete="off"
@ -47230,6 +47182,7 @@ exports[`form demos 📸 renders ./packages/form/src/demos/label-col.tsx correct
class="ant-checkbox-input"
id="basic_remember"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -47270,6 +47223,7 @@ exports[`form demos 📸 renders ./packages/form/src/demos/label-col.tsx correct
class="ant-radio-input"
id="basic_remember"
type="radio"
value=""
/>
<span
class="ant-radio-inner"
@ -47373,7 +47327,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/labelInValue.tsx corr
aria-activedescendant="useMode_list_0"
aria-autocomplete="list"
aria-controls="useMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="useMode_list"
autocomplete="off"
@ -48112,7 +48065,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/layout-change.tsx cor
aria-activedescendant="unusedMode_list_0"
aria-autocomplete="list"
aria-controls="unusedMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="unusedMode_list"
autocomplete="off"
@ -49203,7 +49155,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/layout-footer.tsx cor
aria-activedescendant="chapter_list_0"
aria-autocomplete="list"
aria-controls="chapter_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="chapter_list"
autocomplete="off"
@ -49299,7 +49250,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/layout-footer.tsx cor
aria-activedescendant="unusedMode_list_0"
aria-autocomplete="list"
aria-controls="unusedMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="unusedMode_list"
autocomplete="off"
@ -49622,7 +49572,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/layout-footer.tsx cor
aria-activedescendant="useMode_list_0"
aria-autocomplete="list"
aria-controls="useMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="useMode_list"
autocomplete="off"
@ -49746,7 +49695,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/layout-footer.tsx cor
aria-activedescendant="taxRate_list_0"
aria-autocomplete="list"
aria-controls="taxRate_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="taxRate_list"
autocomplete="off"
@ -51153,7 +51101,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/linkage-customization
aria-activedescendant="time_remark_list_0"
aria-autocomplete="list"
aria-controls="time_remark_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark_list"
autocomplete="off"
@ -51272,7 +51219,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/linkage-customization
aria-activedescendant="time_remark2_list_0"
aria-autocomplete="list"
aria-controls="time_remark2_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="time_remark2_list"
autocomplete="off"
@ -54032,7 +53978,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/pro-form-editableTabl
aria-activedescendant="624748504_state_list_0"
aria-autocomplete="list"
aria-controls="624748504_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="624748504_state_list"
autocomplete="off"
@ -54256,7 +54201,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/pro-form-editableTabl
aria-activedescendant="624691229_state_list_0"
aria-autocomplete="list"
aria-controls="624691229_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="624691229_state_list"
autocomplete="off"
@ -54487,7 +54431,6 @@ exports[`form demos 📸 renders ./packages/form/src/demos/sync-to-url.tsx corre
aria-activedescendant="useMode_list_0"
aria-autocomplete="list"
aria-controls="useMode_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="useMode_list"
autocomplete="off"

View File

@ -122,7 +122,6 @@ exports[`SchemaForm 😊 SchemaForm support columns 1`] = `
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -241,7 +240,6 @@ exports[`SchemaForm 😊 SchemaForm support columns 1`] = `
aria-activedescendant="direction_list_0"
aria-autocomplete="list"
aria-controls="direction_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="direction_list"
autocomplete="off"

View File

@ -664,7 +664,7 @@ describe('LightFilter', () => {
userEvent.click(container.querySelector('.ant-pro-core-field-label')!);
});
await screen.findByText('此刻');
await waitFor(() => screen.findByText('此刻'));
await act(async () => {
(await screen.findByText('此刻'))?.click();

View File

@ -726,7 +726,6 @@ exports[`settingDrawer.test 🌺 base user 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -1859,7 +1858,6 @@ exports[`settingDrawer.test 🌺 hideColors = true 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -3061,7 +3059,6 @@ exports[`settingDrawer.test 🌺 hideCopyButton = true 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -4235,7 +4232,6 @@ exports[`settingDrawer.test 🌺 hideHintAlert = true 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -5402,7 +5398,6 @@ exports[`settingDrawer.test 🌺 settings = undefined 1`] = `
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"

View File

@ -5388,7 +5388,6 @@ exports[`list demos 📸 renders ./packages/list/src/demos/search.tsx correctly
aria-activedescendant="status_list_0"
aria-autocomplete="list"
aria-controls="status_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status_list"
autocomplete="off"
@ -5797,6 +5796,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/selectedRow.tsx corre
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -5925,6 +5925,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/selectedRow.tsx corre
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -6053,6 +6054,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/selectedRow.tsx corre
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -6181,6 +6183,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/selectedRow.tsx corre
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -6317,7 +6320,6 @@ exports[`list demos 📸 renders ./packages/list/src/demos/size.tsx correctly 1`
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -6379,7 +6381,6 @@ exports[`list demos 📸 renders ./packages/list/src/demos/size.tsx correctly 1`
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -6507,6 +6508,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/size.tsx correctly 1`
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -6609,6 +6611,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/size.tsx correctly 1`
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -6711,6 +6714,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/size.tsx correctly 1`
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -6813,6 +6817,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/size.tsx correctly 1`
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -6986,6 +6991,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/special.tsx correctly
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -7129,6 +7135,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/special.tsx correctly
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -7272,6 +7279,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/special.tsx correctly
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -7415,6 +7423,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/special.tsx correctly
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -7612,6 +7621,7 @@ exports[`list demos 📸 renders ./packages/list/src/demos/testConfigProvider.ts
<input
class="qixian-checkbox-input"
type="checkbox"
value=""
/>
<span
class="qixian-checkbox-inner"

View File

@ -75,7 +75,6 @@ exports[`Table ColumnSetting 🎏 columns proFieldProps support custom 1`] = `
aria-activedescendant="name_list_0"
aria-autocomplete="list"
aria-controls="name_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="name_list"
autocomplete="off"
@ -1133,6 +1132,7 @@ exports[`Table ColumnSetting 🎏 extra columns 1`] = `
aria-label="Select all"
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -1177,6 +1177,7 @@ exports[`Table ColumnSetting 🎏 extra columns 1`] = `
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -1216,6 +1217,7 @@ exports[`Table ColumnSetting 🎏 extra columns 1`] = `
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"

View File

@ -5104,7 +5104,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164000_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164000_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164000_state_list"
autocomplete="off"
@ -5363,7 +5362,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164001_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164001_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164001_state_list"
autocomplete="off"
@ -5622,7 +5620,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164002_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164002_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164002_state_list"
autocomplete="off"
@ -5881,7 +5878,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164003_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164003_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164003_state_list"
autocomplete="off"
@ -6140,7 +6136,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164004_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164004_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164004_state_list"
autocomplete="off"
@ -6399,7 +6394,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164005_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164005_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164005_state_list"
autocomplete="off"
@ -6658,7 +6652,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164006_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164006_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164006_state_list"
autocomplete="off"
@ -6917,7 +6910,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164007_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164007_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164007_state_list"
autocomplete="off"
@ -7176,7 +7168,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164008_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164008_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164008_state_list"
autocomplete="off"
@ -7435,7 +7426,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164009_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164009_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164009_state_list"
autocomplete="off"
@ -7694,7 +7684,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164010_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164010_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164010_state_list"
autocomplete="off"
@ -7953,7 +7942,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164011_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164011_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164011_state_list"
autocomplete="off"
@ -8212,7 +8200,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164012_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164012_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164012_state_list"
autocomplete="off"
@ -8471,7 +8458,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164013_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164013_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164013_state_list"
autocomplete="off"
@ -8730,7 +8716,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164014_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164014_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164014_state_list"
autocomplete="off"
@ -8989,7 +8974,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164015_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164015_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164015_state_list"
autocomplete="off"
@ -9248,7 +9232,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164016_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164016_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164016_state_list"
autocomplete="off"
@ -9507,7 +9490,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164017_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164017_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164017_state_list"
autocomplete="off"
@ -9766,7 +9748,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164018_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164018_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164018_state_list"
autocomplete="off"
@ -10025,7 +10006,6 @@ exports[`table demos 📸 renders ./packages/table/src/components/EditableTable/
aria-activedescendant="1479828164019_state_list_0"
aria-autocomplete="list"
aria-controls="1479828164019_state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="1479828164019_state_list"
autocomplete="off"
@ -14914,6 +14894,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/batchOption.tsx cor
aria-label="Custom selection"
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -15224,6 +15205,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/batchOption.tsx cor
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -15404,6 +15386,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/batchOption.tsx cor
checked=""
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -15583,6 +15566,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/batchOption.tsx cor
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -15762,6 +15746,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/batchOption.tsx cor
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -15941,6 +15926,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/batchOption.tsx cor
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -17698,7 +17684,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/config-provider.tsx
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -18528,7 +18513,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/crud.tsx correctly
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -18655,7 +18639,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/crud.tsx correctly
aria-activedescendant="direction_list_0"
aria-autocomplete="list"
aria-controls="direction_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="direction_list"
autocomplete="off"
@ -20199,7 +20182,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dataSource.tsx corr
aria-activedescendant="creator_list_0"
aria-autocomplete="list"
aria-controls="creator_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="creator_list"
autocomplete="off"
@ -20296,7 +20278,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dataSource.tsx corr
aria-activedescendant="status_list_0"
aria-autocomplete="list"
aria-controls="status_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status_list"
autocomplete="off"
@ -25203,7 +25184,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dynamic-settings.ts
aria-activedescendant="address_list_0"
aria-autocomplete="list"
aria-controls="address_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="address_list"
autocomplete="off"
@ -25588,6 +25568,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dynamic-settings.ts
aria-label="Select all"
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -25731,6 +25712,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dynamic-settings.ts
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -25805,6 +25787,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dynamic-settings.ts
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -25879,6 +25862,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dynamic-settings.ts
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -25953,6 +25937,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dynamic-settings.ts
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -26027,6 +26012,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/dynamic-settings.ts
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -29661,7 +29647,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/intl.tsx correctly
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -29888,6 +29873,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/intl.tsx correctly
aria-label="Select all"
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -29935,6 +29921,7 @@ exports[`table demos 📸 renders ./packages/table/src/demos/intl.tsx correctly
<input
class="ant-checkbox-input"
type="checkbox"
value=""
/>
<span
class="ant-checkbox-inner"
@ -30684,7 +30671,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/linkage_form.tsx co
aria-activedescendant="rc_select_TEST_OR_SSR_list_0"
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
@ -30782,7 +30768,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/linkage_form.tsx co
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -32505,7 +32490,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/no-option.tsx corre
aria-activedescendant="status_list_0"
aria-autocomplete="list"
aria-controls="status_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status_list"
autocomplete="off"
@ -34801,7 +34785,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/open-rules.tsx corr
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -35548,7 +35531,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/open-rules.tsx corr
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -36206,7 +36188,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/pollinga.tsx correc
aria-activedescendant="status_list_0"
aria-autocomplete="list"
aria-controls="status_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status_list"
autocomplete="off"
@ -38271,7 +38252,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/rtl_table.tsx corre
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -40014,7 +39994,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/single.tsx correctl
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -40824,7 +40803,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/single-test.tsx cor
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -41707,7 +41685,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/single-test.tsx cor
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -45239,7 +45216,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/theme.tsx correctly
aria-activedescendant="state_list_0"
aria-autocomplete="list"
aria-controls="state_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="state_list"
autocomplete="off"
@ -47084,7 +47060,6 @@ exports[`table demos 📸 renders ./packages/table/src/demos/valueType_select.ts
aria-activedescendant="status_list_0"
aria-autocomplete="list"
aria-controls="status_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="status_list"
autocomplete="off"

View File

@ -217,8 +217,10 @@ describe('EditorProTable', () => {
try {
actionRef.current?.addEditRecord(undefined);
} catch (error: any) {
expect(error.message).toEqual('请设置 recordCreatorProps.record 并返回一个唯一的key');
} catch (error) {
expect((error as any).message).toEqual(
'请设置 recordCreatorProps.record 并返回一个唯一的key',
);
}
await waitTime(1000);
spy.mockRestore();

View File

@ -1,122 +1,299 @@
import ProTable from '@ant-design/pro-table';
import { render } from '@testing-library/react';
import { waitTime } from '../util';
import { act, render, waitFor } from '@testing-library/react';
import useFetchData from '../../packages/table/src/useFetchData';
import { columns } from './demo';
describe('polling', () => {
it('⏱️ polling should clearTime', async () => {
const fn = jest.fn();
render(
jest.useFakeTimers();
const html = render(
<ProTable
size="small"
cardBordered
columns={columns}
search={false}
pagination={false}
toolBarRender={false}
columns={[
{
title: 'Name',
dataIndex: 'name',
},
]}
polling={1500}
request={async () => {
fn();
request={async (params) => {
fn(params);
return Promise.resolve({
data: [],
total: 20,
data: [
{
key: '1',
name: 'John Brown',
},
],
success: true,
});
}}
rowKey="key"
/>,
);
await waitTime(1000);
expect(fn).toBeCalledTimes(1);
await waitTime(1800);
await waitFor(() => {
return html.findAllByText('暂无数据');
});
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
act(() => {
jest.runOnlyPendingTimers();
});
await waitFor(() => {
expect(fn).toBeCalled();
});
act(() => {
jest.runOnlyPendingTimers();
});
await waitFor(() => {
expect(fn).toBeCalled();
});
act(() => {
jest.runOnlyPendingTimers();
});
await waitFor(() => {
expect(fn).toBeCalledTimes(2);
});
expect(fn).toBeCalledTimes(2);
await waitTime(1000);
jest.useRealTimers();
});
it('⏱️ polling should clearTime when useFetchData', async () => {
const fn = jest.fn();
jest.useFakeTimers();
const App = (props: { getData: () => void }) => {
useFetchData(
async () => {
props.getData?.();
return {
data: [],
};
},
[],
{
pageInfo: {},
polling: 1500,
manual: false,
postData: () => [],
loading: false,
},
);
return <div />;
};
render(
<App
getData={() => {
fn();
}}
/>,
);
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
act(() => {
jest.runAllTimers();
});
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
act(() => {
jest.runAllTimers();
});
await waitFor(() => {
expect(fn).toBeCalledTimes(2);
});
expect(fn).toBeCalledTimes(2);
jest.useRealTimers();
});
it('⏱️ polling min time is 2000', async () => {
const fn = jest.fn();
render(
jest.useFakeTimers();
const html = render(
<ProTable
size="small"
cardBordered
search={false}
pagination={false}
columns={columns}
polling={1000}
request={async () => {
fn();
return Promise.resolve({
data: [],
total: 20,
success: true,
});
}}
rowKey="key"
/>,
);
await waitTime(1000);
expect(fn).toBeCalledTimes(1);
await waitTime(2000);
await waitFor(() => {
return html.findAllByText('暂无数据');
});
expect(fn).toBeCalledTimes(2);
await act(() => {
jest.advanceTimersByTime(1000);
});
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
await act(() => {
jest.advanceTimersByTime(2000);
});
await waitFor(() => {
expect(fn).toBeCalledTimes(2);
});
jest.useRealTimers();
});
it('⏱️ polling time=3000', async () => {
const fn = jest.fn();
render(
jest.useFakeTimers();
const html = render(
<ProTable
polling={3000}
size="small"
cardBordered
columns={columns}
polling={3000}
request={async () => {
fn();
search={false}
pagination={false}
toolBarRender={false}
columns={[
{
title: 'Name',
dataIndex: 'name',
},
]}
request={async (params) => {
fn(params);
return Promise.resolve({
data: [],
total: 20,
data: [
{
key: '1',
name: 'John Brown',
},
],
success: true,
});
}}
rowKey="key"
/>,
);
await waitTime(1000);
expect(fn).toBeCalledTimes(1);
await waitTime(1000);
await waitFor(() => {
return html.findAllByText('暂无数据');
});
expect(fn).toBeCalledTimes(1);
await act(() => {
return jest.advanceTimersByTime(1000);
});
await waitTime(2000);
expect(fn).toBeCalledTimes(2);
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
await act(() => {
return jest.advanceTimersByTime(1000);
});
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
await act(() => {
return jest.advanceTimersByTime(2000);
});
await waitFor(() => {
expect(fn).toBeCalledTimes(2);
});
jest.useRealTimers();
});
it('⏱️ polling support function', async () => {
const fn = jest.fn();
render(
jest.useFakeTimers();
const html = render(
<ProTable
size="small"
cardBordered
columns={columns}
polling={() => {
return 2000;
}}
request={async () => {
fn();
size="small"
cardBordered
search={false}
pagination={false}
toolBarRender={false}
columns={[
{
title: 'Name',
dataIndex: 'name',
},
]}
request={async (params) => {
fn(params);
return Promise.resolve({
data: [],
total: 20,
data: [
{
key: '1',
name: 'John Brown',
},
],
success: true,
});
}}
rowKey="key"
/>,
);
await waitTime(1000);
expect(fn).toBeCalledTimes(1);
await waitTime(2000);
await waitFor(() => {
return html.findAllByText('暂无数据');
});
expect(fn).toBeCalledTimes(2);
await act(() => {
return jest.runOnlyPendingTimers();
});
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
await act(() => {
return jest.runOnlyPendingTimers();
});
await waitFor(() => {
expect(fn).toBeCalledTimes(1);
});
await waitFor(() => {
expect(fn).toBeCalledTimes(2);
});
jest.useRealTimers();
});
});

View File

@ -22,13 +22,12 @@ import {
lighten,
setAlpha,
} from '@ant-design/pro-utils';
import { act, fireEvent, render } from '@testing-library/react';
import { act, fireEvent, render, waitFor } from '@testing-library/react';
import { Form, Input } from 'antd';
import type { Dayjs } from 'dayjs';
import dayjs from 'dayjs';
import moment from 'moment';
import React, { useEffect, useState } from 'react';
import { waitTime } from '../util';
describe('utils', () => {
beforeEach(() => {
@ -70,6 +69,7 @@ describe('utils', () => {
});
it('📅 useDebounceValue', async () => {
jest.useFakeTimers();
const App = (props: { deps: string[] }) => {
const value = useDebounceValue(props.deps?.[0], 200, props.deps);
@ -78,20 +78,27 @@ describe('utils', () => {
const html = render(<App deps={['name']} />);
await waitTime(100);
await html.findByText('name');
expect(html.baseElement?.textContent).toEqual('name');
act(() => {
html.rerender(<App deps={['string']} />);
});
await waitTime(100);
await html.findByText('name');
expect(html.baseElement?.textContent).toEqual('name');
await waitTime(500);
await html.findByText('string');
expect(html.baseElement?.textContent).toEqual('string');
await act(() => {
return jest.runOnlyPendingTimers();
});
await waitFor(() => {
expect(html.baseElement?.textContent).toEqual('string');
});
});
it('📅 dateArrayFormatter', async () => {
@ -121,6 +128,8 @@ describe('utils', () => {
});
it('📅 useDebounceValue without deps', async () => {
jest.useFakeTimers();
const App = (props: { deps: string[] }) => {
const [, forceUpdate] = useState([]);
const value = useDebounceValue(props.deps?.[0]);
@ -136,15 +145,27 @@ describe('utils', () => {
const html = render(<App deps={['name']} />);
await html.findByText('name');
expect(html.baseElement?.textContent).toEqual('name');
act(() => {
html.rerender(<App deps={['string']} />);
});
await html.findByText('name');
expect(html.baseElement?.textContent).toEqual('name');
await waitTime(1000);
expect(html.baseElement?.textContent).toEqual('string');
await act(() => {
return jest.runAllTimers();
});
await waitFor(() => {
expect(html.baseElement?.textContent).toEqual('string');
});
jest.useRealTimers();
});
it('📅 useDebounceFn', async () => {
@ -153,6 +174,8 @@ describe('utils', () => {
name: 'string',
},
});
jest.useFakeTimers();
const fn = jest.fn();
const App = ({ wait }: { wait?: number }) => {
const fetchData = useDebounceFn(async () => fn(), wait);
@ -167,11 +190,15 @@ describe('utils', () => {
fetchData.run();
fetchData.run();
}}
/>
>
test
</div>
);
};
const html = render(<App />);
await html.findByText('test');
expect(fn).toBeCalledTimes(1);
// wait === undefined
@ -185,13 +212,23 @@ describe('utils', () => {
html.rerender(<App wait={80} />);
});
await act(() => {
return jest.runOnlyPendingTimers();
});
act(() => {
html.baseElement.querySelector<HTMLDivElement>('#test')?.click();
});
await waitTime(100);
await act(() => {
return jest.runOnlyPendingTimers();
});
expect(fn).toBeCalledTimes(4);
await html.findByText('test');
await act(() => {
expect(fn).toBeCalledTimes(4);
});
act(() => {
html.rerender(<App wait={0} />);
@ -201,7 +238,9 @@ describe('utils', () => {
html.baseElement.querySelector<HTMLDivElement>('#test')?.click();
});
expect(fn).toBeCalledTimes(6);
await act(() => {
expect(fn).toBeCalledTimes(6);
});
// wait === 100 but callback is cancelled
@ -213,13 +252,15 @@ describe('utils', () => {
html.baseElement.querySelector<HTMLDivElement>('#test')?.click();
});
await waitTime(50);
await act(() => {
return jest.runOnlyPendingTimers();
});
html.unmount();
await waitTime(100);
expect(fn).toBeCalledTimes(7);
expect(fn).toBeCalledTimes(6);
jest.useRealTimers();
});
it('📅 useDebounceFn execution has errors', async () => {
@ -229,6 +270,8 @@ describe('utils', () => {
},
});
jest.useFakeTimers();
const error = new Error('debounce error');
const catchFn = jest.fn();
const App = ({ wait }: { wait?: number }) => {
@ -245,9 +288,11 @@ describe('utils', () => {
render(<App />);
await waitTime(100);
await waitFor(() => {
expect(catchFn).toBeCalledWith(error);
});
expect(catchFn).toBeCalledWith(error);
jest.useRealTimers();
});
it('📅 conversionSubmitValue nil', async () => {
@ -460,6 +505,7 @@ describe('utils', () => {
};
const html = render(
<Form>
<span>text</span>
<InlineErrorFormItem
errorType="popover"
rules={[
@ -488,11 +534,15 @@ describe('utils', () => {
</Form>,
);
await html.findByText('text');
await act(async () => {
(await html.findByRole('test_input')).focus();
});
await waitTime(100);
expect(!!html.baseElement.querySelector('div.ant-popover')).toBeFalsy();
await waitFor(() => {
expect(!!html.baseElement.querySelector('div.ant-popover')).toBeFalsy();
});
await act(async () => {
const dom = await html.findByRole('test_input');
@ -502,8 +552,10 @@ describe('utils', () => {
},
});
});
await waitTime(1000);
expect(!!html.baseElement.querySelector('div.ant-popover')).toBeTruthy();
await waitFor(() => {
expect(!!html.baseElement.querySelector('div.ant-popover')).toBeTruthy();
});
const li = html.baseElement.querySelectorAll(
'div.ant-popover .ant-popover-inner-content div.ant-form-item-explain-error',
);
@ -518,7 +570,10 @@ describe('utils', () => {
},
});
});
await waitTime(1000);
await waitFor(() => {
return html.findAllByDisplayValue('12345678901AB');
});
await act(async () => {
const dom = await html.findByRole('test_input');
@ -528,10 +583,11 @@ describe('utils', () => {
},
});
});
await waitTime(1000);
expect(
html.baseElement.querySelectorAll('div.ant-popover.ant-popover-hidden').length > 0,
).toBeFalsy();
await waitFor(() => {
expect(
html.baseElement.querySelectorAll('div.ant-popover.ant-popover-hidden').length > 0,
).toBeFalsy();
});
await act(async () => {
const dom = await html.findByRole('test_input');
@ -541,10 +597,11 @@ describe('utils', () => {
},
});
});
await waitTime(1000);
expect(
html.baseElement.querySelectorAll('div.ant-popover.ant-popover-hidden').length > 0,
).toBeFalsy();
await waitFor(() => {
expect(
html.baseElement.querySelectorAll('div.ant-popover.ant-popover-hidden').length > 0,
).toBeFalsy();
});
});
it('📅 transformKeySubmitValue return string', async () => {
@ -922,16 +979,16 @@ describe('utils', () => {
/>
);
expect(isDeepEqualReact(a, b, ['ignoreKey'])).toBeTruthy();
return (
<>
<span>{isDeepEqualReact(a, b, ['ignoreKey']) ? 'Equal' : 'No'}</span>
<CustomComponent a={a} b={b} />
</>
);
};
render(<DeepComponent />);
await waitTime(1200);
const html = render(<DeepComponent />);
await html.findAllByText('Equal');
});
it('🪓 nanoid', () => {