import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import Header from '../header';

describe('Header Component', () => {
  it('should render navigation links', () => {
    render(<Header />);
    
    // 检查关键导航链接
    const homeLink = screen.getByText(/首页|Home/i);
    expect(homeLink).toBeInTheDocument();
    
    const coursesLink = screen.getByText(/学堂|课程/i);
    expect(coursesLink).toBeInTheDocument();
    
    const promptsLink = screen.getByText(/提示词/i);
    expect(promptsLink).toBeInTheDocument();
  });

  it('should have login link when not logged in', () => {
    render(<Header />);
    const loginLink = screen.getByText(/登录|Login/i);
    expect(loginLink).toBeInTheDocument();
  });
});
