@@ -319,7 +319,7 @@ describe('rc-tooltip', () => {
319
319
it ( 'should apply custom classNames to all semantic elements' , ( ) => {
320
320
const customClassNames = {
321
321
root : 'custom-root' ,
322
- container : 'custom-body ' ,
322
+ container : 'custom-container ' ,
323
323
arrow : 'custom-arrow' ,
324
324
} ;
325
325
@@ -340,7 +340,7 @@ describe('rc-tooltip', () => {
340
340
341
341
// Verify classNames
342
342
expect ( tooltipElement ) . toHaveClass ( 'custom-root' ) ;
343
- expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body ' ) ;
343
+ expect ( tooltipBodyElement ) . toHaveClass ( 'custom-container ' ) ;
344
344
expect ( tooltipArrowElement ) . toHaveClass ( 'custom-arrow' ) ;
345
345
} ) ;
346
346
@@ -370,7 +370,7 @@ describe('rc-tooltip', () => {
370
370
it ( 'should apply both classNames and styles simultaneously' , ( ) => {
371
371
const customClassNames = {
372
372
root : 'custom-root' ,
373
- container : 'custom-body ' ,
373
+ container : 'custom-container ' ,
374
374
arrow : 'custom-arrow' ,
375
375
} ;
376
376
@@ -399,15 +399,15 @@ describe('rc-tooltip', () => {
399
399
// Verify that classNames and styles work simultaneously
400
400
expect ( tooltipElement ) . toHaveClass ( 'custom-root' ) ;
401
401
expect ( tooltipElement ) . toHaveStyle ( { backgroundColor : 'blue' } ) ;
402
- expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body ' ) ;
402
+ expect ( tooltipBodyElement ) . toHaveClass ( 'custom-container ' ) ;
403
403
expect ( tooltipBodyElement ) . toHaveStyle ( { color : 'red' } ) ;
404
404
expect ( tooltipArrowElement ) . toHaveClass ( 'custom-arrow' ) ;
405
405
expect ( tooltipArrowElement ) . toHaveStyle ( { borderColor : 'green' } ) ;
406
406
} ) ;
407
407
408
408
it ( 'should work with partial classNames and styles' , ( ) => {
409
409
const partialClassNames = {
410
- container : 'custom-body ' ,
410
+ container : 'custom-container ' ,
411
411
} ;
412
412
413
413
const partialStyles = {
@@ -432,7 +432,7 @@ describe('rc-tooltip', () => {
432
432
433
433
// Verify partial configuration takes effect
434
434
expect ( tooltipElement ) . toHaveStyle ( { backgroundColor : 'blue' } ) ;
435
- expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body ' ) ;
435
+ expect ( tooltipBodyElement ) . toHaveClass ( 'custom-container ' ) ;
436
436
437
437
// Verify that unconfigured elements don't have custom class names or styles
438
438
expect ( tooltipElement ) . not . toHaveClass ( 'custom-root' ) ;
@@ -445,7 +445,7 @@ describe('rc-tooltip', () => {
445
445
render (
446
446
< UniqueProvider >
447
447
< Tooltip
448
- classNames = { { uniqueContainer : 'unique-body -class' } }
448
+ classNames = { { uniqueContainer : 'unique-container -class' } }
449
449
styles = { { uniqueContainer : { color : 'red' } } }
450
450
overlay = { < div > Tooltip content</ div > }
451
451
visible
@@ -464,7 +464,7 @@ describe('rc-tooltip', () => {
464
464
it ( 'should not break when showArrow is false' , ( ) => {
465
465
const customClassNames = {
466
466
root : 'custom-root' ,
467
- container : 'custom-body ' ,
467
+ container : 'custom-container ' ,
468
468
arrow : 'custom-arrow' , // 即使配置了arrow,但不显示箭头时不应该报错
469
469
} ;
470
470
@@ -496,7 +496,7 @@ describe('rc-tooltip', () => {
496
496
// Other styles still take effect
497
497
expect ( tooltipElement ) . toHaveClass ( 'custom-root' ) ;
498
498
expect ( tooltipElement ) . toHaveStyle ( { backgroundColor : 'blue' } ) ;
499
- expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body ' ) ;
499
+ expect ( tooltipBodyElement ) . toHaveClass ( 'custom-container ' ) ;
500
500
expect ( tooltipBodyElement ) . toHaveStyle ( { color : 'red' } ) ;
501
501
} ) ;
502
502
} ) ;
0 commit comments