mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
Merge upstream/main: air-quality layer (AQHI) meets i18n
Upstream's #568 adds the Air quality layer to the Weather group (ECCC AQHI, Canada only) with a band legend, worst-first list and voice support. - package-boundaries: both sides' entries unioned. - layerPanel/weatherPanel tests: both sides' new tests kept; the weatherPanel fixture follows upstream (legendCategorical: true, the 'list' block id) while our localized-history (K-6) test stays. - air-quality strings marked: band labels and the provider label as msg() data, the readings-list aria-label through t(); es/ru entries added (+6 keys each). - The synthetic air-quality allocation-benchmark titles follow the file's own convention (// i18n-ignore) like TRK/VESSEL/CAMERA. Also verified the auto-merged weatherPanel.js against upstream: ORDER gains 'air-quality', OBSERVED stays slice(2, 5), and the data-driven legendCategorical path is upstream's. npm run i18n: complete (2559), no unmarked strings. npm test: only the pre-existing environmental OPENAI_API_KEY leak fails. Build passes.
This commit is contained in:
commit
f3da0916d9
38 files changed
+2061
-62
No files matched your search
@@ -329,3 +329,31 @@ test('the unavailable chip may abbreviate, but its accessible name keeps the ful
|
||||
assert.equal(button.dataset.feedState, 'unavailable');
|
||||
assert.match(attrs.get('aria-label'), /^Active Fires: UNAVAILABLE\./);
|
||||
});
|
||||
|
||||
test('the Weather readout receives enabled air-quality alongside weather layers', async () => {
|
||||
const { LayerPanel } = await import('./layerPanel.js');
|
||||
const layers = ['wind', 'air-quality', 'other'].map((id) => ({
|
||||
id,
|
||||
icon: '*',
|
||||
enabled: true,
|
||||
}));
|
||||
layers.push({ id: 'weather-radar', icon: '*', enabled: false });
|
||||
const panel = new LayerPanel({
|
||||
getLayers: () => layers,
|
||||
getRowControls: (id) => ({ readout: true, summary: { label: id } }),
|
||||
});
|
||||
let entries = null;
|
||||
panel._weatherPanel = {
|
||||
update: (next) => {
|
||||
entries = next;
|
||||
},
|
||||
};
|
||||
panel._refreshWeatherPanel();
|
||||
assert.deepEqual(
|
||||
entries.map(({ id, summary }) => [id, summary.label]),
|
||||
[
|
||||
['wind', 'wind'],
|
||||
['air-quality', 'air-quality'],
|
||||
],
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user