@@ -38,7 +38,7 @@ describe('Content Example', () => {
38
38
39
39
const tooltip = firstComponent ( tree , Tooltip . WrappedComponent ) . refs . tooltip ;
40
40
assert ( getStyleValue ( tooltip , 'visibility' ) === 'visible' ) ;
41
- assert ( tooltip . innerText === ' This is a default content.\n' , 'should be default content' ) ;
41
+ assert ( tooltip . innerText === " This is a default content.\nIt's a second line.\n" , 'should be default content' ) ;
42
42
} ) ;
43
43
} ) ;
44
44
@@ -52,6 +52,25 @@ describe('Content Example', () => {
52
52
assert ( getStyleValue ( tooltip , 'visibility' ) === 'visible' ) ;
53
53
assert ( tooltip . innerText === 'This is a custom content.\n' , 'should be custom content' ) ;
54
54
} ) ;
55
+
56
+ it ( 'should be resized' , ( ) => {
57
+ // Mouseover on custom
58
+ const custom = firstComponent ( tree , Origin . WrappedComponent , { className : 'target custom' } ) . refs . wrapper ;
59
+ TestUtils . Simulate . mouseEnter ( custom ) ;
60
+
61
+ const tooltip = firstComponent ( tree , Tooltip . WrappedComponent ) . refs . tooltip ;
62
+ const customPos = position ( tooltip ) ;
63
+ TestUtils . Simulate . mouseLeave ( custom ) ;
64
+
65
+ // Mouseover on default
66
+ const origin = firstComponent ( tree , Origin . WrappedComponent , { className : 'target default' } ) . refs . wrapper ;
67
+ TestUtils . Simulate . mouseEnter ( origin ) ;
68
+
69
+ const defaultPos = position ( tooltip ) ;
70
+ TestUtils . Simulate . mouseLeave ( origin ) ;
71
+
72
+ assert ( customPos . height < defaultPos . height , "default's height is higher than custom's height" ) ;
73
+ } ) ;
55
74
} ) ;
56
75
57
76
describe ( 'continuous updating content' , ( ) => {
0 commit comments