@@ -44,31 +44,56 @@ describe('MultiGrid', () => {
44
44
fixedColumnCount : 1 ,
45
45
fixedRowCount : 1
46
46
} ) ) )
47
- expect ( rendered . querySelectorAll ( '.ReactVirtualized__Grid' ) . length ) . toEqual ( 4 )
47
+ const grids = rendered . querySelectorAll ( '.ReactVirtualized__Grid' )
48
+ expect ( grids . length ) . toEqual ( 4 )
49
+ const [ topLeft , topRight , bottomLeft , bottomRight ] = grids
50
+ expect ( topLeft . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'hidden' )
51
+ expect ( topLeft . style . getPropertyValue ( 'overflow-x' ) ) . toEqual ( 'hidden' )
52
+ expect ( topLeft . style . getPropertyValue ( 'overflow-y' ) ) . toEqual ( 'hidden' )
53
+ expect ( topRight . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'hidden' )
54
+ expect ( topRight . style . getPropertyValue ( 'overflow-x' ) ) . toEqual ( 'hidden' )
55
+ expect ( topRight . style . getPropertyValue ( 'overflow-y' ) ) . toEqual ( 'hidden' )
56
+ expect ( bottomLeft . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'hidden' )
57
+ expect ( bottomLeft . style . getPropertyValue ( 'overflow-x' ) ) . toEqual ( 'hidden' )
58
+ expect ( bottomLeft . style . getPropertyValue ( 'overflow-y' ) ) . toEqual ( 'hidden' )
59
+ expect ( bottomRight . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'auto' )
60
+ expect ( bottomRight . style . getPropertyValue ( 'overflow-x' ) ) . toEqual ( 'auto' )
61
+ expect ( bottomRight . style . getPropertyValue ( 'overflow-y' ) ) . toEqual ( 'auto' )
48
62
} )
49
63
50
64
it ( 'should render 2 Grids when configured for fixed columns only' , ( ) => {
51
65
const rendered = findDOMNode ( render ( getMarkup ( {
52
66
fixedColumnCount : 1 ,
53
67
fixedRowCount : 0
54
68
} ) ) )
55
- expect ( rendered . querySelectorAll ( '.ReactVirtualized__Grid' ) . length ) . toEqual ( 2 )
69
+ const grids = rendered . querySelectorAll ( '.ReactVirtualized__Grid' )
70
+ expect ( grids . length ) . toEqual ( 2 )
71
+ const [ bottomLeft , bottomRight ] = grids
72
+ expect ( bottomLeft . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'hidden' )
73
+ expect ( bottomRight . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'auto' )
56
74
} )
57
75
58
76
it ( 'should render 2 Grids when configured for fixed rows only' , ( ) => {
59
77
const rendered = findDOMNode ( render ( getMarkup ( {
60
78
fixedColumnCount : 0 ,
61
79
fixedRowCount : 1
62
80
} ) ) )
63
- expect ( rendered . querySelectorAll ( '.ReactVirtualized__Grid' ) . length ) . toEqual ( 2 )
81
+ const grids = rendered . querySelectorAll ( '.ReactVirtualized__Grid' )
82
+ expect ( grids . length ) . toEqual ( 2 )
83
+ const [ topRight , bottomRight ] = grids
84
+ expect ( topRight . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'hidden' )
85
+ expect ( bottomRight . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'auto' )
64
86
} )
65
87
66
88
it ( 'should render 1 Grid when configured for neither fixed columns and rows' , ( ) => {
67
89
const rendered = findDOMNode ( render ( getMarkup ( {
68
90
fixedColumnCount : 0 ,
69
91
fixedRowCount : 0
70
92
} ) ) )
71
- expect ( rendered . querySelectorAll ( '.ReactVirtualized__Grid' ) . length ) . toEqual ( 1 )
93
+ const grids = rendered . querySelectorAll ( '.ReactVirtualized__Grid' )
94
+ expect ( grids . length ) . toEqual ( 1 )
95
+ const [ bottomRight ] = grids
96
+ expect ( bottomRight . style . getPropertyValue ( 'overflow' ) ) . toEqual ( 'auto' )
72
97
} )
73
98
74
99
it ( 'should adjust the number of Grids when fixed column or row counts change' , ( ) => {
0 commit comments