import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { render, screen } from '@testing-library/react';
import CoursesPage from '../app/courses/page';

describe('Courses Page', () => {
  it('should render courses page', () => {
    render(<CoursesPage />);
    const heading = screen.getByText(/学堂|课程/i);
    expect(heading).toBeInTheDocument();
  });

  it('should render loading state initially', () => {
    render(<CoursesPage />);
    // 应该有加载指示器或内容
    const loading = screen.queryByRole('status');
    expect(loading || screen.getByText(/学堂|课程/i)).toBeTruthy();
  });
});
