mirror of
https://github.com/langgenius/dify.git
synced 2026-07-31 17:29:37 +08:00
21 lines
675 B
TypeScript
21 lines
675 B
TypeScript
import { render, screen } from '@testing-library/react'
|
|
import { EncryptedBottom } from '..'
|
|
|
|
describe('EncryptedBottom', () => {
|
|
it('applies custom class names', () => {
|
|
const { container } = render(<EncryptedBottom className="custom-class" />)
|
|
expect(container.firstChild).toHaveClass('custom-class')
|
|
})
|
|
|
|
it('passes keys', async () => {
|
|
render(
|
|
<EncryptedBottom
|
|
frontTextKey="provider.encrypted.front"
|
|
backTextKey="provider.encrypted.back"
|
|
/>,
|
|
)
|
|
expect(await screen.findByText(/provider.encrypted.front/i)).toBeInTheDocument()
|
|
expect(await screen.findByText(/provider.encrypted.back/i)).toBeInTheDocument()
|
|
})
|
|
})
|