File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
shelly/plotlyjs/static/plotlyjs/tests Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -154,4 +154,42 @@ describe('plot schema', function() {
154
154
}
155
155
) ;
156
156
} ) ;
157
+
158
+ it ( 'axis and bin attributes should have `human-readable name` field' , function ( ) {
159
+ var HR_NAME = '_hrName' ;
160
+
161
+ assertPlotSchema (
162
+ function ( attr , attrName ) {
163
+ if ( isValObject ( attr ) || ! isPlainObject ( attr ) ) return ;
164
+
165
+ if ( attrName === 'xbins' ) {
166
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'x_bins' ) ;
167
+ }
168
+ else if ( attrName === 'ybins' ) {
169
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'y_bins' ) ;
170
+ }
171
+ else if ( attrName === 'xaxis' ) {
172
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'x_axis' ) ;
173
+ }
174
+ else if ( attrName === 'yaxis' ) {
175
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'y_axis' ) ;
176
+ }
177
+ else if ( attrName === 'zaxis' ) {
178
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'z_axis' ) ;
179
+ }
180
+ else if ( attrName === 'lonaxis' ) {
181
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'lon_axis' ) ;
182
+ }
183
+ else if ( attrName === 'lataxis' ) {
184
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'lat_axis' ) ;
185
+ }
186
+ else if ( attrName === 'radialaxis' ) {
187
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'radial_axis' ) ;
188
+ }
189
+ else if ( attrName === 'angularaxis' ) {
190
+ expect ( attr [ HR_NAME ] ) . toEqual ( 'angular_axis' ) ;
191
+ }
192
+ }
193
+ )
194
+ } ) ;
157
195
} ) ;
You can’t perform that action at this time.
0 commit comments