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);