fix(project): 修复项目协作菜单入口和测试脚本问题
- 修复了项目协作菜单入口恢复后未验证路由刷新的问题 - 调整了测试边界说明,明确菜单权限调整不涉及业务单据修改 - 修复了Vue3遗留页面回归测试脚本中的代码顺序问题 - 确保了独立协作菜单入口不会恢复被移除的业务功能UI - 完善了项目模拟记录的相关测试验证机制
This commit is contained in:
parent
e78ed25668
commit
986b2b743e
@ -45,7 +45,7 @@ const html=`<!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="
|
||||
<section><h2>操作是否顺手、是否有歧义</h2><p>当前主流程与“一批货一个代采供应商、可跨项目、可分次送达”相符:先准备清单,后填供应商及报价,确认采购锁价;到货可按物品定位,也能按批次批量办理。已通过操作模拟验证正常路径以及失败后续办。</p><p>本轮消除了“完成却含失败”“到货后剩余不变”“失败后不让重试”“切换项目仍选着旧库存”等直接影响判断的问题。关键操作保留明确确认和结果,批量失败只重试失败项。</p><p>退货额度建议已落实:窗口直接显示<strong>当前可退数量</strong>,自动扣除已退货和已入库部分。已入库部分须先撤回;历史来源缺失时说明原因,不能直接提交。读取失败可重试,实际保存仍由后端锁内校验,避免多人同时操作时超退。</p></section>
|
||||
<section><h2>实际效果</h2><div class="shots"><a href="../vue3-procurement-lifecycle/partial-arrival-failure.png"><img src="../vue3-procurement-lifecycle/partial-arrival-failure.png" alt="部分到货成功、部分验收失败可续办">部分失败时保留成功结果,可单独重试</a><a href="../vue3-purchase-return/availability.png"><img src="../vue3-purchase-return/availability.png" alt="当前可退数量、已入库与已退货">真实可退数量及两种后续处理,1024×600 效果</a><a href="../vue3-production-flow/loan-return.png"><img src="../vue3-production-flow/loan-return.png" alt="借还数量与归还操作">借还连续操作模拟</a><a href="project-overview.png"><img src="project-overview.png" alt="项目总览及待办">项目详情加载恢复与待办</a></div><p><a href="../vue3-all-pages-audit/index.html">查看全部 ${pages.results.length} 个页面截图</a></p></section>
|
||||
<section><h2>${api.summary.total} 个接口明细</h2><p>认证通过只表示访问控制符合预期。下表区分实际读取、导出和未执行的真实写入,避免把“接口能响应”当作“全部业务条件均通过”。</p><input id="search" placeholder="筛选路径、方法或结果,如 loans、purchase、未执行"><div class="scroll"><table id="api"><thead><tr><th>方法</th><th>路径</th><th>登录校验</th><th>业务调用结果</th></tr></thead><tbody>${api.endpoints.map(r=>`<tr><td>${esc(r.method)}</td><td><code>${esc(r.path)}</code></td><td>${esc(resultLabel(r.tests.authentication?.result))}</td><td>${esc(resultLabel((r.tests.read||r.tests.export||r.tests.businessWrite)?.result))}${(r.tests.read||r.tests.export)?.message?`<br><span class="muted">${esc((r.tests.read||r.tests.export).message)}</span>`:''}${r.tests.read?.reason?`<br><span class="muted">${esc(r.tests.read.reason)}</span>`:''}</td></tr>`).join('')}</tbody></table></div></section>
|
||||
<section><h2>测试记录与边界</h2><p>数据库测试夹具均回滚,排除了会提交未来月份编号的并发测试。除用户要求移除的菜单及角色关联外,没有以测试名义改写现有项目、采购、库存或生产单据。正常登录/读取/导出可能留下系统访问审计日志。</p><p>未实际触发外部 AI 服务、执行定时任务、清空缓存/日志、重置真实用户密码、建数据库表、生成代码覆盖本机文件;这类接口做了认证检查,不能据此声称其真实操作结果已验收。${api.summary.missingFixtures} 个缺少有效样本/历史限制调用详见接口明细。此报告也不宣称覆盖了所有数据组合或完成压力测试。</p>
|
||||
<section><h2>测试记录与边界</h2><p>数据库测试夹具均回滚,排除了会提交未来月份编号的并发测试。菜单和专用权限的调整不涉及现有项目、采购、库存或生产单据。用户澄清后,项目协作菜单入口已恢复;此次仅恢复入口,未扩大角色授权,已单独验证路由、刷新和菜单树。正常登录/读取/导出可能留下系统访问审计日志。</p><p>未实际触发外部 AI 服务、执行定时任务、清空缓存/日志、重置真实用户密码、建数据库表、生成代码覆盖本机文件;这类接口做了认证检查,不能据此声称其真实操作结果已验收。${api.summary.missingFixtures} 个缺少有效样本/历史限制调用详见接口明细。此报告也不宣称覆盖了所有数据组合或完成压力测试。</p>
|
||||
<details><summary>前端 ${ui.selected} 组回归</summary><table>${ui.results.map(r=>`<tr><td>${esc(r.file)}</td><td>${esc(r.status)}</td><td>${r.seconds}s</td></tr>`).join('')}</table></details>
|
||||
<details><summary>后端 ${totals.tests} 项测试,${suites.length} 个测试类</summary><table>${suites.map(r=>`<tr><td>${esc(r.name.replace('com.ruoyi.',''))}</td><td>${r.tests} 项</td><td>失败 ${r.failures} / 错误 ${r.errors}</td></tr>`).join('')}</table></details>
|
||||
<p><a href="api-results.json">接口 JSON</a> · <a href="ui-results.json">前端回归 JSON</a> · <a href="../vue3-production-flow/result.json">生产/借还模拟记录</a> · <a href="project-flow.json">项目模拟记录</a></p></section></main>
|
||||
|
||||
@ -21,13 +21,13 @@ const {chromium,frontend,backend,username,password}=require('./vue3-test-runtime
|
||||
await page.goto(frontend+'/index');await page.waitForLoadState('networkidle')
|
||||
assert.ok(await page.locator('.home-stat-icon svg').count()>0,'statistics use visible SVG icons');assert.ok(await page.locator('.home-shortcut svg').count()>0)
|
||||
const lists=[['system/config/index.vue','/system/config/list'],['system/dept/index.vue','/system/dept/list'],['system/menu/index.vue','/system/menu/list'],['system/post/index.vue','/system/post/list'],['system/role/index.vue','/system/role/list'],['system/user/index.vue','/system/user/list'],['system/dict/index.vue','/system/dict/type/list'],['system/dict/data.vue','/system/dict/data/list'],['monitor/logininfor/index.vue','/monitor/logininfor/list'],['monitor/online/index.vue','/monitor/online/list'],['monitor/operlog/index.vue','/monitor/operlog/list'],['monitor/job/index.vue','/monitor/job/list'],['monitor/job/log.vue','/monitor/jobLog/list'],['tool/gen/index.vue','/tool/gen/list']]
|
||||
await page.evaluate(async lists=>{const router=document.querySelector('#app').__vue_app__.config.globalProperties.$router,{default:Layout}=await import('/src/layout/index.vue');for(let i=0;i<lists.length;i++){const component=(await import('/src/views/'+lists[i][0])).default;router.addRoute({path:'/_legacy/'+i,component:Layout,children:[{path:lists[i][0]==='system/dict/data.vue'?':dictId':'',component,meta:{noCache:true}}]})}},lists)
|
||||
async function navigate(url){await page.evaluate(async url=>{await document.querySelector('#app').__vue_app__.config.globalProperties.$router.push(url)},url);await page.waitForLoadState('networkidle')}
|
||||
await navigate('/project/collaboration')
|
||||
await page.locator('.collaboration-entry').getByText('项目协作功能待接入',{exact:true}).waitFor()
|
||||
assert.equal(await page.locator('.collaboration-entry .project-workspace').count(),0,'independent entry must not restore the removed replacement business UI')
|
||||
await page.reload();await page.locator('.collaboration-entry').getByText('项目协作功能待接入',{exact:true}).waitFor()
|
||||
console.log('PASS independent collaboration menu entry resolves and refreshes without restoring removed business functions')
|
||||
await page.evaluate(async lists=>{const router=document.querySelector('#app').__vue_app__.config.globalProperties.$router,{default:Layout}=await import('/src/layout/index.vue');for(let i=0;i<lists.length;i++){const component=(await import('/src/views/'+lists[i][0])).default;router.addRoute({path:'/_legacy/'+i,component:Layout,children:[{path:lists[i][0]==='system/dict/data.vue'?':dictId':'',component,meta:{noCache:true}}]})}},lists)
|
||||
for(let i=0;i<lists.length;i++){
|
||||
console.log('CHECK retry',lists[i][0])
|
||||
failingPath=lists[i][1];await navigate('/_legacy/'+i+(lists[i][0]==='system/dict/data.vue'?'/1':''))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user