From fdc5cb284c18ba61cf8e3bc521e2654be4e40a58 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Fri, 13 Nov 2026 00:40:52 +0900 Subject: [PATCH] =?UTF-8?q?test(form):=20=ED=95=84=EB=93=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=EC=9D=B4=20=EB=B6=99=EC=9D=80=20=EA=B2=B0=EA=B3=BC=20?= =?UTF-8?q?=EB=B6=88=EB=AA=85=20=EC=8B=9C=ED=97=98=EC=9D=84=20=EA=B3=A0?= =?UTF-8?q?=EC=B9=9C=20=EB=8F=99=EC=9E=91=EC=97=90=20=EB=A7=9E=EC=B6=94?= =?UTF-8?q?=EA=B3=A0=20=EC=83=81=ED=83=9C=20=EC=A7=88=EC=9D=98=EB=A5=BC=20?= =?UTF-8?q?=EC=A2=81=ED=9E=8C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 앞 커밋들을 FE-GATE-006으로 돌리자 form-foundation 시험 둘이 실패했다. - 「keeps the save off after a 422 the backend may have applied」는 결과 불명 422가 필드 오류도 함께 보이기를 기대했다. 그것이 1101/03-04가 결함이라 한 동작이고 이 PR이 고쳤다(결과 불명을 입력 오류보다 먼저 본다). 시험이 결과 불명과 저장 막힘을 보고, 필드가 aria-invalid가 아님을 본다. - 새 시험 「says a resend refused before the write in the feedback」은 findByRole("status")로 안내를 찾았는데, 시험 harness의 도 status라 여럿이 걸렸다. 안내 문구를 찾고 그것을 감싼 결과 불명 status를 본다. 검증: form-foundation 전체를 desktop에서 돌린다(PR 본문). Refs: 1101/03-04, 1112/04-02 --- tests/component/form-foundation.test.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/component/form-foundation.test.tsx b/tests/component/form-foundation.test.tsx index b2d132ee..ab5ef831 100644 --- a/tests/component/form-foundation.test.tsx +++ b/tests/component/form-foundation.test.tsx @@ -1201,7 +1201,8 @@ describe("correcting a field after a server validation refusal", () => { // 1101/14.4. Outside IDEMPOTENT_REQUEST_MISMATCH a 422 may come after a // write (fileserver INTEGRITY_MISMATCH), so the coordinator holds it as an - // unknown result even though the form shows the field. + // unknown result. 1101/03-04. The form shows that result, not the field it + // names: correcting the field would send a second save. it("keeps the save off after a 422 the backend may have applied", async () => { const user = userEvent.setup(); const fetcher = answerFirst(422, { @@ -1215,8 +1216,11 @@ describe("correcting a field after a server validation refusal", () => { await user.type(name, "Rejected"); await user.click(screen.getByRole("button", { name: "Submit" })); - await waitFor(() => expect(name).toHaveAttribute("aria-invalid", "true")); + await waitFor(() => + expect(screen.getByTestId("result")).toHaveTextContent("effect-unknown"), + ); + expect(name).not.toHaveAttribute("aria-invalid"); expect(screen.getByRole("button", { name: "Submit" })).toBeDisabled(); expect(fetcher).toHaveBeenCalledTimes(1); }); @@ -1662,9 +1666,11 @@ describe("a form bound to its mutation", () => { ); await waitFor(() => expect(fetcher).toHaveBeenCalledTimes(2)); - const status = await screen.findByRole("status"); - await waitFor(() => - expect(status).toHaveTextContent(formatMessage("ko-KR", "form.resendLater")), + // The harness's elements are statuses too: find the words, then + // the unknown result's status around them. + const notice = await screen.findByText(formatMessage("ko-KR", "form.resendLater")); + expect(notice.closest('[role="status"]')).toHaveTextContent( + formatMessage("ko-KR", "async.mutationEffectUnknown"), ); expect( screen.queryByRole("heading", { name: formatMessage("ko-KR", "form.errorSummary") }),