refactor(workflow): migrate legacy toast usage to ui toast (#34002)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
yyh
2026-03-25 12:42:18 +08:00
committed by GitHub
parent a9f2fb86a3
commit d7e49c388c
55 changed files with 329 additions and 426 deletions

View File

@ -49,9 +49,12 @@ vi.mock('@/service/use-tools', () => ({
// Mock Toast - need to verify notification calls
const mockToastNotify = vi.fn()
vi.mock('@/app/components/base/toast', () => ({
default: {
notify: (options: { type: string, message: string }) => mockToastNotify(options),
vi.mock('@/app/components/base/ui/toast', () => ({
toast: {
success: (message: string) => mockToastNotify({ type: 'success', message }),
error: (message: string) => mockToastNotify({ type: 'error', message }),
warning: (message: string) => mockToastNotify({ type: 'warning', message }),
info: (message: string) => mockToastNotify({ type: 'info', message }),
},
}))