34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
/*
|
|
* File: CaseQueue.test.tsx
|
|
* Description: Test for CaseQueue component
|
|
* Design & Developed by Tech4Biz Solutions
|
|
* Copyright (c) Spurrin Innovations. All rights reserved.
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { render, fireEvent } from '@testing-library/react-native';
|
|
import CaseQueue from '../components/CaseQueue';
|
|
|
|
const mockCases = [
|
|
{ id: '1', patientName: 'John Doe', status: 'critical', aiConfidence: 93, description: 'Head trauma' },
|
|
{ id: '2', patientName: 'Jane Smith', status: 'routine', aiConfidence: 99, description: 'Headache' },
|
|
];
|
|
|
|
describe('CaseQueue', () => {
|
|
it('renders cases', () => {
|
|
const { getByText } = render(<CaseQueue cases={mockCases} onSelect={() => {}} />);
|
|
expect(getByText('John Doe')).toBeTruthy();
|
|
expect(getByText('Jane Smith')).toBeTruthy();
|
|
});
|
|
|
|
it('renders empty state', () => {
|
|
const { getByText } = render(<CaseQueue cases={[]} onSelect={() => {}} />);
|
|
expect(getByText('No cases in queue.')).toBeTruthy();
|
|
});
|
|
});
|
|
|
|
/*
|
|
* End of File: CaseQueue.test.tsx
|
|
* Design & Developed by Tech4Biz Solutions
|
|
* Copyright (c) Spurrin Innovations. All rights reserved.
|
|
*/
|