Skip to content

Commit deff70e

Browse files
author
wfr
committed
Fix jasmine tests w.r.t. 'reversed', update reversed baselines (title with 'reversed')
1 parent 33e1f38 commit deff70e

9 files changed

Lines changed: 10 additions & 10 deletions
1.1 KB
Loading
1.1 KB
Loading
905 Bytes
Loading
889 Bytes
Loading
770 Bytes
Loading
704 Bytes
Loading
916 Bytes
Loading
801 Bytes
Loading

test/jasmine/tests/sankey_test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ describe('sankey tests', function () {
150150
});
151151

152152
it('coerces the direction values', function() {
153-
['forward', 'reverse'].forEach(function(dir) {
153+
['forward', 'reversed'].forEach(function(dir) {
154154
expect(_supply({direction: dir}).direction)
155155
.toBe(dir, dir + ' is a valid direction');
156156
});
@@ -417,7 +417,7 @@ describe('sankey tests', function () {
417417
})
418418
.then(function() {
419419
expect(groupTransform()).toContain('matrix(1 0 0 1 0 0)');
420-
return plotWith('h', 'reverse');
420+
return plotWith('h', 'reversed');
421421
})
422422
.then(function() {
423423
expect(groupTransform()).toContain('matrix(-1 0 0 1 0 0)');
@@ -429,7 +429,7 @@ describe('sankey tests', function () {
429429
})
430430
.then(function() {
431431
expect(groupTransform()).toContain('matrix(0 1 1 0 0 0)');
432-
return plotWith('v', 'reverse');
432+
return plotWith('v', 'reversed');
433433
})
434434
.then(function() {
435435
expect(groupTransform()).toContain('matrix(0 -1 1 0 0 0)');
@@ -980,7 +980,7 @@ describe('sankey tests', function () {
980980
.then(done, done.fail);
981981
});
982982

983-
it('@noCI should position hover labels correctly - horizontal, reverse', function (done) {
983+
it('@noCI should position hover labels correctly - horizontal, reversed', function (done) {
984984
var gd = createGraphDiv();
985985
var forwardOffsetX;
986986

@@ -1002,7 +1002,7 @@ describe('sankey tests', function () {
10021002
var pos = d3Select('.hovertext').node().getBoundingClientRect();
10031003
forwardOffsetX = pos.x - (linkRect.left + linkRect.width / 2);
10041004

1005-
return plotWith('reverse');
1005+
return plotWith('reversed');
10061006
})
10071007
.then(function () {
10081008
hoverLink('Thermal generation', 'Losses');
@@ -1012,7 +1012,7 @@ describe('sankey tests', function () {
10121012
['rgb(0, 0, 96)', 'rgb(255, 255, 255)', 13, 'Arial', 'rgb(255, 255, 255)']
10131013
);
10141014

1015-
// The link itself is drawn mirrored under direction:'reverse'
1015+
// The link itself is drawn mirrored under direction:'reversed'
10161016
// (see 'applies the correct group transform per orientation and
10171017
// direction' above). hoverCenterPosition places the label at a
10181018
// fixed offset from its anchor regardless of direction, so that
@@ -1033,7 +1033,7 @@ describe('sankey tests', function () {
10331033
.then(done, done.fail);
10341034
});
10351035

1036-
it('@noCI should position hover labels correctly - vertical, reverse', function (done) {
1036+
it('@noCI should position hover labels correctly - vertical, reversed', function (done) {
10371037
var gd = createGraphDiv();
10381038
var forwardOffsetY;
10391039

@@ -1051,7 +1051,7 @@ describe('sankey tests', function () {
10511051
var pos = d3Select('.hovertext').node().getBoundingClientRect();
10521052
forwardOffsetY = pos.y - (linkRect.top + linkRect.height / 2);
10531053

1054-
return plotWith('reverse');
1054+
return plotWith('reversed');
10551055
})
10561056
.then(function () {
10571057
hoverLink('Thermal generation', 'Losses');
@@ -1810,8 +1810,8 @@ describe('sankey tests', function () {
18101810
};
18111811

18121812
[
1813-
{ orientation: 'h', direction: 'reverse' },
1814-
{ orientation: 'v', direction: 'reverse' }
1813+
{ orientation: 'h', direction: 'reversed' },
1814+
{ orientation: 'v', direction: 'reversed' }
18151815
].forEach(function (combo) {
18161816
it(
18171817
'should change the position of a node on drag - orientation ' +

0 commit comments

Comments
 (0)