Skip to content

Commit 33e1783

Browse files
committed
add jasmine tests
1 parent 2326b5b commit 33e1783

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

test/jasmine/tests/bar_test.js

+17
Original file line numberDiff line numberDiff line change
@@ -2709,6 +2709,23 @@ describe('Text templates on bar traces:', function() {
27092709
['%{x}', ['Jan 1, 2019', 'Feb 1, 2019']]
27102710
]);
27112711

2712+
checkTextTemplate({
2713+
data: [{
2714+
type: 'bar',
2715+
textposition: 'outside',
2716+
x: [1, 2, 3],
2717+
y: [3, 2, 1],
2718+
hovertemplate: '%{x}-%{y}',
2719+
texttemplate: '%{x}-%{y}'
2720+
}],
2721+
layout: {
2722+
xaxis: {type: 'log'},
2723+
yaxis: {type: 'log'},
2724+
}
2725+
}, 'text.bartext', [
2726+
['%{x}-%{y}', ['1-3', '2-2', '3-1']]
2727+
]);
2728+
27122729
checkTextTemplate({
27132730
data: [{
27142731
type: 'bar',

test/jasmine/tests/scatter_test.js

+16
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,22 @@ describe('Text templates on scatter traces:', function() {
12411241
[['%{y}', '%{x}-%{y}'], ['1', '1-5', '', '']]
12421242
]);
12431243

1244+
checkTextTemplate({
1245+
data: [{
1246+
type: 'scatter',
1247+
mode: 'text',
1248+
x: [1, 2, 3],
1249+
y: [3, 2, 1],
1250+
texttemplate: '%{x}-%{y}'
1251+
}],
1252+
layout: {
1253+
xaxis: {type: 'log'},
1254+
yaxis: {type: 'log'},
1255+
}
1256+
}, '.textpoint', [
1257+
['%{x}-%{y}', ['1-3', '2-2', '3-1']]
1258+
]);
1259+
12441260
checkTextTemplate({
12451261
data: [{
12461262
type: 'scatter',

0 commit comments

Comments
 (0)