mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
refactor(street-level): drop unused tile and pose fields; keep the sequence error on the sequence
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
7411ebaf1c
commit
c78c872f92
10 files changed
+32
-60
No files matched your search
@@ -118,7 +118,10 @@ export function presentStreetLevelPanel(state, { now = Date.now() } = {}) {
|
||||
controlsDisabled: state.keyRequired === true,
|
||||
error: keyMissing
|
||||
? keyHint()
|
||||
: state.street.error || state.coverage.error || null,
|
||||
: state.street.error ||
|
||||
state.sequence.error ||
|
||||
state.coverage.error ||
|
||||
null,
|
||||
filter: { pano: filter.pano, sinceDays: Number(filter.sinceDays) || 0 },
|
||||
since: presentSince(filter.sinceDays, now),
|
||||
legend: state.providerOn !== false,
|
||||
|
||||
@@ -124,7 +124,7 @@ test('the header pill is the on/off switch and reads OFF, LOADING or ON', () =>
|
||||
);
|
||||
});
|
||||
|
||||
test('errors from the viewer or the coverage web surface in one alert', () => {
|
||||
test('errors from the viewer, the sequence or the coverage surface in one alert', () => {
|
||||
assert.equal(presentStreetLevelPanel(snapshot()).error, null);
|
||||
assert.equal(
|
||||
presentStreetLevelPanel(
|
||||
@@ -132,6 +132,12 @@ test('errors from the viewer or the coverage web surface in one alert', () => {
|
||||
).error,
|
||||
'Image could not be opened',
|
||||
);
|
||||
assert.equal(
|
||||
presentStreetLevelPanel(
|
||||
snapshot({ sequence: { error: 'Sequence images unavailable' } }),
|
||||
).error,
|
||||
'Sequence images unavailable',
|
||||
);
|
||||
assert.equal(
|
||||
presentStreetLevelPanel(snapshot({ coverage: { error: 'Tile HTTP 502' } }))
|
||||
.error,
|
||||
|
||||
Reference in new issue
Block a user