@@ -231,16 +231,18 @@ describe('config argument', function() {
231
231
232
232
afterEach ( destroyGraphDiv ) ;
233
233
234
- it ( 'should not display the edit link by default' , function ( ) {
234
+ it ( 'should not display the edit link by default' , function ( done ) {
235
235
Plotly . plot ( gd , [ ] , { } )
236
236
. then ( function ( ) {
237
237
var link = document . getElementsByClassName ( 'js-plot-link-container' ) [ 0 ] ;
238
238
239
239
expect ( link ) . toBeUndefined ( ) ;
240
- } ) ;
240
+ } )
241
+ . catch ( failTest )
242
+ . then ( done ) ;
241
243
} ) ;
242
244
243
- it ( 'should display a link when true' , function ( ) {
245
+ it ( 'should display a link when true' , function ( done ) {
244
246
Plotly . plot ( gd , [ ] , { } , { showLink : true } )
245
247
. then ( function ( ) {
246
248
var link = document . getElementsByClassName ( 'js-plot-link-container' ) [ 0 ] ;
@@ -250,7 +252,9 @@ describe('config argument', function() {
250
252
var bBox = link . getBoundingClientRect ( ) ;
251
253
expect ( bBox . width ) . toBeGreaterThan ( 0 ) ;
252
254
expect ( bBox . height ) . toBeGreaterThan ( 0 ) ;
253
- } ) ;
255
+ } )
256
+ . catch ( failTest )
257
+ . then ( done ) ;
254
258
} ) ;
255
259
} ) ;
256
260
@@ -491,7 +495,7 @@ describe('config argument', function() {
491
495
492
496
afterEach ( destroyGraphDiv ) ;
493
497
494
- it ( 'allows axis range entry by default' , function ( ) {
498
+ it ( 'allows axis range entry by default' , function ( done ) {
495
499
Plotly . plot ( gd , mockCopy . data , { } )
496
500
. then ( function ( ) {
497
501
var corner = document . getElementsByClassName ( 'edrag' ) [ 0 ] ;
@@ -504,10 +508,12 @@ describe('config argument', function() {
504
508
var editBox = document . getElementsByClassName ( 'plugin-editable editable' ) [ 0 ] ;
505
509
expect ( editBox ) . toBeDefined ( ) ;
506
510
expect ( editBox . getAttribute ( 'contenteditable' ) ) . toBe ( 'true' ) ;
507
- } ) ;
511
+ } )
512
+ . catch ( failTest )
513
+ . then ( done ) ;
508
514
} ) ;
509
515
510
- it ( 'disallows axis range entry when disabled' , function ( ) {
516
+ it ( 'disallows axis range entry when disabled' , function ( done ) {
511
517
Plotly . plot ( gd , mockCopy . data , { } , { showAxisRangeEntryBoxes : false } )
512
518
. then ( function ( ) {
513
519
var corner = document . getElementsByClassName ( 'edrag' ) [ 0 ] ;
@@ -519,7 +525,9 @@ describe('config argument', function() {
519
525
520
526
var editBox = document . getElementsByClassName ( 'plugin-editable editable' ) [ 0 ] ;
521
527
expect ( editBox ) . toBeUndefined ( ) ;
522
- } ) ;
528
+ } )
529
+ . catch ( failTest )
530
+ . then ( done ) ;
523
531
} ) ;
524
532
} ) ;
525
533
0 commit comments