@@ -37,28 +37,28 @@ describe('IgxTreeGrid Component Tests', () => {
37
37
grid = fix . componentInstance . treeGrid ;
38
38
} ) ) ;
39
39
40
+ it ( 'should render 10 records if height is unset and parent container\'s height is unset' , ( ) => {
41
+ fix . detectChanges ( ) ;
42
+ const defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
43
+ expect ( defaultHeight ) . not . toBeNull ( ) ;
44
+ expect ( parseInt ( defaultHeight , 10 ) ) . toBeGreaterThan ( 400 ) ;
45
+ expect ( fix . componentInstance . isVerticalScrollbarVisible ( ) ) . toBeTruthy ( ) ;
46
+ expect ( grid . rowList . length ) . toBeGreaterThanOrEqual ( 10 ) ;
47
+ } ) ;
48
+
40
49
it ( 'should match width and height of parent container when width/height are set in %' , fakeAsync ( ( ) => {
41
50
fix . componentInstance . outerWidth = 800 ;
42
51
fix . componentInstance . outerHeight = 600 ;
43
52
grid . width = '50%' ;
44
53
grid . height = '50%' ;
45
- tick ( ) ;
46
54
fix . detectChanges ( ) ;
55
+ tick ( ) ;
47
56
48
57
expect ( window . getComputedStyle ( grid . nativeElement ) . height ) . toMatch ( '300px' ) ;
49
58
expect ( window . getComputedStyle ( grid . nativeElement ) . width ) . toMatch ( '400px' ) ;
50
59
expect ( grid . rowList . length ) . toBeGreaterThan ( 0 ) ;
51
60
} ) ) ;
52
61
53
- it ( 'should render 10 records if height is unset and parent container\'s height is unset' , ( ) => {
54
- fix . detectChanges ( ) ;
55
- const defaultHeight = fix . debugElement . query ( By . css ( TBODY_CLASS ) ) . styles . height ;
56
- expect ( defaultHeight ) . not . toBeNull ( ) ;
57
- expect ( parseInt ( defaultHeight , 10 ) ) . toBeGreaterThan ( 400 ) ;
58
- expect ( fix . componentInstance . isVerticalScrollbarVisible ( ) ) . toBeTruthy ( ) ;
59
- expect ( grid . rowList . length ) . toBeGreaterThanOrEqual ( 10 ) ;
60
- } ) ;
61
-
62
62
it ( 'should render 10 records if height is 100% and parent container\'s height is unset' , fakeAsync ( ( ) => {
63
63
grid . height = '600px' ;
64
64
tick ( ) ;
0 commit comments