diff --git a/webui/src/components/settings/channels/CredentialForm.tsx b/webui/src/components/settings/channels/CredentialForm.tsx index 53ab2f20a..f74e6974b 100644 --- a/webui/src/components/settings/channels/CredentialForm.tsx +++ b/webui/src/components/settings/channels/CredentialForm.tsx @@ -233,7 +233,7 @@ export function CredentialForm({ aria-invalid={Boolean(error)} aria-describedby={describedBy} type={inputType} - autoComplete={field.secret ? "off" : undefined} + autoComplete={field.secret ? "new-password" : undefined} inputMode={field.inputType === "number" ? "numeric" : undefined} placeholder={ savedSecret diff --git a/webui/src/tests/settings-channels.test.tsx b/webui/src/tests/settings-channels.test.tsx index 87227cfb9..d274d54ac 100644 --- a/webui/src/tests/settings-channels.test.tsx +++ b/webui/src/tests/settings-channels.test.tsx @@ -1843,6 +1843,11 @@ describe("Settings channels", () => { }), 150_000, )); + const savedValues = requestMutationMock.mock.calls.find( + ([action]) => action === "settings.channel.configure", + )?.[1].values; + expect(savedValues).not.toHaveProperty(["channels.email.imapPassword"]); + expect(savedValues).not.toHaveProperty(["channels.email.smtpPassword"]); expect(within(dialog).getByText("Saving")).toBeVisible(); fireEvent.click(within(dialog).getByRole("button", { name: "Close" })); @@ -1990,7 +1995,7 @@ describe("Settings channels", () => { expect(screen.getByLabelText("Discord channel")).toBeEnabled(); const savedSecret = screen.getByPlaceholderText("Saved secret"); expect(savedSecret).toHaveValue(""); - expect(savedSecret).toHaveAttribute("autocomplete", "off"); + expect(savedSecret).toHaveAttribute("autocomplete", "new-password"); expect(savedSecret.closest("form")).not.toBeNull(); expect(screen.queryByDisplayValue("discord-secret-token")).not.toBeInTheDocument();