Browse Source

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
feature/canvas-chatbot-copilot
jiajia 2 months ago
parent
commit
fff42a1819
  1. 2
      src/components/__tests__/GenerationComposer.test.tsx

2
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();

Loading…
Cancel
Save