Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions recos/src/app/analytics/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function CandidateReportPage() {
<div className="min-h-screen bg-gray-50">
<div className="w-full mx-auto px-4 py-6">
<div className="flex items-center justify-between mb-6">
<h1 className="text-2xl font-extrabold text-gray-800">Candidate Report</h1>
<h1 className="text-2xl font-extrabold text-gray-800">Johnny Gait</h1>
</div>

<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
Expand Down Expand Up @@ -103,11 +103,11 @@ export default function CandidateReportPage() {
<div className="flex items-center gap-3">
<span className="inline-block w-10 h-10 bg-gray-200 rounded-full" aria-label="avatar" />
<div>
<div className="text-sm font-semibold text-gray-700">{candidate.name}</div>
<div className="text-xs text-gray-500">{job.job_title} • ID {candidate.id}</div>
<div className="text-xl font-semibold text-gray-700">{candidate.name}</div>
<div className="text-xl text-gray-500">{job.job_title} • ID {candidate.id}</div>
</div>
</div>
<span className="px-3 py-1.5 text-xs font-semibold rounded-full bg-blue-50 text-blue-700 border border-blue-100">
<span className="px-3 py-1.5 text-xl font-semibold rounded-full bg-blue-50 text-blue-700 border border-blue-100">
Overall fit: {analysis.overall}
</span>
</div>
Expand Down
17 changes: 17 additions & 0 deletions recos/src/app/hooks/useFetchInterviews.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,22 @@ describe('useFetchInterviews', () => {
{ id: 1, candidate_id: 11, scheduled_at: '2025-10-01T10:00:00Z', created_at: '2025-09-20T10:00:00Z' },
{ id: 2, candidate_id: 12, scheduled_at: '2025-10-02T11:00:00Z' }
];
const expectedEvents = mockData.map(item => ({
id: item.id || item.candidate_id || 0,
date: item.scheduled_at,
scheduled_at: item.scheduled_at,
label: "Interview",
candidate_name: "",
candidate_email: "",
description: undefined,
duration: undefined,
status: undefined,
interview_link: undefined,
google_calendar_link: undefined,
calendar_event: undefined,
created_at: item.created_at,
position: "",
}));

(useToken as jest.Mock).mockReturnValue(mockToken);
(fetchInterviews as jest.Mock).mockResolvedValue(mockData);
Expand All @@ -28,6 +44,7 @@ describe('useFetchInterviews', () => {
await waitFor(() => {
expect(result.current.loading).toBe(false);
expect(result.current.error).toBe(null);
expect(result.current.events).toEqual(expectedEvents);
});
});
test('should handle fetch error', async () => {
Expand Down