File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -371,10 +371,7 @@ describe('Trigger.Basic', () => {
371371 describe ( 'children renderProps' , ( ) => {
372372 it ( 'should get current open' , ( ) => {
373373 const { container } = render (
374- < Trigger
375- popupVisible = { true }
376- popup = { < span > Hello!</ span > }
377- >
374+ < Trigger popupVisible = { true } popup = { < span > Hello!</ span > } >
378375 { ( { open } ) => < button > { String ( open ) } </ button > }
379376 </ Trigger > ,
380377 ) ;
@@ -994,6 +991,16 @@ describe('Trigger.Basic', () => {
994991 expect ( document . querySelector ( '.rc-trigger-popup-hidden' ) ) . toBeTruthy ( ) ;
995992 } ) ;
996993
994+ it ( 'defaultPopupVisible should work' , async ( ) => {
995+ render (
996+ < Trigger defaultPopupVisible >
997+ < div className = "target" />
998+ </ Trigger > ,
999+ ) ;
1000+
1001+ expect ( document . querySelector ( '.rc-trigger-popup' ) ) . toBeTruthy ( ) ;
1002+ } ) ;
1003+
9971004 describe ( 'click window to hide' , ( ) => {
9981005 it ( 'should hide' , async ( ) => {
9991006 const onOpenChange = jest . fn ( ) ;
You can’t perform that action at this time.
0 commit comments