Skip to content

Commit ea54842

Browse files
committed
clean up fx helpers from funnel info - cleanup custom_assertions from isEmpty hack
1 parent 1701325 commit ea54842

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

src/components/fx/helpers.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ exports.makeEventData = function makeEventData(pt, trace, cd) {
149149
if(pt.xa) out.xaxis = pt.xa;
150150
if(pt.ya) out.yaxis = pt.ya;
151151
if(pt.zLabelVal !== undefined) out.z = pt.zLabelVal;
152-
if(pt.percentInitial !== undefined) out.z = pt.percentInitial;
153-
if(pt.percentPrevious !== undefined) out.z = pt.percentPrevious;
154-
if(pt.percentTotal !== undefined) out.z = pt.percentTotal;
155152
}
156153

157154
exports.appendArrayPointValue(out, trace, pointNumber);

test/jasmine/assets/custom_assertions.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ function count(selector) {
9898
* - vOrder {array of number}
9999
* - hOrder {array of number}
100100
* - isRotated {boolean}
101-
* - isEmpty {boolean}
102101
* @param {string} msg
103102
*/
104103
exports.assertHoverLabelContent = function(expectation, msg) {
@@ -193,15 +192,11 @@ exports.assertHoverLabelContent = function(expectation, msg) {
193192
}
194193
});
195194
} else {
196-
if(expectation.isEmpty) {
197-
return true;
198-
} else {
199-
if(expectation.nums) {
200-
fail(ptMsg + ': expecting *nums* labels, did not find any.');
201-
}
202-
if(expectation.name) {
203-
fail(ptMsg + ': expecting *nums* labels, did not find any.');
204-
}
195+
if(expectation.nums) {
196+
fail(ptMsg + ': expecting *nums* labels, did not find any.');
197+
}
198+
if(expectation.name) {
199+
fail(ptMsg + ': expecting *nums* labels, did not find any.');
205200
}
206201
}
207202

test/jasmine/tests/funnel_test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,9 +1348,7 @@ describe('funnel hover', function() {
13481348
Plotly.plot(gd, mock)
13491349
.then(_hover)
13501350
.then(function() {
1351-
assertHoverLabelContent({
1352-
isEmpty: true
1353-
});
1351+
expect(d3.selectAll('g.hovertext').size()).toBe(0);
13541352
})
13551353
.catch(failTest)
13561354
.then(done);

0 commit comments

Comments
 (0)