|
|
@@ -281,6 +281,7 @@ ok("raw window opens via the new-window menu", (await page.locator(".rawwin").co
|
|
|
await page.selectOption(".rawwin select", "effective");
|
|
|
await page.waitForFunction(
|
|
|
() => (document.querySelector(".rawwin .rawpre").textContent || "").includes('"clusters"'),
|
|
|
+ null,
|
|
|
{ timeout: 5000 },
|
|
|
);
|
|
|
ok("raw: effective shows the merged config JSON", true);
|
|
|
@@ -317,6 +318,31 @@ await page.waitForFunction(
|
|
|
);
|
|
|
ok("topo: frame chip click activates cluster", true);
|
|
|
|
|
|
+// --- 14. recipes panel: the `sm121 report --serve` page, mounted at /recipes -----
|
|
|
+await page.click("#dock .plus");
|
|
|
+await page.click('.dockmenu .dock-chip:text-is("recipes")');
|
|
|
+await page.waitForSelector("#win-recipes iframe", { timeout: 10000 });
|
|
|
+const recipes = page.frameLocator("#win-recipes iframe");
|
|
|
+await recipes.locator("table").first().waitFor({ timeout: 10000 });
|
|
|
+ok("recipes: panel page loads in its window", (await page.locator("#win-recipes iframe").count()) === 1);
|
|
|
+ok("recipes: table rendered", (await recipes.locator("tr.row").count()) > 0);
|
|
|
+ok(
|
|
|
+ "recipes: its own SSE stream is live behind the prefix",
|
|
|
+ (await recipes.locator("#live").innerText()).includes("live"),
|
|
|
+);
|
|
|
+// the iframe inherits the dashboard's colour scheme (report page is
|
|
|
+// `light dark` and would otherwise follow the OS)
|
|
|
+const scheme = await page.evaluate(() =>
|
|
|
+ getComputedStyle(document.querySelector("#win-recipes iframe")).colorScheme,
|
|
|
+);
|
|
|
+ok("recipes: iframe colour-scheme follows the theme", scheme === "light" || scheme === "dark", scheme);
|
|
|
+// the report page's own paths move with the mount (dashboard owns /events)
|
|
|
+ok(
|
|
|
+ "recipes: iframe loads the mounted panel",
|
|
|
+ (await page.locator("#win-recipes iframe").getAttribute("src")) === "/recipes",
|
|
|
+);
|
|
|
+await page.evaluate(() => document.querySelector("#win-recipes").style.display = "none");
|
|
|
+
|
|
|
// --- no page JS errors across the whole flow -------------------------------------
|
|
|
ok("no page JS errors", pageErrors.length === 0, pageErrors.join("; "));
|
|
|
|