@@ -29,13 +29,17 @@ describe('Select', () => {
29
29
} ) ;
30
30
31
31
it ( 'should have default notFoundContent' , async ( ) => {
32
- const wrapper = mount ( Select , {
33
- props : {
34
- mode : 'multiple' ,
32
+ const wrapper = mount (
33
+ {
34
+ render ( ) {
35
+ return < Select mode = "multiple" /> ;
36
+ } ,
35
37
} ,
36
- sync : false ,
37
- attachTo : 'body' ,
38
- } ) ;
38
+ {
39
+ sync : false ,
40
+ attachTo : 'body' ,
41
+ } ,
42
+ ) ;
39
43
await asyncExpect ( ( ) => {
40
44
wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
41
45
} ) ;
@@ -47,14 +51,17 @@ describe('Select', () => {
47
51
} ) ;
48
52
49
53
it ( 'should support set notFoundContent to null' , async ( ) => {
50
- const wrapper = mount ( Select , {
51
- props : {
52
- mode : 'multiple' ,
53
- notFoundContent : null ,
54
+ const wrapper = mount (
55
+ {
56
+ render ( ) {
57
+ return < Select mode = "multiple" notFoundContent = { null } /> ;
58
+ } ,
54
59
} ,
55
- sync : false ,
56
- attachTo : 'body' ,
57
- } ) ;
60
+ {
61
+ sync : false ,
62
+ attachTo : 'body' ,
63
+ } ,
64
+ ) ;
58
65
await asyncExpect ( ( ) => {
59
66
wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
60
67
} ) ;
@@ -65,13 +72,17 @@ describe('Select', () => {
65
72
} ) ;
66
73
67
74
it ( 'should not have default notFoundContent when mode is combobox' , async ( ) => {
68
- const wrapper = mount ( Select , {
69
- props : {
70
- mode : Select . SECRET_COMBOBOX_MODE_DO_NOT_USE ,
75
+ const wrapper = mount (
76
+ {
77
+ render ( ) {
78
+ return < Select mode = { Select . SECRET_COMBOBOX_MODE_DO_NOT_USE } /> ;
79
+ } ,
71
80
} ,
72
- sync : false ,
73
- attachTo : 'body' ,
74
- } ) ;
81
+ {
82
+ sync : false ,
83
+ attachTo : 'body' ,
84
+ } ,
85
+ ) ;
75
86
await asyncExpect ( ( ) => {
76
87
wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
77
88
} ) ;
@@ -82,13 +93,18 @@ describe('Select', () => {
82
93
} ) ;
83
94
84
95
it ( 'should not have notFoundContent when mode is combobox and notFoundContent is set' , async ( ) => {
85
- const wrapper = mount ( Select , {
86
- props : {
87
- mode : Select . SECRET_COMBOBOX_MODE_DO_NOT_USE ,
88
- notFoundContent : 'not at all' ,
96
+ const wrapper = mount (
97
+ {
98
+ render ( ) {
99
+ return (
100
+ < Select mode = { Select . SECRET_COMBOBOX_MODE_DO_NOT_USE } notFoundContent = "not at all" />
101
+ ) ;
102
+ } ,
89
103
} ,
90
- sync : false ,
91
- } ) ;
104
+ {
105
+ sync : false ,
106
+ } ,
107
+ ) ;
92
108
await asyncExpect ( ( ) => {
93
109
wrapper . findAll ( '.ant-select-selector' ) [ 0 ] . element . dispatchEvent ( new MouseEvent ( 'mousedown' ) ) ;
94
110
} ) ;
0 commit comments