diff --git a/tests/component/design-system-platform.test.tsx b/tests/component/design-system-platform.test.tsx index ef11d35c..b13888eb 100644 --- a/tests/component/design-system-platform.test.tsx +++ b/tests/component/design-system-platform.test.tsx @@ -320,6 +320,10 @@ describe("design-system platform interactions", () => { const popoverTrigger = screen.getByRole("button", { name: "설명 열기" }); await user.click(popoverTrigger); expect(screen.getByRole("dialog")).toHaveTextContent("내부 작업"); + // 10-02. Opening leaves focus on the trigger, so move it into the content + // first; otherwise the check below holds whatever Escape does. + await user.tab(); + expect(screen.getByRole("button", { name: "내부 작업" })).toHaveFocus(); await user.keyboard("{Escape}"); expect(screen.queryByRole("dialog")).not.toBeInTheDocument(); expect(popoverTrigger).toHaveFocus();