Skip to content

Commit 460ece0

Browse files
committed
return Plotly.relayout promise in modebar_test.js
1 parent a512163 commit 460ece0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/jasmine/tests/modebar_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ describe('ModeBar', function() {
13131313
button = selectButton(gd._fullLayout._modeBar, targetBtn);
13141314
checkButtonColor(button, colors[0]);
13151315
})
1316-
.then(function() {Plotly.relayout(gd, 'modebar.color', colors[1]);})
1316+
.then(function() { return Plotly.relayout(gd, 'modebar.color', colors[1]); })
13171317
.then(function() {
13181318
checkButtonColor(button, colors[1]);
13191319
})
@@ -1353,7 +1353,7 @@ describe('ModeBar', function() {
13531353
expect(style.backgroundColor).toBe('rgba(0, 0, 0, 0)');
13541354
expect(getStyleRule().rules[3].style.backgroundColor).toBe(colors[0]);
13551355
})
1356-
.then(function() {Plotly.relayout(gd, 'modebar.bgcolor', colors[1]);})
1356+
.then(function() { return Plotly.relayout(gd, 'modebar.bgcolor', colors[1]); })
13571357
.then(function() {
13581358
style = window.getComputedStyle(gd._fullLayout._modeBar.element);
13591359
expect(style.backgroundColor).toBe('rgba(0, 0, 0, 0)');
@@ -1380,7 +1380,7 @@ describe('ModeBar', function() {
13801380
expect(style.backgroundColor).toBe(colors[0]);
13811381
expect(getStyleRule().rules[3].style.backgroundColor).toBe(colors[0]);
13821382
})
1383-
.then(function() {Plotly.relayout(gd, 'modebar.bgcolor', colors[1]);})
1383+
.then(function() { return Plotly.relayout(gd, 'modebar.bgcolor', colors[1]); })
13841384
.then(function() {
13851385
style = window.getComputedStyle(gd._fullLayout._modeBar.element);
13861386
expect(style.backgroundColor).toBe(colors[1]);
@@ -1399,7 +1399,7 @@ describe('ModeBar', function() {
13991399
size = modeBarEl.getBoundingClientRect();
14001400
expect(size.width < size.height).toBeTruthy();
14011401
})
1402-
.then(function() {Plotly.relayout(gd, 'modebar.orientation', 'h');})
1402+
.then(function() { return Plotly.relayout(gd, 'modebar.orientation', 'h'); })
14031403
.catch(failTest)
14041404
.then(function() {
14051405
size = modeBarEl.getBoundingClientRect();

0 commit comments

Comments
 (0)