mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Merge Core main into sameh/core-vue
railCardBlocks.js is the Vue wrapper on this branch, so main's verbatim legend units move into RailCardBlocks.vue.
This commit is contained in:
commit
5605fdc60a
33 files changed
+1498
-84
No files matched your search
@@ -760,3 +760,27 @@ test('air-quality readout renders its band legend, Canada coverage and worst-fir
|
||||
view.destroy();
|
||||
layer.destroy();
|
||||
});
|
||||
test('source-supplied legend units are shown as given; catalog units are translated', () => {
|
||||
setLocale('ru');
|
||||
try {
|
||||
const f = fixture();
|
||||
const view = createWeatherPanel(f);
|
||||
const row = (summary) => ({
|
||||
...radar,
|
||||
summary: { ...radar.summary, units: 'km/h', ...summary },
|
||||
legend: [
|
||||
{ label: '1', color: '#000000' },
|
||||
{ label: '2', color: '#ffffff' },
|
||||
],
|
||||
});
|
||||
const scale = () =>
|
||||
f.find((n) => n.className === 'rail-card-scale').textContent;
|
||||
view.update([row()]);
|
||||
assert.equal(scale(), '1 — 2 км/ч');
|
||||
view.update([row({ unitsVerbatim: true })]);
|
||||
assert.equal(scale(), '1 — 2 km/h');
|
||||
view.destroy();
|
||||
} finally {
|
||||
setLocale('en');
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user