From fff42a181938afe12adcc19c692f210a08eda9bb Mon Sep 17 00:00:00 2001 From: jiajia Date: Wed, 13 May 2026 22:01:10 +0800 Subject: [PATCH] Keep TEST-s composer test aligned with button label The TEST-s branch renders the composer generate action with the English aria-label used by nearby tests. Updating the stale assertion keeps the test focused on image-count persistence instead of locale-specific text. Constraint: TEST-s currently renders the generate button aria-label as Generate in this test setup Rejected: Change composer runtime label for the test | would alter UI behavior to satisfy a stale assertion Confidence: high Scope-risk: narrow Directive: Prefer stable accessible labels already used in adjacent composer tests Tested: npm run test:run -- src/components/__tests__/GenerateImageNode.test.tsx src/components/__tests__/GenerationComposer.test.tsx src/app/api/generate/providers/__tests__/newapiwg.test.ts Tested: git diff --check Not-tested: Full browser locale sweep --- src/components/__tests__/GenerationComposer.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/__tests__/GenerationComposer.test.tsx b/src/components/__tests__/GenerationComposer.test.tsx index d60ee0b1..8365f770 100644 --- a/src/components/__tests__/GenerationComposer.test.tsx +++ b/src/components/__tests__/GenerationComposer.test.tsx @@ -498,7 +498,7 @@ describe("GenerationComposer", () => { fireEvent.change(screen.getByRole("textbox"), { target: { value: "new root image candidates" }, }); - fireEvent.click(screen.getByLabelText("生成")); + fireEvent.click(screen.getByLabelText("Generate")); await waitFor(() => { expect(useWorkflowStore.getState().regenerateNode).toHaveBeenCalled();