session start works
This commit is contained in:
16
frontend/src/components/DesireForm.test.tsx
Normal file
16
frontend/src/components/DesireForm.test.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import DesireForm from './DesireForm';
|
||||
|
||||
test('renders desire submission form with input fields and submit button', () => {
|
||||
render(<DesireForm onSubmit={() => {}} />);
|
||||
|
||||
// Check for headings/labels for each category
|
||||
expect(screen.getByLabelText(/What you WANT/i)).toBeInTheDocument();
|
||||
expect(screen.getByLabelText(/What you ACCEPT/i)).toBeInTheDocument();
|
||||
expect(screen.getByLabelText(/What you DO NOT WANT/i)).toBeInTheDocument();
|
||||
|
||||
// Check for the submit button
|
||||
const submitButton = screen.getByRole('button', { name: /Submit Desires/i });
|
||||
expect(submitButton).toBeInTheDocument();
|
||||
});
|
||||
Reference in New Issue
Block a user