mirror of
https://github.com/langgenius/dify.git
synced 2026-05-25 03:17:15 +08:00
fix(web): name text generation retry action
This commit is contained in:
@ -151,10 +151,10 @@ describe('TextGenerationResultPanel', () => {
|
||||
values: baseProps.exportRes,
|
||||
}))
|
||||
expect(screen.getByText('share.generation.batchFailed.info:{"num":1}'))!.toBeInTheDocument()
|
||||
expect(screen.getByText('share.generation.batchFailed.retry'))!.toBeInTheDocument()
|
||||
expect(screen.getByRole('button', { name: 'share.generation.batchFailed.retry' }))!.toBeInTheDocument()
|
||||
expect(screen.getByRole('status', { name: 'appApi.loading' }))!.toBeInTheDocument()
|
||||
|
||||
fireEvent.click(screen.getByText('share.generation.batchFailed.retry'))
|
||||
fireEvent.click(screen.getByRole('button', { name: 'share.generation.batchFailed.retry' }))
|
||||
expect(handleRetryAllFailedTask).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
|
||||
@ -184,7 +184,13 @@ const TextGenerationResultPanel: FC<TextGenerationResultPanelProps> = ({
|
||||
<span aria-hidden className="i-ri-error-warning-fill h-4 w-4 text-text-destructive" />
|
||||
<div className="system-sm-medium text-text-secondary">{t('generation.batchFailed.info', { ns: 'share', num: allFailedTaskList.length })}</div>
|
||||
<div className="h-3.5 w-px bg-divider-regular"></div>
|
||||
<div onClick={handleRetryAllFailedTask} className="cursor-pointer system-sm-semibold-uppercase text-text-accent">{t('generation.batchFailed.retry', { ns: 'share' })}</div>
|
||||
<button
|
||||
type="button"
|
||||
className="inline cursor-pointer border-none bg-transparent p-0 text-left system-sm-semibold-uppercase text-text-accent focus-visible:ring-1 focus-visible:ring-components-input-border-active focus-visible:outline-hidden"
|
||||
onClick={handleRetryAllFailedTask}
|
||||
>
|
||||
{t('generation.batchFailed.retry', { ns: 'share' })}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user