@@ -11,9 +11,6 @@ describe('Table', () => {
1111 firstName : faker . name . firstName ( ) ,
1212 lastName : faker . name . lastName ( ) ,
1313 email : faker . internet . email ( ) ,
14- posts : _ . random ( 100 ) ,
15- status : faker . hacker . verb ( ) ,
16- role : faker . hacker . noun ( ) ,
1714 permissions : {
1815 read : ! ! _ . random ( ) ,
1916 write : ! ! _ . random ( ) ,
@@ -34,7 +31,7 @@ describe('Table', () => {
3431 </ Table >
3532 )
3633 . findClass ( 'sd-table-header' )
37- . props . children . should . equal ( 'First Name' ) ;
34+ . textContent . should . equal ( 'First Name' ) ;
3835 } ) ;
3936
4037 it ( 'renders contents with headerRenderer' , ( ) => {
@@ -44,7 +41,7 @@ describe('Table', () => {
4441 </ Table >
4542 )
4643 . findClass ( 'sd-table-header' )
47- . props . children . should . equal ( 'YO!' ) ;
44+ . textContent . should . equal ( 'YO!' ) ;
4845 } ) ;
4946 } ) ;
5047
@@ -59,7 +56,7 @@ describe('Table', () => {
5956 . forEach ( ( tableCell , i ) => {
6057 const originalItem = tableData [ i ] [ randomDataKey ] ;
6158 const originalValue = Table . getSafeCellContents ( originalItem ) ;
62- tableCell . props . children . should . equal ( originalValue ) ;
59+ tableCell . textContent . should . equal ( originalValue ) ;
6360 } ) ;
6461 } ) ;
6562
@@ -71,7 +68,7 @@ describe('Table', () => {
7168 )
7269 . scryClass ( 'sd-table-cell' )
7370 . forEach ( ( tableCell ) => {
74- tableCell . props . children . should . equal ( 'REDACTED' ) ;
71+ tableCell . textContent . should . equal ( 'REDACTED' ) ;
7572 } ) ;
7673 } ) ;
7774
@@ -84,7 +81,7 @@ describe('Table', () => {
8481 )
8582 . scryClass ( 'sd-table-cell' )
8683 . forEach ( ( tableCell ) => {
87- tableCell . props . children . should . be . a ( 'string' ) ;
84+ tableCell . textContent . should . be . a ( 'string' ) ;
8885 } ) ;
8986 } ) ;
9087 } ) ;
@@ -101,9 +98,9 @@ describe('Table', () => {
10198 // remove this table's column from the current data object
10299 // then expect this cell's value to not be found in the object
103100 const itemWithoutRandomKey = _ . omit ( tableData [ i ] , randomDataKey ) ;
104- const cellText = tableCell . props . children ;
101+ const cellText = tableCell . textContent ;
105102
106- _ . each ( itemWithoutRandomKey , ( val , key ) => {
103+ _ . each ( itemWithoutRandomKey , val => {
107104 Table . getSafeCellContents ( val ) . should . not . equal ( cellText ) ;
108105 } ) ;
109106 } ) ;
0 commit comments