Skip to content

Commit 2cf7def

Browse files
committed
make new transition tests more robust
1 parent ef6a952 commit 2cf7def

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

test/jasmine/tests/sunburst_test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -2123,11 +2123,11 @@ describe('sunburst uniformtext', function() {
21232123
'Oscar',
21242124
'Papa',
21252125
'Quebec',
2126-
'Romeo',
2126+
'Romeo and Juliet',
21272127
'Sierra',
21282128
'Tango',
21292129
'Uniform',
2130-
'Victor',
2130+
'ViKtor Korchnoi - Anatoly Karpov',
21312131
'Whiskey',
21322132
'X ray',
21332133
'Yankee',
@@ -2136,29 +2136,29 @@ describe('sunburst uniformtext', function() {
21362136
textinfo: 'label'
21372137
}],
21382138
layout: {
2139-
width: 320,
2140-
height: 320,
2139+
width: 500,
2140+
height: 500,
21412141
uniformtext: {
21422142
mode: 'hide',
2143-
minsize: 10
2143+
minsize: 12
21442144
}
21452145
}
21462146
})
21472147
.then(assertTextSizes('before click', {
21482148
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
2149-
scales: [0.86, 0.86, 0, 0, 0, 0, 0, 0.86, 0, 0.86, 0.86, 0.86],
2149+
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
21502150
}))
21512151
.then(click(gd, 2)) // click on Uniform
21522152
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
21532153
.then(assertTextSizes('after click child', {
21542154
fontsizes: [12, 12, 12, 12, 12, 12],
2155-
scales: [1, 1, 1, 1, 1, 1],
2155+
scales: [1, 0, 1, 1, 1, 1],
21562156
}))
21572157
.then(click(gd, 1)) // click on Oscar
21582158
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
21592159
.then(assertTextSizes('after click parent', {
21602160
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
2161-
scales: [0.86, 0.86, 0, 0, 0, 0, 0, 0.86, 0, 0.86, 0.86, 0.86],
2161+
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
21622162
}))
21632163
.catch(failTest)
21642164
.then(done);

test/jasmine/tests/treemap_test.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -1812,6 +1812,8 @@ describe('treemap uniformtext', function() {
18121812
Plotly.plot(gd, {
18131813
data: [{
18141814
type: 'treemap',
1815+
tiling: { packing: 'dice'},
1816+
pathbar: { visible: false },
18151817
parents: [
18161818
'',
18171819
'Oscar',
@@ -1831,11 +1833,11 @@ describe('treemap uniformtext', function() {
18311833
'Oscar',
18321834
'Papa',
18331835
'Quebec',
1834-
'Romeo',
1836+
'Romeo and Juliet',
18351837
'Sierra',
18361838
'Tango',
18371839
'Uniform',
1838-
'Victor',
1840+
'ViKtor Korchnoi - Anatoly Karpov',
18391841
'Whiskey',
18401842
'X ray',
18411843
'Yankee',
@@ -1844,29 +1846,29 @@ describe('treemap uniformtext', function() {
18441846
textinfo: 'label'
18451847
}],
18461848
layout: {
1847-
width: 350,
1849+
width: 850,
18481850
height: 350,
18491851
uniformtext: {
18501852
mode: 'hide',
1851-
minsize: 10
1853+
minsize: 12
18521854
}
18531855
}
18541856
})
18551857
.then(assertTextSizes('before click', {
18561858
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
1857-
scales: [0.84, 0.84, 0.84, 0, 0.84, 0.84, 0, 0.84, 0, 0.84, 0.84, 0],
1859+
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
18581860
}))
18591861
.then(click(gd, 2)) // click on Uniform
18601862
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
18611863
.then(assertTextSizes('after click child', {
1862-
fontsizes: [12, 12, 12, 12, 12, 12, 12],
1863-
scales: [0.86, 0.86, 0.86, 0.86, 0.86, 0.86, 0.86],
1864+
fontsizes: [12, 12, 12, 12, 12, 12],
1865+
scales: [1, 0, 1, 1, 1, 1],
18641866
}))
18651867
.then(click(gd, 1)) // click on Oscar
18661868
.then(delay(constants.CLICK_TRANSITION_TIME + 1))
18671869
.then(assertTextSizes('after click parent', {
18681870
fontsizes: [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12],
1869-
scales: [0.84, 0.84, 0.84, 0, 0.84, 0.84, 0, 0.84, 0, 0.84, 0.84, 0],
1871+
scales: [1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1],
18701872
}))
18711873
.catch(failTest)
18721874
.then(done);

0 commit comments

Comments
 (0)