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 snippet stop action (#40278)

yyh6f95a071b548
diff --git a/web/app/components/snippets/components/snippet-header/__tests__/run-mode.spec.tsx b/web/app/components/snippets/components/snippet-header/__tests__/run-mode.spec.tsx
index d1c75ce93a2..4babf339fc8 100644
--- a/web/app/components/snippets/components/snippet-header/__tests__/run-mode.spec.tsx
+++ b/web/app/components/snippets/components/snippet-header/__tests__/run-mode.spec.tsx
@@ -74,7 +74,9 @@ describe('RunMode', () => {
expect(screen.getByRole('button', { name: /workflow\.common\.running/i })).toBeDisabled()
- await user.click(screen.getAllByRole('button')[1]!)
+ await user.click(
+ screen.getByRole('button', { name: /workflow\.debug\.variableInspect\.trigger\.stop/i }),
+ )
expect(workflowHookMocks.handleStopRun).toHaveBeenCalledWith('task-1')
@@ -109,7 +111,9 @@ describe('RunMode', () => {
},
})
- await user.click(screen.getAllByRole('button')[1]!)
+ await user.click(
+ screen.getByRole('button', { name: /workflow\.debug\.variableInspect\.trigger\.stop/i }),
+ )
expect(workflowHookMocks.handleStopRun).toHaveBeenCalledWith('')
})
diff --git a/web/app/components/snippets/components/snippet-header/run-mode.tsx b/web/app/components/snippets/components/snippet-header/run-mode.tsx
index bce7af0988c..756b50e50be 100644
--- a/web/app/components/snippets/components/snippet-header/run-mode.tsx
+++ b/web/app/components/snippets/components/snippet-header/run-mode.tsx
@@ -62,6 +62,7 @@ const RunMode = ({ text }: RunModeProps) => {
{isRunning && (
<button
type="button"
+ aria-label={t(($) => $['debug.variableInspect.trigger.stop'], { ns: 'workflow' })}
className="flex size-7 items-center justify-center rounded-r-md bg-state-accent-active"
onClick={handleStop}
>