mirror of
https://github.com/langgenius/dify.git
synced 2026-02-20 01:44:42 +08:00
16 lines
639 B
TypeScript
16 lines
639 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()
|
|
})
|
|
})
|