test(site/src/pages/AISettingsPage/MCPServersPage): prefix the OAuth2 resource form fixture
This commit is contained in:
1 parent
50ecadf953
commit
90948802e2
1 file changed
+3
-3
@@ -137,13 +137,13 @@ it("updates an API key server without re-entering the saved key", async () => {
|
||||
it("clears a stored OAuth2 resource URL on update", async () => {
|
||||
const user = userEvent.setup();
|
||||
const onUpdateServer = vi.fn(async () => undefined);
|
||||
const server = {
|
||||
const mockOAuth2Server = {
|
||||
...MockCoderMCPServer,
|
||||
oauth2_resource: "https://mcp.example.com/mcp",
|
||||
};
|
||||
render(
|
||||
<MCPServerForm
|
||||
server={server}
|
||||
server={mockOAuth2Server}
|
||||
listPath="/servers"
|
||||
isSaving={false}
|
||||
isDeleting={false}
|
||||
@@ -157,7 +157,7 @@ it("clears a stored OAuth2 resource URL on update", async () => {
|
||||
await user.click(screen.getByRole("button", { name: "Update server" }));
|
||||
await waitFor(() => {
|
||||
expect(onUpdateServer).toHaveBeenCalledWith(
|
||||
server.id,
|
||||
mockOAuth2Server.id,
|
||||
expect.objectContaining({ oauth2_resource: "" }),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user