mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
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:
1 parent
3b6b3f1007
commit
759652207f
25 files changed
+479
-41
No files matched your search
@@ -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);
|
||||
});
|
||||
Reference in new issue
Block a user