Skip to content

Commit f0b1fc3

Browse files
committed
test: update test
1 parent 4294a75 commit f0b1fc3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/index.test.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe('rc-tooltip', () => {
319319
it('should apply custom classNames to all semantic elements', () => {
320320
const customClassNames = {
321321
root: 'custom-root',
322-
container: 'custom-body',
322+
container: 'custom-container',
323323
arrow: 'custom-arrow',
324324
};
325325

@@ -340,7 +340,7 @@ describe('rc-tooltip', () => {
340340

341341
// Verify classNames
342342
expect(tooltipElement).toHaveClass('custom-root');
343-
expect(tooltipBodyElement).toHaveClass('custom-body');
343+
expect(tooltipBodyElement).toHaveClass('custom-container');
344344
expect(tooltipArrowElement).toHaveClass('custom-arrow');
345345
});
346346

@@ -370,7 +370,7 @@ describe('rc-tooltip', () => {
370370
it('should apply both classNames and styles simultaneously', () => {
371371
const customClassNames = {
372372
root: 'custom-root',
373-
container: 'custom-body',
373+
container: 'custom-container',
374374
arrow: 'custom-arrow',
375375
};
376376

@@ -399,15 +399,15 @@ describe('rc-tooltip', () => {
399399
// Verify that classNames and styles work simultaneously
400400
expect(tooltipElement).toHaveClass('custom-root');
401401
expect(tooltipElement).toHaveStyle({ backgroundColor: 'blue' });
402-
expect(tooltipBodyElement).toHaveClass('custom-body');
402+
expect(tooltipBodyElement).toHaveClass('custom-container');
403403
expect(tooltipBodyElement).toHaveStyle({ color: 'red' });
404404
expect(tooltipArrowElement).toHaveClass('custom-arrow');
405405
expect(tooltipArrowElement).toHaveStyle({ borderColor: 'green' });
406406
});
407407

408408
it('should work with partial classNames and styles', () => {
409409
const partialClassNames = {
410-
container: 'custom-body',
410+
container: 'custom-container',
411411
};
412412

413413
const partialStyles = {
@@ -432,7 +432,7 @@ describe('rc-tooltip', () => {
432432

433433
// Verify partial configuration takes effect
434434
expect(tooltipElement).toHaveStyle({ backgroundColor: 'blue' });
435-
expect(tooltipBodyElement).toHaveClass('custom-body');
435+
expect(tooltipBodyElement).toHaveClass('custom-container');
436436

437437
// Verify that unconfigured elements don't have custom class names or styles
438438
expect(tooltipElement).not.toHaveClass('custom-root');
@@ -445,7 +445,7 @@ describe('rc-tooltip', () => {
445445
render(
446446
<UniqueProvider>
447447
<Tooltip
448-
classNames={{ uniqueContainer: 'unique-body-class' }}
448+
classNames={{ uniqueContainer: 'unique-container-class' }}
449449
styles={{ uniqueContainer: { color: 'red' } }}
450450
overlay={<div>Tooltip content</div>}
451451
visible
@@ -464,7 +464,7 @@ describe('rc-tooltip', () => {
464464
it('should not break when showArrow is false', () => {
465465
const customClassNames = {
466466
root: 'custom-root',
467-
container: 'custom-body',
467+
container: 'custom-container',
468468
arrow: 'custom-arrow', // 即使配置了arrow,但不显示箭头时不应该报错
469469
};
470470

@@ -496,7 +496,7 @@ describe('rc-tooltip', () => {
496496
// Other styles still take effect
497497
expect(tooltipElement).toHaveClass('custom-root');
498498
expect(tooltipElement).toHaveStyle({ backgroundColor: 'blue' });
499-
expect(tooltipBodyElement).toHaveClass('custom-body');
499+
expect(tooltipBodyElement).toHaveClass('custom-container');
500500
expect(tooltipBodyElement).toHaveStyle({ color: 'red' });
501501
});
502502
});

0 commit comments

Comments
 (0)