@@ -202,7 +202,6 @@ describe("Test URL fragment utilities", () => {
202202 } ) ;
203203
204204 test ( "Test parseUrlFragments parses multiple fragments and decodes values" , ( ) => {
205- // use ids that match what we will assert on
206205 window . location . hash =
207206 "#id=geoMap&nodeId=abc%3A123&zoom=5;id=indoorMap&nodeId=indoor-node&zoom=5" ;
208207 const fragments = utils . parseUrlFragments ( ) ;
@@ -216,7 +215,7 @@ describe("Test URL fragment utilities", () => {
216215 test ( "Test setUrlFragments adds a new fragment with nodeId and zoom" , ( ) => {
217216 const self = {
218217 config : {
219- urlFragments : { show : true , id : "geoMap" } ,
218+ bookmarkableActions : { enabled : true , id : "geoMap" } ,
220219 } ,
221220 leaflet : { getZoom : ( ) => 7 } ,
222221 } ;
@@ -238,7 +237,7 @@ describe("Test URL fragment utilities", () => {
238237 window . location . hash = "id=graph&nodeId=node-1" ;
239238
240239 const self = {
241- config : { urlFragments : { show : true , id : "geo" } } ,
240+ config : { bookmarkableActions : { enabled : true , id : "geo" } } ,
242241 leaflet : { getZoom : ( ) => 9 } ,
243242 } ;
244243 const params = {
@@ -258,8 +257,8 @@ describe("Test URL fragment utilities", () => {
258257
259258 test ( "removeUrlFragment deletes the fragment for the given id" , ( ) => {
260259 window . location . hash = "id=keep&nodeId=a;id=removeMe&nodeId=b" ;
261- const self = { config : { urlFragments : { show : true , id : "removeMe" } } } ;
262- utils . removeUrlFragment ( self ) ;
260+ const self = { config : { bookmarkableActions : { enabled : true , id : "removeMe" } } } ;
261+ utils . removeUrlFragment ( self , "removeMe" ) ;
263262 const fragments = utils . parseUrlFragments ( ) ;
264263 expect ( fragments . keep ) . toBeDefined ( ) ;
265264 expect ( fragments . removeMe ) . toBeUndefined ( ) ;
@@ -268,10 +267,9 @@ describe("Test URL fragment utilities", () => {
268267
269268 test ( "Test setSelectedNodeFromUrlFragments sets selectedNode and numeric zoom" , ( ) => {
270269 window . location . hash = "#id=geo&nodeId=abc&zoom=4" ;
271- const self = { config : { urlFragments : { show : true , id : "geo" } } } ;
270+ const self = { config : { bookmarkableActions : { enabled : true , id : "geo" } } } ;
272271 const fragments = utils . parseUrlFragments ( ) ;
273272
274- // node with matching id
275273 const node = { id : "abc" , properties : { } } ;
276274 utils . setSelectedNodeFromUrlFragments ( self , fragments , node ) ;
277275
@@ -291,7 +289,7 @@ describe("Test URL fragment utilities", () => {
291289
292290 const self = {
293291 config : {
294- urlFragments : { show : true , id : "geo" } ,
292+ bookmarkableActions : { enabled : true , id : "geo" } ,
295293 graphConfig : { series : { type : null } } ,
296294 mapOptions : { nodeConfig : { type : "scatter" } } ,
297295 onClickElement : mockOnClick ,
0 commit comments