Avoid double negative

This commit is contained in:
KAWAKAMI Moeki 2025-04-17 18:13:58 +09:00
commit 014acecf77
3 changed files with 15 additions and 15 deletions

View file

@ -583,21 +583,21 @@ describe("Sidebar Environment Variables", () => {
openConfigSection();
const autoOpenDisabledInput = screen.getByTestId(
"MCP_AUTO_OPEN_DISABLED-input",
"MCP_AUTO_OPEN_ENABLED-input",
);
fireEvent.click(autoOpenDisabledInput);
const trueOption = screen.getByTestId(
"MCP_AUTO_OPEN_DISABLED-input-true",
const falseOption = screen.getByTestId(
"MCP_AUTO_OPEN_ENABLED-input-false",
);
fireEvent.click(trueOption);
fireEvent.click(falseOption);
expect(setConfig).toHaveBeenCalledWith(
expect.objectContaining({
MCP_AUTO_OPEN_DISABLED: {
label: "Auto Browser Open Disabled",
MCP_AUTO_OPEN_ENABLED: {
label: "Auto Browser Open Enabled",
description:
"Disable automatic browser opening when inspector starts",
value: true,
"Enable automatic browser opening when inspector starts",
value: false,
},
}),
);

View file

@ -37,5 +37,5 @@ export type InspectorConfig = {
/**
* Disable automatic browser opening when inspector starts.
*/
MCP_AUTO_OPEN_DISABLED: ConfigItem;
MCP_AUTO_OPEN_ENABLED: ConfigItem;
};

View file

@ -52,9 +52,9 @@ export const DEFAULT_INSPECTOR_CONFIG: InspectorConfig = {
"Set this if you are running the MCP Inspector Proxy on a non-default address. Example: http://10.1.1.22:5577",
value: "",
},
MCP_AUTO_OPEN_DISABLED: {
label: "Auto Browser Open Disabled",
description: "Disable automatic browser opening when inspector starts",
value: false,
MCP_AUTO_OPEN_ENABLED: {
label: "Auto Browser Open Enabled",
description: "Enable automatic browser opening when inspector starts",
value: true,
},
} as const;