diff --git a/public/app/plugins/panel/geomap/migrations.test.ts b/public/app/plugins/panel/geomap/migrations.test.ts index b37cbcf7ec5..6cf672211dd 100644 --- a/public/app/plugins/panel/geomap/migrations.test.ts +++ b/public/app/plugins/panel/geomap/migrations.test.ts @@ -76,7 +76,7 @@ describe('Worldmap Migrations', () => { "min": 2, }, "symbol": { - "fixed": "build/img/icons/marker/circle.svg", + "fixed": "img/icons/marker/circle.svg", "mode": "fixed", }, "symbolAlign": { diff --git a/public/app/plugins/panel/geomap/style/markers.test.ts b/public/app/plugins/panel/geomap/style/markers.test.ts index c7ce4cb845b..7b2e75219a4 100644 --- a/public/app/plugins/panel/geomap/style/markers.test.ts +++ b/public/app/plugins/panel/geomap/style/markers.test.ts @@ -8,7 +8,10 @@ import { opacityExpression, rotationExpression, offsetExpression, + getMarkerMaker, + circleMarker, } from './markers'; +import { defaultStyleConfig } from './types'; // Mock dependencies jest.mock('app/features/dimensions/resource', () => ({ @@ -101,3 +104,28 @@ describe('getWebGLStyle', () => { consoleErrorSpy.mockRestore(); }); }); + +describe('Icon Path Consistency', () => { + const circleIconPath = 'img/icons/marker/circle.svg'; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should use consistent paths between default and selected circle icons', () => { + expect(defaultStyleConfig.symbol.fixed).toBe(circleIconPath); + }); + + it('should handle default and explicitly selected circle icons the same way for WebGL style', async () => { + const defaultStyle = await getWebGLStyle(); // No symbol + const explicitCircleStyle = await getWebGLStyle(circleIconPath); + + expect(explicitCircleStyle).toEqual(defaultStyle); + }); + + it('should create valid marker maker for default icon', async () => { + const defaultMaker = await getMarkerMaker(); // No symbol + + expect(defaultMaker).toBe(circleMarker); + }); +}); diff --git a/public/app/plugins/panel/geomap/style/types.ts b/public/app/plugins/panel/geomap/style/types.ts index de8cf8008e0..72703a90476 100644 --- a/public/app/plugins/panel/geomap/style/types.ts +++ b/public/app/plugins/panel/geomap/style/types.ts @@ -74,7 +74,7 @@ export const defaultStyleConfig = Object.freeze({ opacity: 0.4, symbol: { mode: ResourceDimensionMode.Fixed, - fixed: 'build/img/icons/marker/circle.svg', + fixed: 'img/icons/marker/circle.svg', }, symbolAlign: { horizontal: HorizontalAlign.Center,