feat: Phase 1-3 全部完成 — 沙盒增强、学情分析、学习路径
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user