Files
lcbp3/frontend/components/dashboard/__tests__/quick-actions.test.tsx
T
admin db16c95019
CI / CD Pipeline / build (push) Failing after 7m26s
CI / CD Pipeline / deploy (push) Has been skipped
690617:1443 237 #01.3
2026-06-17 14:43:30 +07:00

28 lines
1.0 KiB
TypeScript

// File: frontend/components/dashboard/__tests__/quick-actions.test.tsx
import React from 'react';
import { render, screen } from '@testing-library/react';
import { describe, it, expect } from 'vitest';
import { QuickActions } from '../quick-actions';
// Mock Next.js Link component
vi.mock('next/link', () => ({
default: ({ children, href }: { children: React.ReactNode; href: string }) => (
<a href={href}>{children}</a>
)
}));
describe('QuickActions', () => {
it('renders all quick action links correctly', () => {
render(<QuickActions />);
const newRfaLink = screen.getByRole('link', { name: /new rfa/i });
expect(newRfaLink).toHaveAttribute('href', '/rfas/new');
const newCorrespondenceLink = screen.getByRole('link', { name: /new correspondence/i });
expect(newCorrespondenceLink).toHaveAttribute('href', '/correspondences/new');
const uploadDrawingLink = screen.getByRole('link', { name: /upload drawing/i });
expect(uploadDrawingLink).toHaveAttribute('href', '/drawings/upload');
});
});