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() {
43824382 return d3Select ( gd ) . select ( sel ) . node ( ) . getBoundingClientRect ( )
43834383 }
43844384
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 ) ;
43894389 }
43904390 // TODO: This is failing now.
43914391 // Is it maybe because there's overlap in these elements because of some padding?
43924392 // I'm also not sure that I've accessed the correct properties
43934393 var fig = require ( '@mocks/z-automargin-zoom.json' ) ;
4394+
43944395 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+
43954399 . then ( function ( ) {
4396- assert_layout ( ) ;
4400+ assertLayout ( ) ;
43974401 } )
43984402 . then ( function ( ) {
43994403 return Plotly . relayout ( gd , { 'xaxis.range' : [ 6 , 14 ] } ) ;
44004404 } )
44014405 . then ( function ( ) {
4402- assert_layout ( ) ;
4406+ assertLayout ( ) ;
44034407 } )
44044408 . then ( done , done . fail ) ;
44054409 } ) ;
You can’t perform that action at this time.
0 commit comments