Skip to content

Commit 362da1f

Browse files
committed
🔒 scattercarpet + scatter coexistence
1 parent 48ee0d8 commit 362da1f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/jasmine/tests/carpet_test.js

+26
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,32 @@ describe('Test carpet interactions:', function() {
511511
.catch(fail)
512512
.then(done);
513513
});
514+
515+
it('scattercarpet should be able to coexist with scatter traces', function(done) {
516+
var mock = Lib.extendDeep({}, require('@mocks/scattercarpet.json'));
517+
518+
function _assert(exp) {
519+
expect(d3.selectAll('.point').size())
520+
.toBe(exp, 'number of scatter pts on graph');
521+
}
522+
523+
Plotly.newPlot(gd, mock).then(function() {
524+
_assert(12);
525+
526+
return Plotly.addTraces(gd, {
527+
y: [1, 2, 1]
528+
});
529+
})
530+
.then(function() {
531+
_assert(15);
532+
return Plotly.deleteTraces(gd, [0]);
533+
})
534+
.then(function() {
535+
_assert(3);
536+
})
537+
.catch(fail)
538+
.then(done);
539+
});
514540
});
515541

516542
describe('scattercarpet array attributes', function() {

0 commit comments

Comments
 (0)