test(m3): 集成/e2e 增补三模块用例并更新测试记录

- 新增 e2e:settings_flow(改名→登出→登录页即时生效→finally 还原防污染)、
  secondary_allocation_flow(建客户/员→录两行 30%+40%→编辑回显与合计条
  余额提示→删除清理;宽视口防弹窗遮挡、alloc-table 专属类防选择器错位)
- 修复 e2e 首跑抓出的两处缺陷:① public 端点 300s 响应缓存让登录页拿旧
  公司名(登录页改时间戳 fetch + cache:no-store,手动解包信封)② logo 同
  扩展名覆盖时先写后删(清理移到写入前且仅异扩展名执行)
- 分配表加 alloc-table 专属类(与产品明细 items-table 区分)
- 全量回归 697 passed(基线 625 + 72);e2e 七脚本全过(既有五脚本回归 +
  两个新增);pnpm type-check 零错误
- tests/README.md 增 M3 节(44 例明细)/运行记录/缺陷 3 行;frontend/
  README.md 增 M3 e2e 节

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
liuwenxinandClaude Code committed 2026-10-16 12:01:52 +08:00
1 parent b5e27810fd
commit fc8a42bcd9
7 files changed
+414 -8

No files matched your search

+8 -2
View File
@@ -34,7 +34,13 @@ export function uploadLogo(file: File): Promise<CompanySettings> {
})
}
/** 登录页消费:无令牌也可调用(后端白名单端点) */
/** 登录页消费:无令牌也可调用(后端白名单端点)。
* 请求头 no-cache:要求中间层/浏览器重校验而非直接用缓存副本 —— 公司名
* 保存后应立即可见,不能因 300s 短缓存拿到旧值。 */
export function getPublicSettings(): Promise<PublicSettings> {
return request({ url: '/v1/system/settings/public', method: 'get' })
return request({
url: '/v1/system/settings/public',
method: 'get',
headers: { 'Cache-Control': 'no-cache' },
})
}
@@ -835,7 +835,7 @@ onMounted(() => {
</span>
<el-button size="small" @click="addAllocationRow">添加参与人</el-button>
</div>
<el-table :data="allocationRows" stripe size="small" class="items-table">
<el-table :data="allocationRows" stripe size="small" class="items-table alloc-table">
<el-table-column label="参与业务员" min-width="200">
<template #default="{ row }">
<el-select
+14 -3
View File
@@ -4,7 +4,6 @@ import { onMounted, reactive, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { getCaptcha } from '@/api/auth'
import { getPublicSettings } from '@/api/settings'
import { useUserStore } from '@/store/user'
const router = useRouter()
@@ -30,9 +29,21 @@ const brandLogo = ref<string | null>(null)
async function loadBrand(): Promise<void> {
try {
const data = await getPublicSettings()
// 登录页必须拿到最新公司名(保存后立即生效):public 端点带 300s
// 响应缓存,axios 可能命中浏览器缓存副本。这里用带时间戳的原生
// fetch 绕过磁盘缓存,手动解包统一信封(与 request 拦截器同口径)。
const resp = await fetch(
`/api/v1/system/settings/public?_=${Date.now()}`,
{ cache: 'no-store' },
)
if (!resp.ok) throw new Error(String(resp.status))
const body = (await resp.json()) as {
code: number
data: { company_name?: string; logo_url?: string | null }
}
const data = body.data
if (data.company_name) brandName.value = data.company_name
brandLogo.value = data.logo_url
brandLogo.value = data.logo_url ?? null
} catch {
// 登录页必须可用:公司信息接口失败时静默回退默认品牌名,不阻断登录
}