test: cover lazy map and rig startup flows

This commit is contained in:
sjg
2026-08-01 22:34:22 +02:00
parent ddb33b6ff3
commit a1a8d1d1d3
3 changed files with 74 additions and 17 deletions
@@ -5499,12 +5499,10 @@ function navigateToTab(name, options = {}) {
const panel = document.getElementById(`tab-${name}`);
if (!panel) return;
panel.style.display = "";
const tmpl = panel.querySelector("template");
if (tmpl) {
panel.appendChild(tmpl.content.cloneNode(true));
tmpl.remove();
panel.querySelectorAll(".sub-tab-bar").forEach(_wireSubTabBar);
if (decoderRegistry.length) applyDecoderRegistryVisibility();
materializeTabPanel(panel);
if (name === "map" || name === "statistics") {
const peer = document.getElementById(name === "map" ? "tab-statistics" : "tab-map");
if (peer) materializeTabPanel(peer);
}
if (updateHistory) {
updateTabHistory(name, replaceHistory);
@@ -5523,6 +5521,15 @@ function navigateToTab(name, options = {}) {
void refreshRecorderStatus();
}
}
function materializeTabPanel(panel) {
const tmpl = panel.querySelector("template");
if (tmpl) {
panel.appendChild(tmpl.content.cloneNode(true));
tmpl.remove();
panel.querySelectorAll(".sub-tab-bar").forEach(_wireSubTabBar);
if (decoderRegistry.length) applyDecoderRegistryVisibility();
}
}
window.navigateToTab = navigateToTab;
requiredElement("tab-bar").addEventListener("click", (e) => {
const btn = e.target instanceof Element ? e.target.closest(".tab[data-tab]") : null;