From d695380eabcd329464aac17e07e74a7eec712fff Mon Sep 17 00:00:00 2001 From: GcsSloop Date: Fri, 20 Mar 2026 10:50:11 +0800 Subject: [PATCH] test(accounts): wait for lua skill copy action --- frontend/src/features/accounts/AccountsPage.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/accounts/AccountsPage.test.tsx b/frontend/src/features/accounts/AccountsPage.test.tsx index 3caff83..07bc602 100644 --- a/frontend/src/features/accounts/AccountsPage.test.tsx +++ b/frontend/src/features/accounts/AccountsPage.test.tsx @@ -653,7 +653,7 @@ describe("AccountsPage", () => { fireEvent.click(screen.getByRole("button", { name: "编辑-mirror-east" })); const editModal = await screen.findByRole("dialog", { name: "编辑账户" }); fireEvent.click( - within(editModal).getByRole("button", { name: "复制 AI Skill" }), + await within(editModal).findByRole("button", { name: "复制 AI Skill" }), ); await waitFor(() => { @@ -1025,7 +1025,7 @@ describe("AccountsPage", () => { ).toContain("fetch_usage"); fireEvent.click( - within(editModal).getByRole("button", { name: "复制 AI Skill" }), + await within(editModal).findByRole("button", { name: "复制 AI Skill" }), ); await waitFor(() => { expect(clipboardWriteText).toHaveBeenCalledTimes(1);