From e4685e5a92a88454042155e65f4410f0f3f797f9 Mon Sep 17 00:00:00 2001 From: Dotta Date: Wed, 28 Oct 2026 16:19:36 -0500 Subject: [PATCH] test(e2e): wait for YAML reload before copying editor contents Co-Authored-By: Paperclip --- tests/e2e/agent-configuration.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/agent-configuration.spec.ts b/tests/e2e/agent-configuration.spec.ts index d09b17dc864..da0a60352f6 100644 --- a/tests/e2e/agent-configuration.spec.ts +++ b/tests/e2e/agent-configuration.spec.ts @@ -198,8 +198,9 @@ test("a lost creation response requires reload and cannot blindly replay command expect(await json(await request.get(`/api/agents/${agent.id}/keys`))).toHaveLength(2); expect((await document(page)).spec.apiKeys!.create).toHaveLength(2); await page.getByRole("button", { name: "Reload saved", exact: true }).click(); - await expect.poll(async () => (await document(page)).spec.apiKeys!.create).toEqual([]); await expect(page).toHaveURL(/\/agents\/partially-renamed-yaml-engineer\/advanced$/); + await expect(page.getByRole("button", { name: "Reload saved", exact: true })).toBeEnabled(); + await expect.poll(async () => (await document(page)).spec.apiKeys!.create).toEqual([]); await expect(page.getByRole("textbox", { name: "API key: First key token" })).toBeVisible(); await edit(page, value => { value.spec.title = "Recovered save"; }); await save(page);