Skip to content

Commit 8cc496c

Browse files
committed
fixup polar test
1 parent b2eed52 commit 8cc496c

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

test/jasmine/tests/polar_test.js

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,13 +1652,13 @@ describe('Polar plots with css transforms', function() {
16521652
});
16531653
}
16541654

1655-
function _getVisiblePointsData(gd) {
1655+
function _getVisiblePointsData() {
16561656
return Array.from(
1657-
document.querySelectorAll('.point').entries(),
1658-
([key, value]) => value,
1657+
document.querySelectorAll('.point').entries(),
1658+
function(e) { return e[1]; }
16591659
)
1660-
.filter(e => window.getComputedStyle(e).display !== 'none')
1661-
.map(e => e.__data__);
1660+
.filter(function(e) { return window.getComputedStyle(e).display !== 'none'; })
1661+
.map(function(e) { return e.__data__; });
16621662
}
16631663

16641664
var rVals = [100, 50, 50, 100];
@@ -1707,37 +1707,36 @@ describe('Polar plots with css transforms', function() {
17071707
.catch(failTest)
17081708
.then(done);
17091709
});
1710-
1711-
it(`drag-zoom behaves correctly after css transform: ${transform}`, function(done) {
1712-
1710+
1711+
it('drag-zoom behaves correctly after css transform: ' + transform, function(done) {
17131712
Plotly.plot(gd, Lib.extendDeep({}, mock))
17141713
.then(function() {
17151714
transformPlot(gd, transform);
17161715
recalculateInverse(gd);
17171716
})
1718-
.then(function() {
1717+
.then(function() {
17191718
return _drag([30, 30], [50, 50]);
17201719
})
17211720
.then(function() {
1722-
var points = _getVisiblePointsData(gd);
1721+
var points = _getVisiblePointsData();
17231722
expect(points.length).toBe(2);
17241723
expect(points[0].i).toBe(0);
17251724
expect(points[1].i).toBe(3);
17261725
})
17271726
.catch(failTest)
17281727
.then(done);
17291728
});
1730-
1731-
it(`select behaves correctly after css transform: ${transform}`, function(done) {
1732-
1729+
1730+
it('select behaves correctly after css transform: ' + transform, function(done) {
17331731
function _assertSelected(expectation) {
17341732
var data = gd._fullData[0];
17351733
var points = data.selectedpoints;
17361734
expect(typeof(points) !== 'undefined').toBeTrue();
1737-
if (expectation.numPoints)
1735+
if(expectation.numPoints) {
17381736
expect(points.length).toBe(expectation.numPoints);
1737+
}
17391738
}
1740-
1739+
17411740
Plotly.plot(gd, Lib.extendDeep({}, mock))
17421741
.then(function() {
17431742
transformPlot(gd, transform);
@@ -1746,7 +1745,7 @@ describe('Polar plots with css transforms', function() {
17461745
.then(function() {
17471746
return Plotly.relayout(gd, 'dragmode', 'select');
17481747
})
1749-
.then(function() { return _drag([30, 30], [130, 130]) })
1748+
.then(function() { return _drag([30, 30], [130, 130]); })
17501749
.then(function() {
17511750
_assertSelected({numPoints: 3});
17521751
})

0 commit comments

Comments
 (0)