@@ -104,7 +104,7 @@ describe('Table.fixedColumns', () => {
104104
105105 it ( 'calculate fixedColumns row height' , ( ) => {
106106 const wrapper = mount ( < Table columns = { columns } data = { data } scroll = { { x : 1200 } } /> ) ;
107- const tableNode = wrapper . instance ( ) . tableNode ;
107+ const { tableNode } = wrapper . instance ( ) ;
108108 const rows = tableNode . querySelectorAll ( 'tr' ) ;
109109 const theads = tableNode . querySelectorAll ( 'thead' ) ;
110110 const fixedLeftRows = tableNode . querySelectorAll ( '.rc-table-fixed-left tr' ) ;
@@ -162,29 +162,29 @@ describe('Table.fixedColumns', () => {
162162 // <Table /> is show.
163163 simulateTableShow ( ) ;
164164 wrapper . setProps ( { } ) ;
165- fixedLeftRows . forEach ( tr => {
166- expect ( tr . style . height ) . toBe ( rowHeight ) ;
165+ fixedLeftRows . forEach ( ( tr , i ) => {
166+ expect ( tr . style . height ) . toBe ( i === 0 ? '29.5px' : rowHeight ) ;
167167 } ) ;
168- fixedRightRows . forEach ( tr => {
169- expect ( tr . style . height ) . toBe ( rowHeight ) ;
168+ fixedRightRows . forEach ( ( tr , i ) => {
169+ expect ( tr . style . height ) . toBe ( i === 0 ? '29.5px' : rowHeight ) ;
170170 } ) ;
171171
172172 // <Table /> is hidden.
173173 simulateTableHidden ( ) ;
174174 wrapper . update ( ) ;
175- fixedLeftRows . forEach ( tr => {
176- expect ( tr . style . height ) . toBe ( rowHeight ) ;
175+ fixedLeftRows . forEach ( ( tr , i ) => {
176+ expect ( tr . style . height ) . toBe ( i === 0 ? '29.5px' : rowHeight ) ;
177177 } ) ;
178- fixedRightRows . forEach ( tr => {
179- expect ( tr . style . height ) . toBe ( rowHeight ) ;
178+ fixedRightRows . forEach ( ( tr , i ) => {
179+ expect ( tr . style . height ) . toBe ( i === 0 ? '29.5px' : rowHeight ) ;
180180 } ) ;
181181 } ) ;
182182
183183 it ( 'has correct scroll classNames when table resize' , ( ) => {
184184 const wrapper = mount (
185185 < Table columns = { columns } data = { data } scroll = { { x : true } } style = { { width : 2000 } } /> ,
186186 ) ;
187- const tableNode = wrapper . instance ( ) . tableNode ;
187+ const { tableNode } = wrapper . instance ( ) ;
188188 const tableBodyContainer = tableNode . querySelectorAll ( '.rc-table-scroll > .rc-table-body' ) [ 0 ] ;
189189 const tableBodyNode = tableBodyContainer . children [ 0 ] ;
190190 expect ( tableNode . className ) . toContain ( 'rc-table-scroll-position-left' ) ;
0 commit comments