mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-21 08:11:58 +00:00
复核套件骨架(前端):节点库加双盲复算、反方审稿(把关类,图标、配色、空配置,说明和卡片写明尚未生效,检查器照常打开)。路由加 /runs/compare(排在 /runs/:runId 前,标签页标题写「运行对比」)和 /schedules、/schedules/:id,都是页头加「功能开发中」的占位页;导航和命令面板在设置前加「定时任务」,快捷键 ⌥8,设置仍是 ⌥7;八个导航项在 480px 高的窗口里放不下,矮窗口的导航项从 40px 收到 36px。请求层从 api/client.ts 拆到 api/http.ts,client.ts 原样转出原有导出并加转请求函数;schedules、compare、bundle、inquiry、whatif 各一个空的命名空间文件,从 http.ts 取请求函数、挂到 api 上,不和 client.ts 互相导入。terms.ts 给各包占好文案块(RUN_COMPARE_TEXT 和配方对照的 COMPARE_TEXT 分开)。审批卡留两个插槽:payload.kind 为 dual_check 时的 DualCheckApproval,报告核对概况后面的 ChallengeSummary,都先返回 null。预览页自动收 dev/fixtures/*.tsx 导出的 cases,?syn= 先查这里再走原有用例。check-shell 跟着改导航项和快捷键的断言,check-copy 的 for_model 检查把 http.ts 和 client.ts 合起来看
This commit is contained in:
@@ -135,8 +135,11 @@ await section('导航', '=== 导航 ===', async () => {
|
||||
const box = await nav(page).boundingBox()
|
||||
check('导航宽 64px(w-16)', Math.round(box.width) === 64, `${box.width}`)
|
||||
const labels = await nav(page).locator('li > a[aria-keyshortcuts] > span:not([aria-hidden])').allInnerTexts()
|
||||
check('导航项:问数据、编排、记录、数据、工具、知识、设置',
|
||||
labels.join(',') === '问数据,编排,记录,数据,工具,知识,设置', labels.join(','))
|
||||
// 定时任务是后加的,排在设置前面;设置留在最底下,快捷键还是 ⌥7(定时任务用 ⌥8)
|
||||
check('导航项:问数据、编排、记录、数据、工具、知识、定时任务、设置',
|
||||
labels.join(',') === '问数据,编排,记录,数据,工具,知识,定时任务,设置', labels.join(','))
|
||||
const keys = await nav(page).locator('li > a[aria-keyshortcuts]').evaluateAll((els) => els.map((el) => el.getAttribute('aria-keyshortcuts')))
|
||||
check('设置仍是 ⌥7,定时任务是 ⌥8', keys[6] === 'Alt+8' && keys[7] === 'Alt+7', keys.join(','))
|
||||
const fontSize = await nav(page).locator('li > a[aria-keyshortcuts] > span:not([aria-hidden])').first()
|
||||
.evaluate((el) => getComputedStyle(el).fontSize)
|
||||
check('导航标签 11px', fontSize === '11px', fontSize)
|
||||
@@ -163,6 +166,8 @@ await section('导航', '=== 导航 ===', async () => {
|
||||
await page.locator('main').click({ position: { x: 600, y: 300 } }).catch(() => {})
|
||||
await page.keyboard.press('Alt+Digit3')
|
||||
check('⌥3 切到记录页', await page.waitForURL(/\/runs(\?|$)/, { timeout: 5000 }).then(() => true, () => false), page.url())
|
||||
await page.keyboard.press('Alt+Digit8')
|
||||
check('⌥8 切到定时任务页', await page.waitForURL(/\/schedules(\?|$)/, { timeout: 5000 }).then(() => true, () => false), page.url())
|
||||
|
||||
await page.goto(`${WEB}/settings/datasources`)
|
||||
check('旧地址 /settings/datasources 重定向到 /data', await page.waitForURL(/\/data(\/|$)/, { timeout: 8000 }).then(() => true, () => false), page.url())
|
||||
|
||||
Reference in New Issue
Block a user