dify/web/app/components/datasets/__tests__/no-linked-apps-panel.spec.tsx

18 lines
579 B
TypeScript

import { render, screen } from '@testing-library/react'
import NoLinkedAppsPanel from '../no-linked-apps-panel'
vi.mock('@/context/i18n', () => ({
useDocLink: () => (path: string) => `https://docs.example.com${path}`,
}))
describe('NoLinkedAppsPanel', () => {
it('links to the knowledge integration documentation', () => {
render(<NoLinkedAppsPanel />)
expect(screen.getByRole('link', { name: 'common.datasetMenus.viewDoc' })).toHaveAttribute(
'href',
'https://docs.example.com/use-dify/knowledge/integrate-knowledge-within-application',
)
})
})