Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

test(settings): update experimental badge contract

vastsad930aaef741c
diff --git a/apps/desktop/test/settings-remote-hosts.test.mjs b/apps/desktop/test/settings-remote-hosts.test.mjs
index 8168c15e2..c014c084f 100644
--- a/apps/desktop/test/settings-remote-hosts.test.mjs
+++ b/apps/desktop/test/settings-remote-hosts.test.mjs
@@ -15,6 +15,10 @@ const page = readFileSync(
new URL("../src/components/settings/RemoteHostsPage.tsx", import.meta.url),
"utf8",
);
+const settingsNav = readFileSync(
+ new URL("../src/lib/settings-search.ts", import.meta.url),
+ "utf8",
+);
const settings = readSettingsSourceSync();
const styles = loadStylesSync();
@@ -49,8 +53,12 @@ test("remote hosts omits instructional copy", () => {
});
test("the remote-hosts destination is marked experimental", () => {
- assert.match(settings, /item\.id === "remoteHosts"/);
- assert.match(settings, /settings\.remoteHosts\.experimental/);
+ assert.match(
+ settingsNav,
+ /\{\s*id: "remoteHosts",[\s\S]*?experimentalBadgeKey: "settings\.remoteHosts\.experimental",/,
+ );
+ assert.match(settings, /item\.experimentalBadgeKey \? \(/);
+ assert.match(settings, /activeNavItem\?\.experimentalBadgeKey \? \(/);
assert.match(settings, /className="settings-nav-experimental"/);
assert.match(cssRule(".settings-nav-experimental"), /font-size:\s*var\(--text-2xs\)/);
assert.doesNotMatch(page, /EXPERIMENTAL_FEATURES/);