test(e2e): wait for YAML reload before copying editor contents

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-28 17:15:20 -05:00
1 parent 1d3a336771
commit e4685e5a92
1 file changed
+2 -1
+2 -1
View File
@@ -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);