feat(ui06): B2 shared components + B3a core pages — album cards, photo grid, viewer, summary header

- 类型补齐契约字段:Summary.cover / AdminPhoto.preview(SignedUrl;服务端已返回,B0 核对)
- AlbumCoverCard:封面卡(公开/状态/上传 pill,无封面中性占位,不显示 owner 名)
- 相册列表:默认封面卡片网格(3列/1700+4列)+ 表格切换 + 已加载内搜索 + 公开状态筛选 + 摘要行
- AlbumSummaryHeader:300×144 封面 + 两列紧凑资料 + 高级折叠(ownerId/统计时间收敛)
- 详情页壳:页头(编辑/分享固定主操作)替换 ElDescriptions 大区;banner 区 B3c 收纳
- PhotoGrid + PhotoPreviewDialog:照片网格默认(preview.thumb 签名 URL)+ 深色大图(browse URL、
  行内隐藏/恢复/软删除复用表格状态机);网格勾选与表格 selection 合并批量目标
- e2e 适配默认网格视图(albums/governance 断言前切表格);batchHide fixture 补 preview
- typecheck/lint/vitest 87 项全绿

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-22 23:19:21 +08:00
parent cebe3d1e2e
commit 4f6790d630
13 changed files with 1767 additions and 215 deletions
+4
View File
@@ -26,6 +26,8 @@ async function createAlbumViaUi(page: Page): Promise<string> {
await page.keyboard.press('Enter')
await page.getByTestId('album-form-submit').click()
await expect(page.getByTestId('album-form-dialog')).toBeHidden()
// UI06:列表默认封面卡片网格;表格断言前先切换
await page.getByTestId('album-view-table').click()
await expect(
page.getByTestId('album-list-table').getByText(`E2E治理相册 ${suffix}`)
).toBeVisible()
@@ -78,6 +80,8 @@ test('批量隐藏:多选 2 → 汇总 toast + 行原位已隐藏 + 公开列
seedFixture('gov-photos', albumId, adminCredentials().account, '3')
await page.reload()
// UI06:照片默认网格视图;表格断言前先切换
await page.getByTestId('photo-view-table').click()
await expect(page.getByTestId('photo-list-table')).toBeVisible()
const rows = page.getByTestId('photo-list-table').locator('tbody tr')
await expect(rows).toHaveCount(3)
+4
View File
@@ -26,6 +26,8 @@ async function createAlbumViaUi(page: Page): Promise<string> {
await page.keyboard.press('Enter')
await page.getByTestId('album-form-submit').click()
await expect(page.getByTestId('album-form-dialog')).toBeHidden()
// UI06:列表默认封面卡片网格;表格断言前先切换
await page.getByTestId('album-view-table').click()
await expect(page.getByTestId('album-list-table').getByText(`E2E相册 ${suffix}`)).toBeVisible()
return suffix
}
@@ -99,6 +101,8 @@ test('详情:邀请成员 → 建分类 → 传 banner → 照片管理(隐
// ── 照片管理:直种两种状态 → 列表可见 → 隐藏已发布照片 ──
seedFixture('photos', albumId, adminCredentials().account)
await page.reload()
// UI06:照片默认网格视图;表格断言前先切换
await page.getByTestId('photo-view-table').click()
await expect(page.getByTestId('photo-list-table')).toBeVisible()
// 用处理状态标签(就绪)锚定行:隐藏后行的可见性文案变化,锚点保持稳定