Initial Phoenix Sankofa Cloud setup
- Complete project structure with Next.js frontend - GraphQL API backend with Apollo Server - Portal application with NextAuth - Crossplane Proxmox provider - GitOps configurations - CI/CD pipelines - Testing infrastructure (Vitest, Jest, Go tests) - Error handling and monitoring - Security hardening - UI component library - Documentation
This commit is contained in:
50
src/components/ui/card.test.tsx
Normal file
50
src/components/ui/card.test.tsx
Normal file
@@ -0,0 +1,50 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { render, screen } from '@/lib/test-utils'
|
||||
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './card'
|
||||
|
||||
describe('Card Components', () => {
|
||||
it('should render Card with children', () => {
|
||||
render(
|
||||
<Card>
|
||||
<p>Card content</p>
|
||||
</Card>
|
||||
)
|
||||
expect(screen.getByText('Card content')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should render CardHeader with title and description', () => {
|
||||
render(
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>Card Title</CardTitle>
|
||||
<CardDescription>Card Description</CardDescription>
|
||||
</CardHeader>
|
||||
</Card>
|
||||
)
|
||||
expect(screen.getByText('Card Title')).toBeInTheDocument()
|
||||
expect(screen.getByText('Card Description')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should render CardContent', () => {
|
||||
render(
|
||||
<Card>
|
||||
<CardContent>
|
||||
<p>Content here</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
expect(screen.getByText('Content here')).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should render CardFooter', () => {
|
||||
render(
|
||||
<Card>
|
||||
<CardFooter>
|
||||
<button>Action</button>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
)
|
||||
expect(screen.getByRole('button', { name: /action/i })).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user