Preload terminal chart canvas
This commit is contained in:
@@ -72,6 +72,17 @@ export async function runTests() {
|
||||
chartSource.includes("2 * 60_000"),
|
||||
"selected city chart should consume SSE patches and use a 2-minute no-patch fallback",
|
||||
);
|
||||
assert(
|
||||
chartSource.includes("loadTemperatureChartCanvasModule") &&
|
||||
chartSource.includes("preloadTemperatureChartCanvas"),
|
||||
"terminal chart canvas should expose a preload hook for the dynamic chart chunk",
|
||||
);
|
||||
assert(
|
||||
dashboardSource.includes("preloadTemperatureChartCanvas") &&
|
||||
dashboardSource.includes("void preloadTemperatureChartCanvas()") &&
|
||||
dashboardSource.includes('activeNavKey !== "thresholds"'),
|
||||
"terminal screen should preload the chart chunk once access is confirmed on the chart tab",
|
||||
);
|
||||
assert(
|
||||
chartSource.includes("fetchHourlyForecastForCity(city, { ignoreCache: true, resolution: targetResolution })") &&
|
||||
chartSource.includes("setHourly(data)"),
|
||||
|
||||
Reference in New Issue
Block a user