From 3030ee15a888c5c32bd3cfc889b230b9083514f3 Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Fri, 18 Sep 2026 18:11:53 +0800 Subject: [实现方案] round6 守门与验证:token 白名单测试、旅程重排断言、probe 全旅程步进(artifacts/ui-round6)与迁移文档 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/scripts/ui-auth-shots.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'frontend/scripts/ui-auth-shots.mjs') diff --git a/frontend/scripts/ui-auth-shots.mjs b/frontend/scripts/ui-auth-shots.mjs index abd1f3a..c56293a 100644 --- a/frontend/scripts/ui-auth-shots.mjs +++ b/frontend/scripts/ui-auth-shots.mjs @@ -12,7 +12,7 @@ import path from 'node:path'; import http from 'node:http'; import { execSync } from 'node:child_process'; -const outDir = path.resolve(process.argv[2] || '../artifacts/ui-shadcn-round2'); +const outDir = path.resolve(process.argv[2] || '../artifacts/ui-round6'); const skipBuild = process.env._SKIP_BUILD === '1'; if (!skipBuild) { @@ -237,11 +237,15 @@ for (const w of widths) { await page.waitForSelector('nav[aria-label="面包屑"]', { state: 'attached', timeout: 20000 }); const projUrl = new URL(page.url()); const projHash = projUrl.hash; - for (const tab of ['data', 'strategy', 'results']) { + for (const tab of ['data', 'strategy', 'backtest', 'results']) { await page.evaluate(function (h) { location.hash = h; }, projHash.replace(/\/(data|strategy|results|backtest|runs)(\?.*)?$/, '/' + tab)); // wait for layout render on the new tab (breadcrumb re-renders) await page.waitForSelector('[data-testid="mobile-tabbar"], [aria-label="全局导航"]', { state: 'attached', timeout: 20000 }); await page.waitForSelector('nav[aria-label="面包屑"], .projctx, main', { state: 'attached', timeout: 15000 }); + // round6: each journey step must finish its data load (skeleton gone) + await page.waitForFunction(function () { + return !document.querySelector('[data-testid="busy-skeleton"]'); + }, { timeout: 20000 }).catch(function () {}); if (tab === 'results') { await page.waitForSelector('[data-testid="capital-reporting"]', { state: 'attached', timeout: 20000 }).catch(function () {}); if (!(await page.locator('[data-testid="capital-reporting"]').count())) -- cgit v1.2.3