fix: fit 13 limit-pool columns at 1600 and restyle leftover tokens

Keep the limit-up table inside the card without horizontal scroll,
raise header/row metrics to the B-147 spec, restore night sort accent,
and switch the day-mode repair badge to the shared blue token.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
MS-01-Codex
2026-08-20 03:35:40 +08:00
co-authored by Cursor multica-agent
parent ec56ca28d7
commit e33451e802
4 changed files with 87 additions and 9 deletions
+30
View File
@@ -3177,8 +3177,25 @@ test("global dialogs share the stage 18 geometry without changing account or adm
});
test("merged header keeps date, detail fields and 13 pool columns after dual-review rework", async ({ page }) => {
const previousLimits = dashboard.limits;
dashboard.limits = [{
code: "002141",
name: "贤丰控股",
streak: 5,
change: 10.02,
price: 12.48,
sector: "电子元件",
first_time: "09:31",
last_time: "10:18",
open_times: 1,
turnover_rate: 18.42,
amount_billion: 12.6,
seal_amount_million: 8200,
reason: "板块龙头连板打开空间",
}];
await mockApplication(page, session("admin", true));
await page.goto("/index.html");
dashboard.limits = previousLimits;
await page.waitForTimeout(400);
await expect(page.locator("#currentPageSubtitle")).toContainText("市场复盘 ·");
await expect(page.locator("#headerMenuButton")).toBeVisible();
@@ -3210,18 +3227,31 @@ test("merged header keeps date, detail fields and 13 pool columns after dual-rev
const tableFit = await page.evaluate(() => {
const card = document.querySelector("#limitPool .pool-table-card");
const reason = document.querySelector("#limitTable .reason-column");
const reasonCell = document.querySelector("#limitTable .pool-reason-cell");
const headerCell = document.querySelector("#limitPool .data-table thead th");
const rowCell = document.querySelector("#limitPool .data-table tbody td");
const header = document.querySelector(".app-header");
const headerStyle = headerCell ? getComputedStyle(headerCell) : null;
const rowStyle = rowCell ? getComputedStyle(rowCell) : null;
return {
cardOverflow: card.scrollWidth - card.clientWidth,
reasonVisible: reason.getBoundingClientRect().right <= card.getBoundingClientRect().right + 1,
reasonText: reason.textContent.trim(),
reasonTitle: reasonCell?.getAttribute("title") || "",
headerOverflow: header.scrollWidth - header.clientWidth,
headerHeight: headerStyle ? Number.parseFloat(headerStyle.height) : 0,
headerFont: headerStyle ? Number.parseFloat(headerStyle.fontSize) : 0,
rowHeight: rowStyle ? Number.parseFloat(rowStyle.height) : 0,
};
});
expect(tableFit.reasonText).toContain("涨停原因");
expect(tableFit.reasonVisible).toBe(true);
expect(tableFit.cardOverflow).toBeLessThanOrEqual(1);
expect(tableFit.headerOverflow).toBeLessThanOrEqual(1);
expect(tableFit.reasonTitle).toContain("板块龙头连板打开空间");
expect(tableFit.headerHeight).toBe(36);
expect(tableFit.headerFont).toBe(12.5);
expect(tableFit.rowHeight).toBeGreaterThanOrEqual(40);
await page.locator('[data-view="heavenView"]').first().click();
await expect(page.locator(".app-header .overview-strip")).toBeHidden();