diff --git a/src/ui/public/vis/__tests__/map/service_settings.js b/src/ui/public/vis/__tests__/map/service_settings.js index a32b75f268902..70c5602f049db 100644 --- a/src/ui/public/vis/__tests__/map/service_settings.js +++ b/src/ui/public/vis/__tests__/map/service_settings.js @@ -321,5 +321,13 @@ describe('service_settings (FKA tilemaptest)', function () { expect(fileLayers).to.eql(expected); }); + it ('should get hotlink', async () => { + mapConfig.emsLandingPageUrl = 'https://foo/bar'; + const fileLayers = await serviceSettings.getFileLayers(); + const hotlink = serviceSettings.getEMSHotLink(fileLayers[0]); + expect(hotlink).to.eql('https://foo/bar#file/US States'); + + }); + }); }); diff --git a/src/ui/public/vis/map/service_settings.js b/src/ui/public/vis/map/service_settings.js index 3b0c2d9302ae2..532e5e210c1bd 100644 --- a/src/ui/public/vis/map/service_settings.js +++ b/src/ui/public/vis/map/service_settings.js @@ -200,7 +200,7 @@ uiModules.get('kibana') } } - async getEMSHotLink(fileLayer) { + getEMSHotLink(fileLayer) { const id = `file/${fileLayer.name}`; return `${mapConfig.emsLandingPageUrl}#${id}`; }