Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix(web): name assigner add operation (#40337)

yyh1017a76b4c70
diff --git a/web/app/components/workflow/nodes/assigner/__tests__/panel.spec.tsx b/web/app/components/workflow/nodes/assigner/__tests__/panel.spec.tsx
index 72603335b92..9876ecd8926 100644
--- a/web/app/components/workflow/nodes/assigner/__tests__/panel.spec.tsx
+++ b/web/app/components/workflow/nodes/assigner/__tests__/panel.spec.tsx
@@ -105,7 +105,7 @@ describe('assigner/panel', () => {
}),
)
- await user.click(screen.getAllByRole('button')[0]!)
+ await user.click(screen.getByRole('button', { name: 'common.operation.add' }))
expect(mockUseHandleAddOperationItem).toHaveBeenCalledWith(createData().items)
expect(handleOperationListChanges).toHaveBeenCalledWith([
diff --git a/web/app/components/workflow/nodes/assigner/panel.tsx b/web/app/components/workflow/nodes/assigner/panel.tsx
index 9d0feb6d4b2..10585a8aa3b 100644
--- a/web/app/components/workflow/nodes/assigner/panel.tsx
+++ b/web/app/components/workflow/nodes/assigner/panel.tsx
@@ -38,8 +38,11 @@ const Panel: FC<NodePanelProps<AssignerNodeType>> = ({ id, data }) => {
<div className="flex grow flex-col items-start justify-center system-sm-semibold-uppercase text-text-secondary">
{t(($) => $[`${i18nPrefix}.variables`], { ns: 'workflow' })}
</div>
- <ActionButton onClick={handleAddOperation}>
- <RiAddLine className="size-4 shrink-0 text-text-tertiary" />
+ <ActionButton
+ aria-label={t(($) => $['operation.add'], { ns: 'common' })}
+ onClick={handleAddOperation}
+ >
+ <RiAddLine aria-hidden="true" className="size-4 shrink-0 text-text-tertiary" />
</ActionButton>
</div>
<VarList