Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion webviews/src/pages/settings/components/SectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export function SectionList({ current, onSelect }: { current: string | null; onS
<span className={`badge badge-${mark}`} data-badge={mark}>
<Icon name={mark} />
<span className="visually-hidden">
{mark === "warning" ? t("settingsPage.problems", settingsFileName(state.host)) : t("settingsPage.managed")}
{mark === "warning"
? t("settingsPage.problems", settingsFileName(state.host))
: t("settingsPage.managed")}
</span>
</span>
)}
Expand Down
9 changes: 7 additions & 2 deletions webviews/src/pages/settings/hostCards.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,15 @@ test("Terminal shows the Ghostty facts; Advanced shows the file and every proble
test("Advanced names the loaded settings file and shows one Reload Configuration", async () => {
const page = await renderPage({
path: "/settings/advanced",
mock: { settingsFile: "/Users/me/.config/cmux/cmux.json", diagnostics: [{ path: "nope.key", message: "unknown key" }] },
mock: {
settingsFile: "/Users/me/.config/cmux/cmux.json",
diagnostics: [{ path: "nope.key", message: "unknown key" }],
},
});
const text = page.container.textContent ?? "";
expect(page.container.querySelector('[data-card="problems"] .group-title')!.textContent).toBe("Problems in cmux.json");
expect(page.container.querySelector('[data-card="problems"] .group-title')!.textContent).toBe(
"Problems in cmux.json",
);
const buttons = [...page.container.querySelectorAll<HTMLButtonElement>("button")].map((b) => b.textContent);
expect(buttons.filter((title) => title === "Open cmux.json").length).toBe(1);
expect(buttons.filter((title) => title === "Reload Configuration").length).toBe(1);
Expand Down
Loading