File tree Expand file tree Collapse file tree 4 files changed +9
-12
lines changed Expand file tree Collapse file tree 4 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
7777<div style = " position: absolute; top: 0px; left: 0px; width: 100%;" >
7878 <div >
7979 <!---->
80- <div class = " ant-picker-dropdown ant-slide-up-enter-from ant-slide-up-enter-active " style = " pointer-events: none; opacity: 0 ;" >
80+ <div class = " ant-picker-dropdown" style = " pointer-events: none;" >
8181 <div class = " ant-picker-panel-container" >
8282 <div tabindex = " -1" class = " ant-picker-panel ant-picker-panel-focused" >
8383 <div class = " ant-picker-week-panel" >
Original file line number Diff line number Diff line change @@ -65,12 +65,9 @@ describe('MonthPicker and WeekPicker', () => {
6565 it ( 'render WeekPicker' , async ( ) => {
6666 const birthday = dayjs ( '2000-01-01' , 'YYYY-MM-DD' ) . locale ( 'zh-cn' ) ;
6767 const wrapper = mount ( WeekPicker , { props : { open : false } , sync : false } ) ;
68- await asyncExpect ( ( ) => {
69- wrapper . setProps ( { value : birthday , open : true } ) ;
70- } ) ;
71- await sleep ( 50 ) ;
72- await asyncExpect ( ( ) => {
73- expect ( document . body . innerHTML ) . toMatchSnapshot ( ) ;
74- } , 0 ) ;
68+ await sleep ( 10 ) ;
69+ wrapper . setProps ( { value : birthday , open : true } ) ;
70+ await sleep ( 1000 ) ;
71+ expect ( document . body . innerHTML ) . toMatchSnapshot ( ) ;
7572 } ) ;
7673} ) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ exports[`Slider should show tooltip when hovering slider handler 1`] = `
1616<div style = " position: absolute; top: 0px; left: 0px; width: 100%;" >
1717 <div >
1818 <!---->
19- <div class = " ant-tooltip ant-slider-tooltip ant-zoom-down-enter-from ant-zoom-down-enter-active " style = " pointer-events: none; opacity: 0 ;" >
19+ <div class = " ant-tooltip ant-slider-tooltip" style = " pointer-events: none;" >
2020 <div class = " ant-tooltip-content" >
2121 <div class = " ant-tooltip-arrow" ><span class = " ant-tooltip-arrow-content" ></span ></div >
2222 <div class = " ant-tooltip-inner" role = " tooltip" >30</div >
@@ -42,7 +42,7 @@ exports[`Slider should show tooltip when hovering slider handler 2`] = `
4242<div style = " position: absolute; top: 0px; left: 0px; width: 100%;" >
4343 <div >
4444 <!---->
45- <div class = " ant-tooltip ant-slider-tooltip ant-zoom-down-leave-from ant-zoom-down-leave-active " style = " pointer-events: none;" >
45+ <div class = " ant-tooltip ant-slider-tooltip" style = " pointer-events: none; display : none;" >
4646 <div class = " ant-tooltip-content" >
4747 <div class = " ant-tooltip-arrow" ><span class = " ant-tooltip-arrow-content" ></span ></div >
4848 <div class = " ant-tooltip-inner" role = " tooltip" >30</div >
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ describe('Slider', () => {
1515 } ) ;
1616 await asyncExpect ( ( ) => {
1717 wrapper . findAll ( '.ant-slider-handle' ) [ 0 ] . trigger ( 'mouseenter' ) ;
18- } ) ;
18+ } , 1000 ) ;
1919 await asyncExpect ( ( ) => {
2020 expect ( document . body . innerHTML ) . toMatchSnapshot ( ) ;
2121 wrapper . findAll ( '.ant-slider-handle' ) [ 0 ] . trigger ( 'mouseleave' ) ;
22- } , 100 ) ;
22+ } , 1000 ) ;
2323 await asyncExpect ( ( ) => {
2424 expect ( document . body . innerHTML ) . toMatchSnapshot ( ) ;
2525 } , 100 ) ;
You can’t perform that action at this time.
0 commit comments