Add auto open disabled environment option to sidebar

This commit is contained in:
KAWAKAMI Moeki
2025-04-13 21:53:42 +09:00
parent d2cb2338a0
commit 52564dd7c5
4 changed files with 53 additions and 4 deletions

View File

@@ -423,6 +423,33 @@ describe("Sidebar Environment Variables", () => {
);
});
it("should update auto browser open disabled", () => {
const setConfig = jest.fn();
renderSidebar({ config: DEFAULT_INSPECTOR_CONFIG, setConfig });
openConfigSection();
const autoOpenDisabledInput = screen.getByTestId(
"MCP_AUTO_OPEN_DISABLED-input",
);
fireEvent.click(autoOpenDisabledInput);
const trueOption = screen.getByTestId(
"MCP_AUTO_OPEN_DISABLED-input-true",
);
fireEvent.click(trueOption);
expect(setConfig).toHaveBeenCalledWith(
expect.objectContaining({
MCP_AUTO_OPEN_DISABLED: {
label: "Auto Browser Open Disabled",
description:
"Disable automatic browser opening when inspector starts",
value: true,
},
}),
);
});
it("should maintain configuration state after multiple updates", () => {
const setConfig = jest.fn();
const { rerender } = renderSidebar({