File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -4382,24 +4382,28 @@ describe('Test axes', function() {
4382
4382
return d3Select ( gd ) . select ( sel ) . node ( ) . getBoundingClientRect ( )
4383
4383
}
4384
4384
4385
- function assert_layout ( ) {
4386
- var title_top = getPos ( gd , '.xtitle' ) . top ;
4387
- var tick_bottom = getPos ( gd , '.xtick' ) . bottom ;
4388
- expect ( title_top ) . toBeLessThan ( tick_bottom ) ;
4385
+ function assertLayout ( ) {
4386
+ var titleTop = getPos ( gd , '.xtitle' ) . top ;
4387
+ var tickBottom = getPos ( gd , '.xtick' ) . bottom ;
4388
+ expect ( tickBottom ) . toBeLessThan ( titleTop ) ;
4389
4389
}
4390
4390
// TODO: This is failing now.
4391
4391
// Is it maybe because there's overlap in these elements because of some padding?
4392
4392
// I'm also not sure that I've accessed the correct properties
4393
4393
var fig = require ( '@mocks/z-automargin-zoom.json' ) ;
4394
+
4394
4395
Plotly . newPlot ( gd , fig )
4396
+ console . log ( d3Select ( gd ) . select ( '.xtitle' ) . node ( ) . getBoundingClientRect ( ) . top )
4397
+ console . log ( d3Select ( gd ) . select ( '.xtitle' ) . node ( ) . getBoundingClientRect ( ) . bottom )
4398
+
4395
4399
. then ( function ( ) {
4396
- assert_layout ( ) ;
4400
+ assertLayout ( ) ;
4397
4401
} )
4398
4402
. then ( function ( ) {
4399
4403
return Plotly . relayout ( gd , { 'xaxis.range' : [ 6 , 14 ] } ) ;
4400
4404
} )
4401
4405
. then ( function ( ) {
4402
- assert_layout ( ) ;
4406
+ assertLayout ( ) ;
4403
4407
} )
4404
4408
. then ( done , done . fail ) ;
4405
4409
} ) ;
You can’t perform that action at this time.
0 commit comments