@@ -115,7 +115,7 @@ describe("ouiDatagrid", () => {
115115 expect ( getCell ( $firstRow , 2 ) . children ( ) . html ( ) ) . toBe ( additionnalDataValue ) ;
116116 } ) ) ;
117117
118- it ( "should keep undefined when a cell is not loaded" , inject ( ( $q ) => {
118+ it ( "should display a skeleton when a cell is not loaded" , inject ( ( $q ) => {
119119 const deferred = $q . defer ( ) ;
120120 const loadRowSpy = jasmine . createSpy ( "loadRow" ) ;
121121
@@ -138,7 +138,7 @@ describe("ouiDatagrid", () => {
138138 expect ( loadRowSpy . calls . count ( ) ) . toEqual ( 1 ) ;
139139
140140 expect ( getCell ( $firstRow , 0 ) . children ( ) . html ( ) ) . toBe ( fakeData [ 0 ] . firstName ) ;
141- expect ( getCell ( $firstRow , 2 ) . children ( ) . html ( ) ) . toBeUndefined ( ) ;
141+ expect ( getCell ( $firstRow , 2 ) . children ( ) [ 0 ] . tagName . toLowerCase ( ) ) . toBe ( "oui-skeleton" ) ;
142142 } ) ) ;
143143
144144 it ( "should load data later and display it" , inject ( ( $q ) => {
@@ -557,7 +557,7 @@ describe("ouiDatagrid", () => {
557557 expect ( getCell ( $fifthRow , 1 ) . children ( ) . html ( ) ) . toBe ( fakeData [ 4 ] . lastName ) ;
558558 } ) ;
559559
560- it ( "should keep undefined when a cell is not loaded" , inject ( ( $q ) => {
560+ it ( "should display a skeleton when a cell is not loaded" , inject ( ( $q ) => {
561561 const deferred = $q . defer ( ) ;
562562 const loadRowSpy = jasmine . createSpy ( "loadRow" ) ;
563563
@@ -590,7 +590,7 @@ describe("ouiDatagrid", () => {
590590 expect ( loadRowSpy . calls . count ( ) ) . toEqual ( 1 ) ;
591591
592592 expect ( getCell ( $firstRow , 0 ) . children ( ) . html ( ) ) . toBe ( fakeData [ 0 ] . firstName ) ;
593- expect ( getCell ( $firstRow , 2 ) . children ( ) . html ( ) ) . toBeUndefined ( ) ;
593+ expect ( getCell ( $firstRow , 2 ) . children ( ) [ 0 ] . tagName . toLowerCase ( ) ) . toBe ( "oui-skeleton" ) ;
594594 } ) ) ;
595595
596596 it ( "should load data later and display it" , inject ( ( $q ) => {
0 commit comments