@@ -8,6 +8,7 @@ var createGraphDiv = require('../assets/create_graph_div');
88var destroyGraphDiv = require ( '../assets/destroy_graph_div' ) ;
99var assertDims = require ( '../assets/assert_dims' ) ;
1010var assertStyle = require ( '../assets/assert_style' ) ;
11+ var customMatchers = require ( '../assets/custom_matchers' ) ;
1112
1213describe ( 'filter transforms defaults:' , function ( ) {
1314
@@ -844,6 +845,10 @@ describe('filter transforms calc:', function() {
844845describe ( 'filter transforms interactions' , function ( ) {
845846 'use strict' ;
846847
848+ beforeAll ( function ( ) {
849+ jasmine . addMatchers ( customMatchers ) ;
850+ } ) ;
851+
847852 var mockData0 = [ {
848853 x : [ - 2 , - 1 , - 2 , 0 , 1 , 2 , 3 ] ,
849854 y : [ 1 , 2 , 3 , 1 , 2 , 3 , 1 ] ,
@@ -898,6 +903,9 @@ describe('filter transforms interactions', function() {
898903 assertUid ( gd ) ;
899904 assertStyle ( dims , [ 'rgb(255, 0, 0)' ] , [ 1 ] ) ;
900905
906+ expect ( gd . _fullLayout . xaxis . range ) . toBeCloseToArray ( [ 0.87 , 3.13 ] ) ;
907+ expect ( gd . _fullLayout . yaxis . range ) . toBeCloseToArray ( [ 0.85 , 3.15 ] ) ;
908+
901909 return Plotly . restyle ( gd , 'marker.color' , 'blue' ) ;
902910 } ) . then ( function ( ) {
903911 expect ( gd . _fullData [ 0 ] . marker . color ) . toEqual ( 'blue' ) ;
@@ -915,6 +923,9 @@ describe('filter transforms interactions', function() {
915923 assertUid ( gd ) ;
916924 assertStyle ( [ 1 ] , [ 'rgb(255, 0, 0)' ] , [ 1 ] ) ;
917925
926+ expect ( gd . _fullLayout . xaxis . range ) . toBeCloseToArray ( [ 2 , 4 ] ) ;
927+ expect ( gd . _fullLayout . yaxis . range ) . toBeCloseToArray ( [ 0 , 2 ] ) ;
928+
918929 done ( ) ;
919930 } ) ;
920931 } ) ;
0 commit comments