Skip to content

Commit 66b88d6

Browse files
committed
table values may be left unspecified - test case
1 parent 951ce8a commit 66b88d6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/jasmine/tests/table_test.js

+23
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,29 @@ describe('table', function() {
206206
});
207207
});
208208

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+
209232
describe('basic use and basic data restyling', function() {
210233
var mockCopy,
211234
gd;

0 commit comments

Comments
 (0)