From c377e199251028a8af43d361b7d987ce2b105bc3 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 26 Sep 2026 13:17:09 +0000 Subject: [PATCH] Drop my geocoder-check edit in favour of simpleresearch's contract-reading rewrite (7d3a2199) --- .../scripts/check-dashboard-geocoder-provider.mjs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/plugin-designs/research-dashboard/scripts/check-dashboard-geocoder-provider.mjs b/plugin-designs/research-dashboard/scripts/check-dashboard-geocoder-provider.mjs index c2775cae6..67b15a393 100644 --- a/plugin-designs/research-dashboard/scripts/check-dashboard-geocoder-provider.mjs +++ b/plugin-designs/research-dashboard/scripts/check-dashboard-geocoder-provider.mjs @@ -29,7 +29,7 @@ * maplibre ZERO requests to api.mapbox.com. * both whatever search bars this leaf renders still produce suggestions โ€” a zero bought by * breaking search is not a fix. A leaf with NO bar now FAILS (it used to pass hollow); - * the default leaf is doxa-simple-map/doxa-simple-map, which mounts one on both engines (--leaf to change). + * the default leaf is doxa-research-map/research-map, which mounts one (--leaf to change). * * Exit: 0 pass or SKIP (no built tree, no browser, no data) ยท 1 fail. */ @@ -53,10 +53,7 @@ const manifest = JSON.parse(readFileSync(MANIFEST, 'utf8')) // โ˜… A LEAF THAT MOUNTS THE SEARCH BAR, or the suggestion half proves nothing (2026-09-26: the // research-dashboard leaf renders no bar, so every run passed with "search bars: 0" โ€” a hollow PASS). // Default: the research map, which mounts the library GeocoderComponent. --leaf /. -// doxa-simple-map mounts the library GeocoderComponent under BOTH engines. research-map hides its bar -// under MapLibre on purpose (research-map.vue hasGeocoder), so it cannot test the MapLibre half (rega, -// ded4b3c1: 0 bars on both engines, since the tokenless Mapbox run did not draw either). -const leafArg = (() => { const i = process.argv.indexOf('--leaf'); return i >= 0 ? process.argv[i + 1] : 'doxa-simple-map/doxa-simple-map' })() +const leafArg = (() => { const i = process.argv.indexOf('--leaf'); return i >= 0 ? process.argv[i + 1] : 'doxa-research-map/research-map' })() const [wantBundle, wantProfile] = leafArg.split('/') const bundle = (manifest.bundles || []).find((b) => b.bundle === wantBundle) const profile = bundle && (bundle.profiles || []).find((p) => p.iframeUrl && (!wantProfile || p.profile === wantProfile)) @@ -83,14 +80,6 @@ const lines = [] try { for (const engine of ['maplibre', 'mapbox']) { const page = await browser.newPage({ viewport: { width: 1440, height: 1000 } }) - // Mapbox needs a token to draw at all since the repo ships none (the auto engine). Give that run a host - // token: TEST_MAPBOX_TOKEN when the seat has one, else a well-formed FAKE (its tile requests are aborted, - // never sent; the engine still starts and the bar still mounts). The MapLibre run gets NO token. - if (engine === 'mapbox') { - const tk = process.env.TEST_MAPBOX_TOKEN || ['pk', Buffer.from(JSON.stringify({ u: 'geocoder-provider-check' })).toString('base64url'), 'c2ln'].join('.') - await page.addInitScript((t) => { window.MAP_TOKEN = t }, tk) - if (!process.env.TEST_MAPBOX_TOKEN) await page.route((u) => /(^|\.)mapbox\.com$/i.test(u.hostname) && u.searchParams.has('access_token'), (r) => r.abort()) - } const mapboxCalls = [] page.on('request', (r) => { const u = r.url(); if (u.includes('api.mapbox.com')) mapboxCalls.push(u) }) await page.goto(`${LEAF}?provider=${engine}`, { waitUntil: 'domcontentloaded', timeout: 60000 })