103 lines
2.9 KiB
Markdown
103 lines
2.9 KiB
Markdown
# 测试方案
|
||
|
||
时间戳:2026-05-04-03-08-20
|
||
|
||
## 测试目标
|
||
|
||
验证 title、favicon、登录页 logo、左侧栏 logo 修改生效,并确认项目部署到 `http://192.168.3.11:4000/`。
|
||
|
||
## 静态检查
|
||
|
||
- 检查 `WebSite/public/logo.png` 是否存在。
|
||
- 检查 `WebSite/index.html`:
|
||
- `<title>` 为 `模型逆向系统`。
|
||
- favicon 指向 `/logo.png`。
|
||
- 检查 `WebSite/src/components/Login.tsx`:
|
||
- 登录页顶部使用 `/logo.png`。
|
||
- 登录页主标题为 `模型逆向系统`。
|
||
- 检查 `WebSite/src/components/Sidebar.tsx`:
|
||
- 左上角使用 `/logo.png`。
|
||
- 左上角文字为 `模型逆向系统`。
|
||
|
||
## 构建验证
|
||
|
||
在 `WebSite/` 下执行:
|
||
|
||
```bash
|
||
npm run build
|
||
```
|
||
|
||
预期结果:
|
||
|
||
- Vite 构建成功。
|
||
- 不出现 TypeScript 编译错误。
|
||
|
||
## 部署验证
|
||
|
||
执行端口检查:
|
||
|
||
```bash
|
||
ss -ltnp | rg ':4000\b' || true
|
||
```
|
||
|
||
使用 `tmux` 启动服务:
|
||
|
||
```bash
|
||
tmux new-session -d -s revoxelseg-dicom 'cd /home/wkmgc/Desktop/ReVoxelSeg_DICOM/WebSite && node ./node_modules/vite/bin/vite.js --host 0.0.0.0 --port 4000 --strictPort'
|
||
```
|
||
|
||
验证 HTTP 响应:
|
||
|
||
```bash
|
||
curl -I http://127.0.0.1:4000/
|
||
curl -I http://192.168.3.11:4000/
|
||
```
|
||
|
||
预期结果:
|
||
|
||
- 两个地址均返回 `HTTP/1.1 200 OK`。
|
||
|
||
## 页面验证
|
||
|
||
- 打开 `http://192.168.3.11:4000/`。
|
||
- 浏览器标签标题显示 `模型逆向系统`。
|
||
- 标签页图标显示用户提供的 logo。
|
||
- 登录页顶部显示用户提供的 logo。
|
||
- 登录后左上角显示用户提供的 logo。
|
||
- 折叠侧边栏后 logo 不变形、不溢出。
|
||
|
||
## 回归风险
|
||
|
||
- logo 图片尺寸较大时可能影响布局,需要通过固定容器尺寸和 `object-contain` 控制。
|
||
- favicon 可能受浏览器缓存影响,需要强制刷新或无痕窗口验证。
|
||
- 端口切换可能导致旧 `3001` 地址不再访问当前项目。
|
||
|
||
## 人工审核状态
|
||
|
||
已确认并执行。
|
||
|
||
确认记录:
|
||
|
||
- 用户已回复 `确认执行`。
|
||
|
||
## 执行结果
|
||
|
||
- `WebSite/public/logo.png` 已创建,图片为用户提供的 logo,格式为 PNG RGBA,尺寸 `429 x 429`。
|
||
- `WebSite/index.html` 已更新:
|
||
- favicon 指向 `/logo.png`。
|
||
- title 为 `模型逆向系统`。
|
||
- `WebSite/src/components/Login.tsx` 已更新:
|
||
- 登录页顶部使用 `/logo.png`。
|
||
- 登录页主标题为 `模型逆向系统`。
|
||
- `WebSite/src/components/Sidebar.tsx` 已更新:
|
||
- 左上角使用 `/logo.png`。
|
||
- 左上角文字保持为 `模型逆向系统`。
|
||
- `npm run build` 执行成功。
|
||
- `npm run lint` 执行成功。
|
||
- Vite 构建仍有大 chunk 警告,当前不影响本次 logo/title 修改。
|
||
- 已关闭旧的 `revoxelseg-dicom` 部署会话,并使用同名 `tmux` 会话部署到 `4000`。
|
||
- `curl -I http://127.0.0.1:4000/` 返回 `HTTP/1.1 200 OK`。
|
||
- `curl -I http://192.168.3.11:4000/` 返回 `HTTP/1.1 200 OK`。
|
||
- `curl -I http://127.0.0.1:4000/logo.png` 返回 `HTTP/1.1 200 OK` 且 `Content-Type: image/png`。
|
||
- 当前监听端口确认:`0.0.0.0:4000`。
|