summaryrefslogtreecommitdiff
path: root/frontend/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/scripts')
-rw-r--r--frontend/scripts/ui-auth-shots.mjs8
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()))