mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(firms): drop LIVE from the row's source and the voice answer for a snapshot that ends at a set time
The catalog source 'NASA FIRMS · LIVE' still led the row; getStats() now names the source 'NASA FIRMS' for such a snapshot. get_active_fires says "in the 24 hours to" its end and reports window_end. The end is checked to be a printable time, cleared under KEY REQUIRED, the test moves next to the layer, and the changelog and CURRENT-STATE describe it.
This commit is contained in:
1 parent
43706b8dd0
commit
4ef0869a87
10 files changed
+163
-61
No files matched your search
@@ -43,43 +43,3 @@ for (const [age, zh, en, hant] of cases) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
test('a FIRMS snapshot that ends at a set time names it instead of LIVE', (context) => {
|
||||
const now = 1800000000000;
|
||||
context.mock.method(Date, 'now', () => now);
|
||||
const previousLocale = getLocale();
|
||||
const at = Date.UTC(2026, 9, 21, 15);
|
||||
const layerState = {
|
||||
_loading: false,
|
||||
_stale: false,
|
||||
_keyRequired: false,
|
||||
_error: null,
|
||||
_lastUpdate: now - 120000,
|
||||
_at: at,
|
||||
_count: 1,
|
||||
_cellCount: 0,
|
||||
_fires: [],
|
||||
};
|
||||
const model = createModel({ services: { anchors: {} } });
|
||||
const { methods } = createQueries({
|
||||
layerState,
|
||||
components: { model },
|
||||
config: {},
|
||||
});
|
||||
try {
|
||||
setLocale('en');
|
||||
assert.equal(methods.getStats().loadingLabel, '24 h to 10-21 15:00 UTC');
|
||||
assert.equal(methods.getStats().at, at);
|
||||
setLocale('de');
|
||||
assert.equal(
|
||||
methods.getStats().loadingLabel,
|
||||
'24 Std. bis 21.10. 15:00 UTC',
|
||||
);
|
||||
layerState._at = null;
|
||||
setLocale('en');
|
||||
assert.equal(methods.getStats().loadingLabel, 'LIVE · updated 2m ago');
|
||||
assert.equal(methods.getStats().at, null);
|
||||
} finally {
|
||||
setLocale(previousLocale);
|
||||
}
|
||||
});
|
||||
@@ -734,7 +734,7 @@
|
||||
"loading...": "chargement…",
|
||||
"KEY REQUIRED": "CLÉ REQUISE",
|
||||
"LIVE · updated {age}": "DIRECT · mis à jour {age}",
|
||||
"24 h to {day} {time} UTC": "24 h jusqu’au {day} {time} UTC",
|
||||
"24 h to {day} {time} UTC": "24 h jusqu'au {day} {time} UTC",
|
||||
"Source snapshot time unavailable": "Heure de l'instantané source indisponible",
|
||||
"Live data unavailable": "Données en direct indisponibles",
|
||||
"Intel Picture": "Situation renseignement",
|
||||
|
||||
Reference in new issue
Block a user