Render health API names without label keys

This commit is contained in:
ms2k 2026-09-16 18:44:13 +09:00
commit d5fe7407da

View file

@ -15,8 +15,8 @@ days[3] = 0;
const snapshot = [
1786838400,
[
["Nodes", [{ node: "one" }, { node: "two" }], [days, days]],
["Public services", [{ service: "code" }], [days]],
["Nodes", ["one", "two"], [days, days]],
["Public services", ["Code"], [days]],
],
];
@ -56,6 +56,11 @@ async function checkHealth(page, width, mode) {
);
if (healthy) {
assert.deepEqual(await page.locator(".health-row h3").allTextContents(), [
"Code",
"one",
"two",
]);
assert.match(
await page.locator(".health-group h2").first().textContent(),
/Public services/,
@ -63,6 +68,15 @@ async function checkHealth(page, width, mode) {
await page.locator(".bar").nth(2).click();
assert.match(await page.locator("#detail").textContent(), /95\.83%/);
assert.match(await page.locator("#detail").textContent(), /^Code ·/);
assert.equal(
await page.locator("#target option").first().textContent(),
"Public services · Code",
);
assert.match(
await page.locator(".bar").first().getAttribute("aria-label"),
/^Code ·/,
);
} else {
assert.equal(await page.locator("#observed").textContent(), "No data");
}