50 lines
1.5 KiB
Markdown
50 lines
1.5 KiB
Markdown
|
|
# T713 — product delete impact ui watch tests
|
|||
|
|
|
|||
|
|
> Status: `done`
|
|||
|
|
> Milestone: `M1` · Phase B
|
|||
|
|
> Kind: `test` · Est. change: `~170 lines`
|
|||
|
|
|
|||
|
|
## Goal
|
|||
|
|
|
|||
|
|
讓 Product 刪除前後的 radar 影響清楚可見,並完成 Phase B watch 流程驗收。
|
|||
|
|
|
|||
|
|
## Depends on
|
|||
|
|
|
|||
|
|
- T711、T712
|
|||
|
|
|
|||
|
|
## Inputs
|
|||
|
|
|
|||
|
|
- `apps/web/src/pages/BrandsPage.tsx`、`RadarWatchesPage.tsx`
|
|||
|
|
- `../spec.md` §3.5、驗收 #9
|
|||
|
|
|
|||
|
|
## Outputs
|
|||
|
|
|
|||
|
|
| 路徑 | 動作 | 說明 |
|
|||
|
|
|------|------|------|
|
|||
|
|
| `apps/web/src/pages/BrandsPage.tsx` | edit | delete confirm 顯示受影響 watch 數與保留歷史說明 |
|
|||
|
|
| `apps/web/src/pages/BrandsPage.test.tsx` | edit/add | cancel/confirm/failure cases |
|
|||
|
|
| `apps/web/src/pages/RadarWatchesPage.test.tsx` | edit | unavailable badge、resume disabled、clone action |
|
|||
|
|
| `apps/web/src/lib/i18n/messages.ts` | edit | TC/EN 影響文案 |
|
|||
|
|
|
|||
|
|
## Behavior
|
|||
|
|
|
|||
|
|
- 刪除失敗不移除 Product 卡片,也不假裝 watch 已安全處理。
|
|||
|
|
- unavailable watch 顯示快照名稱、pause reason 與建立新 watch 動作。
|
|||
|
|
|
|||
|
|
## Out of scope
|
|||
|
|
|
|||
|
|
- 後端刪除副作用(T755)
|
|||
|
|
- 全部結果歷史卡片
|
|||
|
|
|
|||
|
|
## Acceptance
|
|||
|
|
|
|||
|
|
- [x] spec #9 mock 流程通過;M1 全頁無 emoji 主 icon。
|
|||
|
|
|
|||
|
|
```bash
|
|||
|
|
cd apps/web && npm run test -- BrandsPage RadarWatchesPage && npm run build && npm run lint
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
Implementation result (2026-08-10): Product deletion now queries affected radar
|
|||
|
|
watches before confirmation and explains pause/history impact; failed deletion
|
|||
|
|
leaves the product card intact. Unavailable watches show snapshot and cannot resume.
|