From 848c267b76ada251c78ace8e46b0605aadecfe31 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 07:50:15 +0000 Subject: [PATCH] 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> --- .../ui/tests/integrationCritical/mcpUserEnvVars.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/e2e/ui/tests/integrationCritical/mcpUserEnvVars.spec.ts b/tests/e2e/ui/tests/integrationCritical/mcpUserEnvVars.spec.ts index 11cc1c948a3..b37ff903121 100644 --- a/tests/e2e/ui/tests/integrationCritical/mcpUserEnvVars.spec.ts +++ b/tests/e2e/ui/tests/integrationCritical/mcpUserEnvVars.spec.ts @@ -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", {