test(e2e): wait for saved MCP credentials before deleting the server (#50366)

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
devin-ai-integration[bot] 2026-11-06 07:50:15 +00:00 • committed by GitHub
parent 08f2a98250
commit 848c267b76
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -380,15 +380,19 @@ test("clearing credentials for a server deleted underneath the modal reports the
await openMcpServers(page);
const card = cardFor(page, server);
const dialog = credentialsDialog(page);
const clear = dialog.getByRole("button", { name: "Clear", exact: true });
await card.getByRole("button", { name: "Update", exact: true }).click();
await expect(dialog).toBeVisible();
await expect(
clear,
"the modal must load the saved credentials before the server is deleted",
).toBeVisible();
await server.remove();
const cleared = page.waitForResponse(
(response) =>
response.request().method() === "DELETE" &&
response.url().includes(server.statusUrl),
);
await dialog.getByRole("button", { name: "Clear", exact: true }).click();
await clear.click();
await page
.getByRole("alertdialog", { name: "Clear saved credentials" })
.getByRole("button", {