← back to NationalPaperHangers
smoke.test.js: update /map assertion for address-driven near-me rewrite
f4d5c8f3114a4bf01d9a9dc9833fa29105a9add4 · 2026-05-18 16:09:41 -0700 · SteveStudio2
/map (commit b3b4e14) no longer client-fetches /api/installers.geo —
markers are server-rendered from an address form. Assert leaflet.css +
the near-me form instead. The geo endpoint stays covered by its own test.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit f4d5c8f3114a4bf01d9a9dc9833fa29105a9add4
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date: Mon May 18 16:09:41 2026 -0700
smoke.test.js: update /map assertion for address-driven near-me rewrite
/map (commit b3b4e14) no longer client-fetches /api/installers.geo —
markers are server-rendered from an address form. Assert leaflet.css +
the near-me form instead. The geo endpoint stays covered by its own test.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
tests/smoke.test.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/smoke.test.js b/tests/smoke.test.js
index 32289b8..21266d0 100644
--- a/tests/smoke.test.js
+++ b/tests/smoke.test.js
@@ -77,10 +77,13 @@ test('GET /map renders the Leaflet map page', async () => {
const res = await request.get('/map');
assert.equal(res.status, 200);
assert.match(res.headers['content-type'], /html/);
- // Leaflet CSS link is the load-bearing dependency the page can't fail without
+ // Leaflet CSS lives in <head> unconditionally — load-bearing dependency.
+ // (leaflet.js + the map container only render inside the results block.)
assert.ok(res.text.includes('/vendor/leaflet/leaflet.css'), 'expected Leaflet CSS link');
- // Page must call /api/installers.geo to render markers
- assert.ok(res.text.includes('/api/installers.geo'), 'expected geo-feed fetch in page');
+ // /map is now an address-driven near-me view (commit b3b4e14): the always-on
+ // entry point is the address form, not a client-side /api/installers.geo fetch.
+ assert.ok(res.text.includes('near-me-form'), 'expected near-me address form');
+ assert.ok(/action="\/map"/.test(res.text), 'expected form posts back to /map');
});
test('GET /api/installers.geo returns JSON with count + installers array', async () => {
← 4d68e2a tests/app.js: mount csrfMiddleware to mirror server.js
·
back to NationalPaperHangers
·
Split shared claimLimiter into per-route buckets (claim/noti 868356a →