dify/web/app/components/header/account-setting/api-based-extension-page/empty.spec.tsx
Novice cbdcdcc2b9
fix: resolve test failures after segment 2 merge
- Backend: fix deduct_llm_quota import path in llm node
- Backend: update core.variables → core.workflow.variables imports
- Frontend: update UpdateWorkflowNodesMapPayload in tests
- Frontend: fix various test expectations to match merged code

Made-with: Cursor
2026-03-23 09:18:26 +08:00

19 lines
711 B
TypeScript

import { render, screen } from '@testing-library/react'
import Empty from './empty'
describe('Empty State', () => {
describe('Rendering', () => {
it('should render title and documentation link', () => {
// Act
render(<Empty />)
// Assert
expect(screen.getByText('common.apiBasedExtension.title')).toBeInTheDocument()
const link = screen.getByText('common.apiBasedExtension.link')
expect(link).toBeInTheDocument()
// The real useDocLink includes the language prefix (defaulting to /en in tests)
expect(link.closest('a')).toHaveAttribute('href', 'https://docs.bash-is-all-you-need.dify.dev/en/use-dify/workspace/api-extension/api-extension')
})
})
})