From 5778c4ff653638de47e60f0d1218196391cec990 Mon Sep 17 00:00:00 2001 From: Joachim Schleicher Date: Tue, 17 Oct 2023 21:45:05 +0200 Subject: [PATCH] add testcase for marker highlight --- umap/static/umap/test/Feature.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/umap/static/umap/test/Feature.js b/umap/static/umap/test/Feature.js index f22d0c7b..88d3e0b1 100644 --- a/umap/static/umap/test/Feature.js +++ b/umap/static/umap/test/Feature.js @@ -223,6 +223,16 @@ describe('L.U.FeatureMixin', function () { }) }) + describe('#highlight()', function () { + it('should highlight marker on click', function () { + assert.notOk(qs('.umap-icon-active')) + happen.click(qs('div.leaflet-marker-icon')) + assert.ok(qs('.umap-icon-active')) + happen.click(qs('#map')) // Close popup + assert.notOk(qs('.umap-icon-active')) + }) + }) + describe('#tooltip', function () { it('should have a tooltip when active and allow variables', function () { this.map.options.showLabel = true