Skip to content

Commit 29f5a06

Browse files
committed
must have tested traceOut after coerce fix
1 parent fadce01 commit 29f5a06

File tree

2 files changed

+9
-33
lines changed

2 files changed

+9
-33
lines changed

src/traces/mesh3d/defaults.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
3939
return;
4040
}
4141

42+
readComponents(['i', 'j', 'k']);
4243
// three indices should be all provided or not
4344
if(
4445
(traceOut.i && (!traceOut.j || !traceOut.k)) ||
@@ -48,7 +49,6 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout
4849
traceOut.visible = false;
4950
return;
5051
}
51-
readComponents(['i', 'j', 'k']);
5252

5353
var handleCalendarDefaults = Registry.getComponentMethod('calendars', 'handleTraceDefaults');
5454
handleCalendarDefaults(traceIn, traceOut, ['x', 'y', 'z'], layout);

test/jasmine/tests/mesh3d_test.js

+8-32
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ describe('Test mesh3d', function() {
386386
.then(done);
387387
});
388388

389-
it('@gl mesh3d should be visible when the index arrays are not arrays - string case', function(done) {
389+
it('@gl mesh3d should be invisible when the index arrays are not arrays - string case', function(done) {
390390
Plotly.plot(gd, [{
391391
x: [0, 1, 0.5, 0.5],
392392
y: [0, 0.5, 1, 0.5],
@@ -397,19 +397,13 @@ describe('Test mesh3d', function() {
397397
type: 'mesh3d'
398398
}])
399399
.then(function() {
400-
assertVisibility(true, 'to be invisible');
401-
})
402-
.then(function() {
403-
assertPositions(4, 'to be OK positions');
404-
})
405-
.then(function() {
406-
assertCells(3, 'to be OK cells');
400+
assertVisibility(false, 'to be visible');
407401
})
408402
.catch(failTest)
409403
.then(done);
410404
});
411405

412-
it('@gl mesh3d should be visible when the index arrays are not arrays - object case', function(done) {
406+
it('@gl mesh3d should be invisible when the index arrays are not arrays - object case', function(done) {
413407
Plotly.plot(gd, [{
414408
x: [0, 1, 0.5, 0.5],
415409
y: [0, 0.5, 1, 0.5],
@@ -420,19 +414,13 @@ describe('Test mesh3d', function() {
420414
type: 'mesh3d'
421415
}])
422416
.then(function() {
423-
assertVisibility(true, 'to be invisible');
424-
})
425-
.then(function() {
426-
assertPositions(4, 'to be OK positions');
427-
})
428-
.then(function() {
429-
assertCells(3, 'to be OK cells');
417+
assertVisibility(false, 'to be visible');
430418
})
431419
.catch(failTest)
432420
.then(done);
433421
});
434422

435-
it('@gl mesh3d should be visible when the index arrays are not arrays - boolean case', function(done) {
423+
it('@gl mesh3d should be invisible when the index arrays are not arrays - boolean case', function(done) {
436424
Plotly.plot(gd, [{
437425
x: [0, 1, 0.5, 0.5],
438426
y: [0, 0.5, 1, 0.5],
@@ -443,19 +431,13 @@ describe('Test mesh3d', function() {
443431
type: 'mesh3d'
444432
}])
445433
.then(function() {
446-
assertVisibility(true, 'to be invisible');
447-
})
448-
.then(function() {
449-
assertPositions(4, 'to be OK positions');
450-
})
451-
.then(function() {
452-
assertCells(3, 'to be OK cells');
434+
assertVisibility(false, 'to be visible');
453435
})
454436
.catch(failTest)
455437
.then(done);
456438
});
457439

458-
it('@gl mesh3d should be visible when the index arrays are not arrays - number case', function(done) {
440+
it('@gl mesh3d should be invisible when the index arrays are not arrays - number case', function(done) {
459441
Plotly.plot(gd, [{
460442
x: [0, 1, 0.5, 0.5],
461443
y: [0, 0.5, 1, 0.5],
@@ -466,13 +448,7 @@ describe('Test mesh3d', function() {
466448
type: 'mesh3d'
467449
}])
468450
.then(function() {
469-
assertVisibility(true, 'to be invisible');
470-
})
471-
.then(function() {
472-
assertPositions(4, 'to be OK positions');
473-
})
474-
.then(function() {
475-
assertCells(3, 'to be OK cells');
451+
assertVisibility(false, 'to be visible');
476452
})
477453
.catch(failTest)
478454
.then(done);

0 commit comments

Comments
 (0)