File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -170,10 +170,8 @@ describe('template interactions', function() {
170170
171171 if ( schooly ) {
172172 var schoolItem = gd . layout . annotations [ layoutCount - 1 ] ;
173- expect ( schoolItem ) . toEqual ( jasmine . objectContaining ( {
174- templateitemname : 'warning2' ,
175- x : 1
176- } ) ) ;
173+ expect ( schoolItem . templateitemname ) . toBe ( 'warning2' ) ;
174+ expect ( schoolItem . x ) . toBeWithin ( 1 , 0.001 ) ;
177175 expect ( schoolItem . y ) . toBeWithin ( schooly , 0.001 ) ;
178176 }
179177
@@ -208,11 +206,11 @@ describe('template interactions', function() {
208206
209207 if ( recty0 ) {
210208 var rectItem = gd . layout . shapes [ layoutCount - 1 ] ;
211- expect ( rectItem ) . toEqual ( jasmine . objectContaining ( {
212- templateitemname : 'outline' ,
213- x0 : - 0.15 , x1 : 1.2 , y1 : 1.1
214- } ) ) ;
209+ expect ( rectItem . templateitemname ) . toBe ( 'outline' ) ;
210+ expect ( rectItem . x0 ) . toBeWithin ( - 0.15 , 0.001 ) ;
215211 expect ( rectItem . y0 ) . toBeWithin ( recty0 , 0.001 ) ;
212+ expect ( rectItem . x1 ) . toBeWithin ( 1.2 , 0.001 ) ;
213+ expect ( rectItem . y1 ) . toBeWithin ( 1.1 , 0.001 ) ;
216214 }
217215
218216 return rectElement ;
You can’t perform that action at this time.
0 commit comments