



























@@ -559,13 +559,21 @@ describe("config view", () => {
559559 onRawChange,
560560});
561561562-const text = normalizedText(container);
563-expect(text).toContain("1 secret redacted");
564-expect(text).toContain("Use the reveal button above to edit the raw config.");
565-expect(text).not.toContain("supersecret");
562+expect(
563+queryRequired(container, ".config-raw-field .pill", HTMLElement)
564+.textContent?.replace(/\s+/g, " ")
565+.trim(),
566+).toBe("1 secret redacted");
567+expect(
568+queryRequired(container, ".config-raw-field .callout.info", HTMLElement)
569+.textContent?.replace(/\s+/g, " ")
570+.trim(),
571+).toBe("1 sensitive value hidden. Use the reveal button above to edit the raw config.");
566572expect(container.querySelector("textarea")).toBeNull();
567573568574const revealButton = queryRequired(container, ".config-raw-toggle", HTMLButtonElement);
575+expect(revealButton.getAttribute("title")).toBe("Reveal sensitive values");
576+expect(revealButton.getAttribute("aria-pressed")).toBe("false");
569577revealButton.click();
570578571579const textarea = queryRequired(container, "textarea", HTMLTextAreaElement);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。