fix(web): localize error boundary copy (#34332)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
yyh
2026-03-31 08:41:20 +00:00
committed by GitHub
co-authored by copilot-swe-agent[bot]
parent f27d669f87
commit b54a0dc1e4
4 changed files with 71 additions and 16 deletions
@@ -3,9 +3,17 @@ import type { TriggerSubscription } from '@/app/components/workflow/block-select
import { fireEvent, render, screen } from '@testing-library/react'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { TriggerCredentialTypeEnum } from '@/app/components/workflow/block-selector/types'
import { createReactI18nextMock } from '@/test/i18n-mock'
import { SubscriptionList } from '../index'
import { SubscriptionListMode } from '../types'
vi.mock('react-i18next', () => createReactI18nextMock({
'errorBoundary.title': 'Something went wrong',
'errorBoundary.message': 'An unexpected error occurred while rendering this component.',
'errorBoundary.tryAgain': 'Try Again',
'errorBoundary.reloadPage': 'Reload Page',
}))
const mockRefetch = vi.fn()
let mockSubscriptionListError: Error | null = null
let mockSubscriptionListState: {
@@ -209,12 +217,12 @@ describe('SubscriptionList', () => {
})
describe('Edge Cases', () => {
it('should render error boundary fallback when an error occurs', () => {
it('should render error boundary fallback when an error occurs', async () => {
mockSubscriptionListError = new Error('boom')
render(<SubscriptionList />)
expect(screen.getByText('Something went wrong')).toBeInTheDocument()
expect(await screen.findByText('Something went wrong')).toBeInTheDocument()
})
})
})