@@ -37,16 +37,12 @@ describe('Select', () => {
37
37
attachTo : 'body' ,
38
38
} ) ;
39
39
await asyncExpect ( ( ) => {
40
- wrapper
41
- . findAll ( '.ant-select-selector' ) [ 0 ]
42
- . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
40
+ wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
43
41
} ) ;
44
42
45
43
await asyncExpect ( ( ) => {
46
44
expect ( $$ ( '.ant-select-item-option' ) . length ) . toBe ( 0 ) ;
47
- expect ( $$ ( '.ant-empty-description' ) [ 0 ] . innerHTML ) . toBe (
48
- 'No Data' ,
49
- ) ;
45
+ expect ( $$ ( '.ant-empty-description' ) [ 0 ] . innerHTML ) . toBe ( 'No Data' ) ;
50
46
} , 100 ) ;
51
47
} ) ;
52
48
@@ -60,9 +56,7 @@ describe('Select', () => {
60
56
attachTo : 'body' ,
61
57
} ) ;
62
58
await asyncExpect ( ( ) => {
63
- wrapper
64
- . findAll ( '.ant-select-selector' ) [ 0 ]
65
- . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
59
+ wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
66
60
} ) ;
67
61
68
62
await asyncExpect ( ( ) => {
@@ -79,9 +73,7 @@ describe('Select', () => {
79
73
attachTo : 'body' ,
80
74
} ) ;
81
75
await asyncExpect ( ( ) => {
82
- wrapper
83
- . findAll ( '.ant-select-selector' ) [ 0 ]
84
- . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
76
+ wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
85
77
} ) ;
86
78
87
79
await asyncExpect ( ( ) => {
@@ -98,9 +90,7 @@ describe('Select', () => {
98
90
sync : false ,
99
91
} ) ;
100
92
await asyncExpect ( ( ) => {
101
- wrapper
102
- . findAll ( '.ant-select-selector' ) [ 0 ]
103
- . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
93
+ wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
104
94
} ) ;
105
95
106
96
await asyncExpect ( ( ) => {
@@ -135,11 +125,9 @@ describe('Select', () => {
135
125
expect ( getStyle ( $$ ( '.ant-select-dropdown' ) [ 0 ] , 'display' ) ) . toBe ( 'block' ) ;
136
126
} , 100 ) ;
137
127
await asyncExpect ( ( ) => {
138
- wrapper
139
- . findAll ( '.ant-select-selector' ) [ 0 ]
140
- . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
128
+ wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
141
129
} ) ;
142
- await asyncExpect ( ( ) => {
130
+ await asyncExpect ( ( ) => {
143
131
expect ( onDropdownVisibleChange ) . toHaveBeenLastCalledWith ( false ) ;
144
132
} ) ;
145
133
await asyncExpect ( ( ) => {
@@ -149,9 +137,7 @@ describe('Select', () => {
149
137
150
138
await asyncExpect ( ( ) => {
151
139
expect ( getStyle ( $$ ( '.ant-select-dropdown' ) [ 0 ] , 'display' ) ) . toBe ( 'none' ) ;
152
- wrapper
153
- . findAll ( '.ant-select-selector' ) [ 0 ]
154
- . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
140
+ wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
155
141
expect ( onDropdownVisibleChange ) . toHaveBeenLastCalledWith ( true ) ;
156
142
expect ( getStyle ( $$ ( '.ant-select-dropdown' ) [ 0 ] , 'display' ) ) . toBe ( 'none' ) ;
157
143
} , 500 ) ;
0 commit comments