diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-18 18:11:53 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-18 18:11:53 +0800 |
| commit | 3030ee15a888c5c32bd3cfc889b230b9083514f3 (patch) | |
| tree | 16cac985df170ff833e3ec65f202c192038501fa /frontend/scripts | |
| parent | c52a727d11b87d70ec00a7e2569841e6e6abcd9c (diff) | |
| download | strategy-lab-3030ee15a888c5c32bd3cfc889b230b9083514f3.tar.gz | |
[实现方案] round6 守门与验证:token 白名单测试、旅程重排断言、probe 全旅程步进(artifacts/ui-round6)与迁移文档
Diffstat (limited to 'frontend/scripts')
| -rw-r--r-- | frontend/scripts/ui-auth-shots.mjs | 8 |
1 files changed, 6 insertions, 2 deletions
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())) |
