import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';

describe('App Component', () => {
  it('renders header', () => {
    render(<App />);
    expect(screen.getByText(/Markdown Editor/i)).toBeInTheDocument();
  });

  it('renders file list', () => {
    render(<App />);
    expect(screen.getByText(/Files/i)).toBeInTheDocument();
  });

  it('renders editor', () => {
    render(<App />);
    expect(screen.getByPlaceholderText(/Start writing your markdown here/i)).toBeInTheDocument();
  });

  it('renders preview section', () => {
    render(<App />);
    expect(screen.getByText(/Preview/i)).toBeInTheDocument();
  });
});
