Skip to content

Commit f4afbd8

Browse files
committed
add test to lock missing dimension in streamtube starts
1 parent bb97de6 commit f4afbd8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/jasmine/tests/streamtube_test.js

+18
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,24 @@ describe('Test streamtube starting positions defaults:', function() {
147147
expect(exp.cellsLength).toBe(obj.cells.length, 'cells length');
148148
}
149149

150+
it('@gl should ignore starts if one (x | y | z) dimension missing', function(done) {
151+
var mock = makeFigure(4, 4, 4);
152+
mock.data[0].starts = {
153+
x: [0, 1, 2, 3],
154+
// missing y
155+
z: [0, 1, 2, 3]
156+
};
157+
158+
Plotly.plot(gd, mock).then(function() {
159+
_assert({
160+
positionsLength: 6144,
161+
cellsLength: 2048
162+
});
163+
})
164+
.catch(failTest)
165+
.then(done);
166+
});
167+
150168
it('@gl should cut xz at min-y and take all x/y/z pts on that plane except those on the edges', function(done) {
151169
Plotly.plot(gd, makeFigure(3, 3, 3)).then(function() {
152170
_assert({

0 commit comments

Comments
 (0)