@@ -131,22 +131,42 @@ describe('Trigger.Basic', () => {
131
131
expect ( isPopupHidden ( ) ) . toBeTruthy ( ) ;
132
132
} ) ;
133
133
134
- it ( 'hover works' , ( ) => {
135
- const { container } = render (
136
- < Trigger
137
- action = { [ 'hover' ] }
138
- popupAlign = { placementAlignMap . left }
139
- popup = { < strong > trigger</ strong > }
140
- >
141
- < div className = "target" > click</ div >
142
- </ Trigger > ,
143
- ) ;
134
+ describe ( 'hover works' , ( ) => {
135
+ it ( 'mouse event' , ( ) => {
136
+ const { container } = render (
137
+ < Trigger
138
+ action = { [ 'hover' ] }
139
+ popupAlign = { placementAlignMap . left }
140
+ popup = { < strong > trigger</ strong > }
141
+ >
142
+ < div className = "target" > click</ div >
143
+ </ Trigger > ,
144
+ ) ;
144
145
145
- trigger ( container , '.target' , 'mouseEnter' ) ;
146
- expect ( isPopupHidden ( ) ) . toBeFalsy ( ) ;
146
+ trigger ( container , '.target' , 'mouseEnter' ) ;
147
+ expect ( isPopupHidden ( ) ) . toBeFalsy ( ) ;
147
148
148
- trigger ( container , '.target' , 'mouseLeave' ) ;
149
- expect ( isPopupHidden ( ) ) . toBeTruthy ( ) ;
149
+ trigger ( container , '.target' , 'mouseLeave' ) ;
150
+ expect ( isPopupHidden ( ) ) . toBeTruthy ( ) ;
151
+ } ) ;
152
+
153
+ it ( 'pointer event' , ( ) => {
154
+ const { container } = render (
155
+ < Trigger
156
+ action = { [ 'hover' ] }
157
+ popupAlign = { placementAlignMap . left }
158
+ popup = { < strong > trigger</ strong > }
159
+ >
160
+ < div className = "target" > click</ div >
161
+ </ Trigger > ,
162
+ ) ;
163
+
164
+ trigger ( container , '.target' , 'pointerEnter' ) ;
165
+ expect ( isPopupHidden ( ) ) . toBeFalsy ( ) ;
166
+
167
+ trigger ( container , '.target' , 'pointerLeave' ) ;
168
+ expect ( isPopupHidden ( ) ) . toBeTruthy ( ) ;
169
+ } ) ;
150
170
} ) ;
151
171
152
172
it ( 'contextMenu works' , ( ) => {
0 commit comments