File size: 705 Bytes
58973c7
 
fb17322
58973c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import '@testing-library/jest-dom';
import App from '../App';

describe('App', () => {
  test('renders main components', () => {
    render(<App />);
    
    // Check for title
    expect(screen.getByText('Simplify')).toBeInTheDocument();
    
    // Check for input fields
    expect(screen.getByLabelText('Source Documentation')).toBeInTheDocument();
    expect(screen.getByLabelText('Quiz topic?')).toBeInTheDocument();
    
    // Check for buttons
    expect(screen.getByText('Pull Source Docs')).toBeInTheDocument();
    expect(screen.getByText('Generate')).toBeInTheDocument();
  });
});