@@ -139,7 +139,7 @@ describe('extendVegaSpec', () => {
139139
140140 it ( 'should truncate all titles from the left to 50 characters for large plots' , ( ) => {
141141 const spec = withLongTemplatePlotTitle ( )
142- const updatedSpec = extendVegaSpec ( spec , 500 )
142+ const updatedSpec = extendVegaSpec ( spec , PlotSizeNumber . LARGE )
143143
144144 const truncatedTitle = '…-many-many-characters-at-least-seventy-characters'
145145 const truncatedHorizontalTitle =
@@ -191,7 +191,7 @@ describe('extendVegaSpec', () => {
191191
192192 it ( 'should truncate all titles from the left to 30 characters for small plots' , ( ) => {
193193 const spec = withLongTemplatePlotTitle ( )
194- const updatedSpec = extendVegaSpec ( spec , 300 )
194+ const updatedSpec = extendVegaSpec ( spec , PlotSizeNumber . SMALL )
195195
196196 const truncatedTitle = '…s-at-least-seventy-characters'
197197 const truncatedHorizontalTitle = '…at-least-seventy-characters-x'
@@ -221,7 +221,7 @@ describe('extendVegaSpec', () => {
221221 text : repeatedTitle
222222 } )
223223
224- const updatedSpec = extendVegaSpec ( spec , 300 )
224+ const updatedSpec = extendVegaSpec ( spec , PlotSizeNumber . SMALL )
225225
226226 const truncatedTitle = '…ghijklmnopqrstuvwyz1234567890'
227227
@@ -238,7 +238,7 @@ describe('extendVegaSpec', () => {
238238 const repeatedTitle = 'abcdefghijklmnopqrstuvwyz1234567890'
239239 const spec = withLongTemplatePlotTitle ( [ repeatedTitle , repeatedTitle ] )
240240
241- const updatedSpec = extendVegaSpec ( spec , 300 )
241+ const updatedSpec = extendVegaSpec ( spec , PlotSizeNumber . SMALL )
242242
243243 const truncatedTitle = '…ghijklmnopqrstuvwyz1234567890'
244244
@@ -258,7 +258,7 @@ describe('extendVegaSpec', () => {
258258 text : [ repeatedTitle , repeatedTitle ]
259259 } )
260260
261- const updatedSpec = extendVegaSpec ( spec , 300 )
261+ const updatedSpec = extendVegaSpec ( spec , PlotSizeNumber . SMALL )
262262
263263 const truncatedTitle = '…ghijklmnopqrstuvwyz1234567890'
264264
@@ -272,13 +272,17 @@ describe('extendVegaSpec', () => {
272272 } )
273273
274274 it ( 'should update the multi-source template to remove erroneous shape encoding from the vertical line displayed on hover' , ( ) => {
275- const updatedSpec = extendVegaSpec ( multiSourceTemplate , 500 , {
276- color : { domain : [ ] , range : [ ] } ,
277- shape : {
278- field : 'field' ,
279- scale : { domain : [ ] , range : [ ] }
275+ const updatedSpec = extendVegaSpec (
276+ multiSourceTemplate ,
277+ PlotSizeNumber . LARGE ,
278+ {
279+ color : { domain : [ ] , range : [ ] } ,
280+ shape : {
281+ field : 'field' ,
282+ scale : { domain : [ ] , range : [ ] }
283+ }
280284 }
281- } )
285+ )
282286
283287 expect ( updatedSpec . encoding ) . not . toBeUndefined ( )
284288 expect ( updatedSpec . layer [ 1 ] . layer [ 0 ] . encoding . shape ) . toBeNull ( )
0 commit comments