@@ -5,12 +5,12 @@ import { awaitFakeTimer } from './util';
55import  type  {  TriggerProps  }  from  '../src' ; 
66import  classNames  from  'classnames' ; 
77
8- // Mock UniqueBody  to check if open props changed 
8+ // Mock UniqueContainer  to check if open props changed 
99global . openChangeLog  =  [ ] ; 
1010
11- jest . mock ( '../src/UniqueProvider/UniqueBody ' ,  ( )  =>  { 
12-   const  OriginalUniqueBody  =  jest . requireActual ( 
13-     '../src/UniqueProvider/UniqueBody ' , 
11+ jest . mock ( '../src/UniqueProvider/UniqueContainer ' ,  ( )  =>  { 
12+   const  OriginalUniqueContainer  =  jest . requireActual ( 
13+     '../src/UniqueProvider/UniqueContainer ' , 
1414  ) . default ; 
1515  const  OriginReact  =  jest . requireActual ( 'react' ) ; 
1616
@@ -25,7 +25,7 @@ jest.mock('../src/UniqueProvider/UniqueBody', () => {
2525      } 
2626    } ,  [ open ] ) ; 
2727
28-     return  OriginReact . createElement ( OriginalUniqueBody ,  props ) ; 
28+     return  OriginReact . createElement ( OriginalUniqueContainer ,  props ) ; 
2929  } ; 
3030} ) ; 
3131
@@ -105,7 +105,7 @@ describe('Trigger.Unique', () => {
105105      '-hidden' , 
106106    ) ; 
107107    expect ( 
108-       document . querySelector ( '.rc-trigger-popup-unique-body ' ) . className , 
108+       document . querySelector ( '.rc-trigger-popup-unique-container ' ) . className , 
109109    ) . not . toContain ( '-hidden' ) ; 
110110
111111    // Move from first to second trigger - popup should not hide, but content should change 
@@ -122,13 +122,13 @@ describe('Trigger.Unique', () => {
122122      '-hidden' , 
123123    ) ; 
124124    expect ( 
125-       document . querySelector ( '.rc-trigger-popup-unique-body ' ) . className , 
125+       document . querySelector ( '.rc-trigger-popup-unique-container ' ) . className , 
126126    ) . not . toContain ( '-hidden' ) ; 
127127
128128    // There should only be one popup element 
129129    expect ( document . querySelectorAll ( '.rc-trigger-popup' ) . length ) . toBe ( 1 ) ; 
130130    expect ( 
131-       document . querySelectorAll ( '.rc-trigger-popup-unique-body ' ) . length , 
131+       document . querySelectorAll ( '.rc-trigger-popup-unique-container ' ) . length , 
132132    ) . toBe ( 1 ) ; 
133133
134134    // FloatBg open prop should not have changed during transition (no close animation) 
@@ -184,36 +184,36 @@ describe('Trigger.Unique', () => {
184184    expect ( popup . className ) . toContain ( 'rc-trigger-popup-unique-controlled' ) ; 
185185  } ) ; 
186186
187-   it ( 'should apply uniqueBgClassName  to UniqueBody  component' ,  async  ( )  =>  { 
188-     await  setupAndOpenPopup ( {  uniqueBgClassName : 'custom-bg -class'  } ) ; 
187+   it ( 'should apply uniqueContainerClassName  to UniqueContainer  component' ,  async  ( )  =>  { 
188+     await  setupAndOpenPopup ( {  uniqueContainerClassName : 'custom-container -class'  } ) ; 
189189
190-     // Check that UniqueBody  has the custom background  className 
191-     const  uniqueBody  =  document . querySelector ( '.rc-trigger-popup-unique-body ' ) ; 
192-     expect ( uniqueBody ) . toBeTruthy ( ) ; 
193-     expect ( uniqueBody . className ) . toContain ( 'custom-bg -class' ) ; 
190+     // Check that UniqueContainer  has the custom container  className 
191+     const  uniqueContainer  =  document . querySelector ( '.rc-trigger-popup-unique-container ' ) ; 
192+     expect ( uniqueContainer ) . toBeTruthy ( ) ; 
193+     expect ( uniqueContainer . className ) . toContain ( 'custom-container -class' ) ; 
194194  } ) ; 
195195
196-   it ( 'should apply uniqueBgStyle  to UniqueBody  component' ,  async  ( )  =>  { 
196+   it ( 'should apply uniqueContainerStyle  to UniqueContainer  component' ,  async  ( )  =>  { 
197197    await  setupAndOpenPopup ( { 
198-       uniqueBgStyle : {  backgroundColor : 'red' ,  border : '1px solid blue'  } , 
198+       uniqueContainerStyle : {  backgroundColor : 'red' ,  border : '1px solid blue'  } , 
199199    } ) ; 
200200
201-     // Check that UniqueBody  has the custom background  style 
202-     const  uniqueBody  =  document . querySelector ( '.rc-trigger-popup-unique-body ' ) ; 
203-     expect ( uniqueBody ) . toBeTruthy ( ) ; 
204-     expect ( uniqueBody ) . toHaveStyle ( { 
201+     // Check that UniqueContainer  has the custom container  style 
202+     const  uniqueContainer  =  document . querySelector ( '.rc-trigger-popup-unique-container ' ) ; 
203+     expect ( uniqueContainer ) . toBeTruthy ( ) ; 
204+     expect ( uniqueContainer ) . toHaveStyle ( { 
205205      backgroundColor : 'red' , 
206206      border : '1px solid blue' , 
207207    } ) ; 
208208  } ) ; 
209209
210-   it ( 'should not apply any additional className to UniqueBody  when uniqueBgClassName  is not provided' ,  async  ( )  =>  { 
210+   it ( 'should not apply any additional className to UniqueContainer  when uniqueContainerClassName  is not provided' ,  async  ( )  =>  { 
211211    await  setupAndOpenPopup ( ) ; 
212212
213-     // Check that UniqueBody  exists but does not have custom background  className 
214-     const  uniqueBody  =  document . querySelector ( '.rc-trigger-popup-unique-body ' ) ; 
215-     expect ( uniqueBody ) . toBeTruthy ( ) ; 
216-     expect ( uniqueBody . className ) . not . toContain ( 'undefined' ) ; 
213+     // Check that UniqueContainer  exists but does not have custom container  className 
214+     const  uniqueContainer  =  document . querySelector ( '.rc-trigger-popup-unique-container ' ) ; 
215+     expect ( uniqueContainer ) . toBeTruthy ( ) ; 
216+     expect ( uniqueContainer . className ) . not . toContain ( 'undefined' ) ; 
217217  } ) ; 
218218
219219  it ( 'should pass alignedClassName on unique body' ,  async  ( )  =>  { 
@@ -246,13 +246,13 @@ describe('Trigger.Unique', () => {
246246    ) ; 
247247
248248    expect ( document . querySelector ( '.rc-trigger-popup' ) ) . toHaveClass ( 'bamboo' ) ; 
249-     expect ( document . querySelector ( '.rc-trigger-popup-unique-body ' ) ) . toHaveClass ( 
249+     expect ( document . querySelector ( '.rc-trigger-popup-unique-container ' ) ) . toHaveClass ( 
250250      'bamboo' , 
251251    ) ; 
252252
253253    // Check that arrow position CSS variables are set 
254-     const  uniqueBody  =  document . querySelector ( '.rc-trigger-popup-unique-body ' ) ; 
255-     const  computedStyle  =  getComputedStyle ( uniqueBody ) ; 
254+     const  uniqueContainer  =  document . querySelector ( '.rc-trigger-popup-unique-container ' ) ; 
255+     const  computedStyle  =  getComputedStyle ( uniqueContainer ) ; 
256256    expect ( computedStyle . getPropertyValue ( '--arrow-x' ) ) . not . toBe ( '' ) ; 
257257    expect ( computedStyle . getPropertyValue ( '--arrow-y' ) ) . not . toBe ( '' ) ; 
258258  } ) ; 
0 commit comments