@@ -122,11 +122,11 @@ describe('Test gl3d plots', function() {
122122 . then ( _hover )
123123 . then ( delay ( 20 ) )
124124 . then ( function ( ) {
125- assertHoverText ( 'x: 140.72 ' , 'y: −96.97 ' , 'z: −96.97 ' ) ;
126- assertEventData ( 140.72 , - 96.97 , - 96.97 , 0 , 2 , {
127- 'marker.symbol' : 'cross' ,
128- 'marker.size' : 30 ,
129- 'marker.color' : 'orange ' ,
125+ assertHoverText ( 'x: 134.03 ' , 'y: −163.59 ' , 'z: −163.59 ' ) ;
126+ assertEventData ( 134.03 , - 163.59 , - 163.59 , 0 , 3 , {
127+ 'marker.symbol' : undefined ,
128+ 'marker.size' : 40 ,
129+ 'marker.color' : 'black ' ,
130130 'marker.line.color' : undefined
131131 } ) ;
132132 assertHoverLabelStyle ( d3 . selectAll ( 'g.hovertext' ) , {
@@ -143,15 +143,15 @@ describe('Test gl3d plots', function() {
143143 } )
144144 . then ( _hover )
145145 . then ( function ( ) {
146- assertHoverText ( 'x: Jan 1, 2017' , 'y: −96.97 ' , 'z: −96.97 ' ) ;
146+ assertHoverText ( 'x: Feb 1, 2017' , 'y: −163.59 ' , 'z: −163.59 ' ) ;
147147
148148 return Plotly . restyle ( gd , {
149149 x : [ [ new Date ( 2017 , 2 , 1 ) , new Date ( 2017 , 2 , 2 ) , new Date ( 2017 , 2 , 3 ) , new Date ( 2017 , 2 , 4 ) ] ]
150150 } ) ;
151151 } )
152152 . then ( _hover )
153153 . then ( function ( ) {
154- assertHoverText ( 'x: Mar 3 , 2017' , 'y: −96.97 ' , 'z: −96.97 ' ) ;
154+ assertHoverText ( 'x: Mar 4 , 2017' , 'y: −163.59 ' , 'z: −163.59 ' ) ;
155155
156156 return Plotly . update ( gd , {
157157 y : [ [ 'a' , 'b' , 'c' , 'd' ] ] ,
@@ -162,25 +162,25 @@ describe('Test gl3d plots', function() {
162162 } )
163163 . then ( _hover )
164164 . then ( function ( ) {
165- assertHoverText ( 'x: Mar 3 , 2017' , 'y: c ' , 'z: 100k ' ) ;
165+ assertHoverText ( 'x: Mar 4 , 2017' , 'y: d ' , 'z: 10B ' ) ;
166166
167167 return Plotly . relayout ( gd , 'scene.xaxis.calendar' , 'chinese' ) ;
168168 } )
169169 . then ( _hover )
170170 . then ( function ( ) {
171- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' ) ;
171+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' ) ;
172172
173173 return Plotly . restyle ( gd , 'text' , [ [ 'A' , 'B' , 'C' , 'D' ] ] ) ;
174174 } )
175175 . then ( _hover )
176176 . then ( function ( ) {
177- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' , 'C ' ) ;
177+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' , 'D ' ) ;
178178
179179 return Plotly . restyle ( gd , 'hovertext' , [ [ 'Apple' , 'Banana' , 'Clementine' , 'Dragon fruit' ] ] ) ;
180180 } )
181181 . then ( _hover )
182182 . then ( function ( ) {
183- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' , 'Clementine ' ) ;
183+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' , 'Dragon fruit ' ) ;
184184
185185 return Plotly . restyle ( gd , {
186186 'hoverlabel.bgcolor' : [ [ 'red' , 'blue' , 'green' , 'yellow' ] ] ,
@@ -190,11 +190,11 @@ describe('Test gl3d plots', function() {
190190 . then ( _hover )
191191 . then ( function ( ) {
192192 assertHoverLabelStyle ( d3 . selectAll ( 'g.hovertext' ) , {
193- bgcolor : 'rgb(0, 128 , 0)' ,
194- bordercolor : 'rgb(255, 255, 255 )' ,
193+ bgcolor : 'rgb(255, 255 , 0)' ,
194+ bordercolor : 'rgb(68, 68, 68 )' ,
195195 fontSize : 20 ,
196196 fontFamily : 'Arial' ,
197- fontColor : 'rgb(255, 255, 255 )'
197+ fontColor : 'rgb(68, 68, 68 )'
198198 } , 'restyled' ) ;
199199
200200 return Plotly . relayout ( gd , {
@@ -206,7 +206,7 @@ describe('Test gl3d plots', function() {
206206 . then ( _hover )
207207 . then ( function ( ) {
208208 assertHoverLabelStyle ( d3 . selectAll ( 'g.hovertext' ) , {
209- bgcolor : 'rgb(0, 128 , 0)' ,
209+ bgcolor : 'rgb(255, 255 , 0)' ,
210210 bordercolor : 'rgb(255, 255, 0)' ,
211211 fontSize : 20 ,
212212 fontFamily : 'Roboto' ,
@@ -220,18 +220,18 @@ describe('Test gl3d plots', function() {
220220 var label = d3 . selectAll ( 'g.hovertext' ) ;
221221
222222 expect ( label . size ( ) ) . toEqual ( 1 ) ;
223- expect ( label . select ( 'text' ) . text ( ) ) . toEqual ( 'c ' ) ;
223+ expect ( label . select ( 'text' ) . text ( ) ) . toEqual ( 'x: 二 7, 2017y: dz: 10BDragon fruit ' ) ;
224224
225225 return Plotly . restyle ( gd , 'hoverinfo' , [ [ null , null , 'dont+know' , null ] ] ) ;
226226 } )
227227 . then ( _hover )
228228 . then ( function ( ) {
229- assertHoverText ( 'x: 二 6 , 2017' , 'y: c ' , 'z: 100k ' , 'Clementine ' ) ;
229+ assertHoverText ( 'x: 二 7 , 2017' , 'y: d ' , 'z: 10B ' , 'Dragon fruit ' ) ;
230230
231231 return Plotly . restyle ( gd , 'hoverinfo' , 'text' ) ;
232232 } )
233233 . then ( function ( ) {
234- assertHoverText ( null , null , null , 'Clementine ' ) ;
234+ assertHoverText ( null , null , null , 'Dragon fruit ' ) ;
235235
236236 return Plotly . restyle ( gd , 'hovertext' , 'HEY' ) ;
237237 } )
@@ -241,12 +241,12 @@ describe('Test gl3d plots', function() {
241241 return Plotly . restyle ( gd , 'hoverinfo' , 'z' ) ;
242242 } )
243243 . then ( function ( ) {
244- assertHoverText ( null , null , '100k ' ) ;
244+ assertHoverText ( null , null , '10B ' ) ;
245245
246246 return Plotly . restyle ( gd , 'hovertemplate' , 'THIS Y -- %{y}<extra></extra>' ) ;
247247 } )
248248 . then ( function ( ) {
249- assertHoverText ( null , null , null , 'THIS Y -- c ' ) ;
249+ assertHoverText ( null , null , null , 'THIS Y -- d ' ) ;
250250 } )
251251 . catch ( failTest )
252252 . then ( done ) ;
0 commit comments