fix: improve mapped installations and map-source guidance (#183)

Improve mapped installation recovery, deselection, retry feedback, and visual-style and map-source guidance.
This commit is contained in:
Bilawal Sidhu authored and GitHub committed 2026-09-05 03:30:55 -05:00
1 parent 3b6b3f1007
commit 759652207f
25 files changed
+479 -41

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { MapStackController, photorealUnavailableReason } from './mapStackController.js';
test('missing photoreal credentials explain both supported setup routes', () => {
assert.match(photorealUnavailableReason(false), /Needs GOOGLE_MAPS_API_KEY.*Provider Settings/);
assert.match(photorealUnavailableReason(false), /Cesium ion token/);
});
test('a configured but failed photoreal route does not ask for another key', () => {
const reason = photorealUnavailableReason(true);
assert.match(reason, /unavailable.*restrictions, quota, or network/);
assert.doesNotMatch(reason, /Needs|add it/);
});
test('controller credential detection accepts ion without a browser global', () => {
const hasCredentials = MapStackController.prototype._hasPhotorealCredentials;
assert.equal(hasCredentials.call({ cesiumToken: 'configured' }), true);
assert.equal(hasCredentials.call({ cesiumToken: ' ' }), false);
});