Skip to content

Commit 8bce81b

Browse files
committed
add plot api react test for subtitle
1 parent 2452a48 commit 8bce81b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/jasmine/tests/plot_api_react_test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ describe('@noCIdep Plotly.react', function() {
417417
.then(function() {
418418
expect(d3SelectAll('.drag').size()).toBe(11);
419419
expect(d3SelectAll('.gtitle').text()).toBe('Click to enter Plot title');
420+
expect(d3SelectAll('.gtitle-subtitle').text()).toBe('Click to enter Plot subtitle');
420421
countCalls({plot: 1});
421422

422423
return Plotly.react(gd, data, layout, {staticPlot: true});
@@ -1988,7 +1989,7 @@ describe('Plotly.react and uirevision attributes', function() {
19881989
function editEditable() {
19891990
return Registry.call('_guiUpdate', gd,
19901991
{'colorbar.x': 0.8, 'colorbar.y': 0.6},
1991-
{'title.text': 'yep', 'legend.x': 1.1, 'legend.y': 0.9},
1992+
{'title.text': 'yep', 'title.subtitle.text': 'hey', 'legend.x': 1.1, 'legend.y': 0.9},
19921993
[2]
19931994
);
19941995
}
@@ -1999,6 +2000,7 @@ describe('Plotly.react and uirevision attributes', function() {
19992000
'colorbar.y': original ? [undefined, 0.5] : 0.6
20002001
}], {
20012002
'title.text': original ? [undefined, 'Click to enter Plot title'] : 'yep',
2003+
'title.subtitle.text': original ? [undefined, 'Click to enter Plot subtitle'] : 'hey',
20022004
'legend.x': original ? [undefined, 1.02] : 1.1,
20032005
'legend.y': original ? [undefined, 1] : 0.9
20042006
});

0 commit comments

Comments
 (0)