From 1983f5038eeb6520011aa0c430aeeec6fc3de09e Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Wed, 10 Dec 2025 19:57:45 +0100 Subject: [PATCH] Fix route spec --- CHANGELOG.md | 1 + e2e/v2/map/layers/routes.spec.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f563a5c8..814b9297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Redis client now also being configured so that it could connect via unix socket. #1970 - Importing KML files now creates points with correct timestamps. #1988 - Importing KMZ files now works correctly. +- Map settings are now being respected in map v2. #2012 # [0.36.2] - 2025-12-06 diff --git a/e2e/v2/map/layers/routes.spec.js b/e2e/v2/map/layers/routes.spec.js index ad705fb9..9d239c1c 100644 --- a/e2e/v2/map/layers/routes.spec.js +++ b/e2e/v2/map/layers/routes.spec.js @@ -124,8 +124,16 @@ test.describe('Routes Layer', () => { expect(routeLayerInfo).toBeTruthy() expect(routeLayerInfo.exists).toBe(true) - expect(routeLayerInfo.isArray).toBe(false) - expect(routeLayerInfo.value).toBe('#f97316') + + // Route color is now a MapLibre expression that supports dynamic colors + // Format: ['case', ['has', 'color'], ['get', 'color'], '#0000ff'] + if (routeLayerInfo.isArray) { + // It's a MapLibre expression, check the default color (last element) + expect(routeLayerInfo.value[routeLayerInfo.value.length - 1]).toBe('#0000ff') + } else { + // Solid color (fallback) + expect(routeLayerInfo.value).toBe('#0000ff') + } }) })