@@ -339,7 +339,7 @@ describe('rc-tooltip', () => {
339
339
const tooltipBodyElement = container . querySelector ( '.rc-tooltip-body' ) as HTMLElement ;
340
340
const tooltipArrowElement = container . querySelector ( '.rc-tooltip-arrow' ) as HTMLElement ;
341
341
342
- // 验证 classNames
342
+ // Verify classNames
343
343
expect ( tooltipElement ) . toHaveClass ( 'custom-root' ) ;
344
344
expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body' ) ;
345
345
expect ( tooltipArrowElement ) . toHaveClass ( 'custom-arrow' ) ;
@@ -367,7 +367,7 @@ describe('rc-tooltip', () => {
367
367
const tooltipBodyElement = container . querySelector ( '.rc-tooltip-body' ) as HTMLElement ;
368
368
const tooltipArrowElement = container . querySelector ( '.rc-tooltip-arrow' ) as HTMLElement ;
369
369
370
- // 验证 styles
370
+ // Verify styles
371
371
expect ( tooltipElement . style . backgroundColor ) . toBe ( 'blue' ) ;
372
372
expect ( tooltipElement . style . zIndex ) . toBe ( '1000' ) ;
373
373
expect ( tooltipBodyElement . style . color ) . toBe ( 'red' ) ;
@@ -404,7 +404,7 @@ describe('rc-tooltip', () => {
404
404
const tooltipBodyElement = container . querySelector ( '.rc-tooltip-body' ) as HTMLElement ;
405
405
const tooltipArrowElement = container . querySelector ( '.rc-tooltip-arrow' ) as HTMLElement ;
406
406
407
- // 验证 classNames 和 styles 同时生效
407
+ // Verify that classNames and styles work simultaneously
408
408
expect ( tooltipElement ) . toHaveClass ( 'custom-root' ) ;
409
409
expect ( tooltipElement . style . backgroundColor ) . toBe ( 'blue' ) ;
410
410
expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body' ) ;
@@ -438,11 +438,11 @@ describe('rc-tooltip', () => {
438
438
const tooltipBodyElement = container . querySelector ( '.rc-tooltip-body' ) as HTMLElement ;
439
439
const tooltipArrowElement = container . querySelector ( '.rc-tooltip-arrow' ) as HTMLElement ;
440
440
441
- // 验证部分配置生效
441
+ // Verify partial configuration takes effect
442
442
expect ( tooltipElement . style . backgroundColor ) . toBe ( 'blue' ) ;
443
443
expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body' ) ;
444
444
445
- // 验证未配置的不会有自定义类名或样式
445
+ // Verify that unconfigured elements don't have custom class names or styles
446
446
expect ( tooltipElement ) . not . toHaveClass ( 'custom-root' ) ;
447
447
expect ( tooltipArrowElement ) . not . toHaveClass ( 'custom-arrow' ) ;
448
448
} ) ;
@@ -476,10 +476,10 @@ describe('rc-tooltip', () => {
476
476
const tooltipBodyElement = container . querySelector ( '.rc-tooltip-body' ) as HTMLElement ;
477
477
const tooltipArrowElement = container . querySelector ( '.rc-tooltip-arrow' ) ;
478
478
479
- // 验证没有箭头时
479
+ // Verify when arrow is not shown
480
480
expect ( tooltipArrowElement ) . toBeFalsy ( ) ;
481
481
482
- // 其他样式仍然生效
482
+ // Other styles still take effect
483
483
expect ( tooltipElement ) . toHaveClass ( 'custom-root' ) ;
484
484
expect ( tooltipElement . style . backgroundColor ) . toBe ( 'blue' ) ;
485
485
expect ( tooltipBodyElement ) . toHaveClass ( 'custom-body' ) ;
@@ -522,7 +522,7 @@ describe('rc-tooltip', () => {
522
522
const btn = container . querySelector ( 'button' ) ;
523
523
expect ( btn ) . toHaveClass ( 'custom-btn' ) ;
524
524
525
- // 触发原始事件处理器
525
+ // Trigger original event handler
526
526
fireEvent . mouseEnter ( btn ) ;
527
527
expect ( onMouseEnter ) . toHaveBeenCalled ( ) ;
528
528
} ) ;
0 commit comments