fix(map): group collocated user markers
CI / validate (push) Successful in 5m47s
Release / release (push) Successful in 7m55s

This commit is contained in:
dmg
2026-08-01 21:24:49 -04:00
parent ebc7c7df17
commit aa0b757814
10 changed files with 176 additions and 31 deletions
@@ -15,6 +15,17 @@ describe("UserWorldMap", () => {
classification: "clear",
source: "game",
observedAt: new Date("2026-08-01T12:00:00Z"),
}, {
userId: "22222222-2222-4222-8222-222222222222",
name: "Alex",
discordUsername: "alex",
nickname: "Alex (AlexMC)",
latitude: 37.4057,
longitude: -122.0774,
location: "Mountain View, California, US",
classification: "clear",
source: "web",
observedAt: new Date("2026-08-01T13:00:00Z"),
}]} unavailableCount={2} />);
expect(markup).toContain('role="group"');
@@ -22,6 +33,10 @@ describe("UserWorldMap", () => {
expect(markup).toContain("Latest approximate location for registered users");
expect(markup).toContain('href="/admin/users/11111111-1111-4111-8111-111111111111"');
expect(markup).toContain("Dani (Steve)");
expect(markup).toContain("Alex (AlexMC)");
expect(markup).toContain("2 users near Mountain View, California, US");
expect(markup).toMatch(/<text[^>]*>2<\/text>/);
expect(markup).toContain('<details class="mt-5 border-t border-line pt-4" id="map-location-list" open="">');
expect(markup).toContain("Mountain View, California, US");
expect(markup).toContain("World overview");
expect(markup).toContain("Interactive OpenStreetMap");