File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,29 @@ describe('table', function() {
206
206
} ) ;
207
207
} ) ;
208
208
209
+ describe ( 'Rendering with partial attribute support' , function ( ) {
210
+ var mockCopy ,
211
+ gd ;
212
+
213
+ beforeEach ( function ( done ) {
214
+ mockCopy = Lib . extendDeep ( { } , mock ) ;
215
+ mockCopy . data [ 0 ] . domain = {
216
+ x : [ 0.1 , 0.9 ] ,
217
+ y : [ 0.05 , 0.85 ]
218
+ } ;
219
+ delete mockCopy . data [ 0 ] . cells ;
220
+ gd = createGraphDiv ( ) ;
221
+ Plotly . plot ( gd , mockCopy . data , mockCopy . layout ) . then ( done ) ;
222
+ } ) ;
223
+
224
+ it ( '`Plotly.plot` should render all the columns even if no cell contents were supplied yet' , function ( ) {
225
+ expect ( gd . data . length ) . toEqual ( 1 ) ;
226
+ expect ( gd . data [ 0 ] . header . values . length ) . toEqual ( 7 ) ;
227
+ expect ( document . querySelectorAll ( '.' + cn . yColumn ) . length ) . toEqual ( 7 ) ;
228
+ expect ( document . querySelectorAll ( '.' + cn . columnCell ) . length ) . toEqual ( 7 * 2 ) ; // both column rows to render
229
+ } ) ;
230
+ } ) ;
231
+
209
232
describe ( 'basic use and basic data restyling' , function ( ) {
210
233
var mockCopy ,
211
234
gd ;
You can’t perform that action at this time.
0 commit comments