@@ -793,6 +793,39 @@ describe('Test icicle restyle:', function() {
793793 . then ( _assert ( 'back to dflt' , [ '' , '0.7' , '' , '0.7' ] ) )
794794 . then ( done , done . fail ) ;
795795 } ) ;
796+
797+ it ( 'should be able to restyle *marker.fillet*' , function ( done ) {
798+ var mock = {
799+ data : [ {
800+ type : 'icicle' ,
801+ labels : [ 'Root' , 'A' , 'B' , 'b' ] ,
802+ parents : [ '' , 'Root' , 'Root' , 'B' ]
803+ } ]
804+ } ;
805+
806+ function _assert ( msg , exp ) {
807+ return function ( ) {
808+ var layer = d3Select ( gd ) . select ( '.iciclelayer' ) ;
809+ layer . selectAll ( '.surface' ) . each ( function ( ) {
810+ var surfaces = d3Select ( this ) ;
811+ var path = surfaces [ 0 ] [ 0 ] . getAttribute ( 'd' ) ;
812+ expect ( path . indexOf ( 'a' ) !== - 1 ) . toEqual ( exp ) ;
813+ } ) ;
814+ } ;
815+ }
816+
817+ Plotly . newPlot ( gd , mock )
818+ . then ( _assert ( 'no arcs' , false ) )
819+ . then ( function ( ) {
820+ return Plotly . restyle ( gd , 'marker.fillet' , 10 ) ;
821+ } )
822+ . then ( _assert ( 'has arcs' , true ) )
823+ . then ( function ( ) {
824+ return Plotly . restyle ( gd , 'marker.fillet' , 0 ) ;
825+ } )
826+ . then ( _assert ( 'no arcs' , false ) )
827+ . then ( done , done . fail ) ;
828+ } ) ;
796829} ) ;
797830
798831describe ( 'Test icicle texttemplate without `values` should work at root level:' , function ( ) {
0 commit comments