Skip to content

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

test(settings): cover plugin OAuth account menu

vastsa6e8336154646
diff --git a/apps/desktop/test/settings-general.test.mjs b/apps/desktop/test/settings-general.test.mjs
index 9c58f611b..203283a42 100644
--- a/apps/desktop/test/settings-general.test.mjs
+++ b/apps/desktop/test/settings-general.test.mjs
@@ -345,8 +345,14 @@ test("a service row opens its editor and keeps only a switch and one menu", () =
// An account has no enable switch; a plugin's switch belongs to the plugin.
assert.match(serviceRowSource, /kind !== "account" \? \(/);
assert.match(serviceRowSource, /disabled=\{busy \|\| kind === "plugin"\}/);
- // A plugin owns its row, so neither edit nor remove is offered for one.
- assert.match(serviceListSource, /if \(kind !== "plugin"\) \{\s*items\.push\(\{\s*key: "edit"/);
+ // Plugin-owned rows are not editable, including OAuth account rows; those
+ // rows still expose sign-out through the overflow menu.
+ assert.match(serviceListSource, /const pluginOAuth = kind === "account" && !!provider\.ownerPluginId/);
+ assert.match(
+ serviceListSource,
+ /if \(kind !== "plugin" && !pluginOAuth\) \{\s*items\.push\(\{\s*key: "edit"/,
+ );
+ assert.match(serviceListSource, /t\(pluginOAuth\s*\?\s*"settings\.vendorSignOut"/);
assert.match(serviceListSource, /if \(kind !== "plugin"\) \{\s*const isArmed/);
// Removal is confirmed inside the menu rather than by a second row button.
assert.match(serviceListSource, /useArmedDelete\(\)/);