fix: merge B-157 and B-158 shell review blockers
Keep 1024-1439 broken/seal metrics in the detail panel, fold desktop admin actions into the ellipsis menu, and fit the 13-column limit pool at 1600 without hiding the data date. Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Cursor
multica-agent
parent
d1852657fd
commit
4c6cccd9a4
@@ -510,12 +510,21 @@ async function mockApplication(page, authSession = session(), options = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
async function openHeaderCommandMenu(page) {
|
||||
const menu = page.locator("#headerCommandGroup");
|
||||
if (await menu.isVisible()) return;
|
||||
await page.locator("#headerMenuButton").click();
|
||||
await expect(menu).toBeVisible();
|
||||
}
|
||||
|
||||
test("admin shell opens every primary workspace and global search", async ({ page }) => {
|
||||
await mockApplication(page);
|
||||
await page.goto("/index.html");
|
||||
await expect(page.locator("#authGate")).toBeHidden();
|
||||
await openHeaderCommandMenu(page);
|
||||
await expect(page.locator("#settingsButton")).toBeVisible();
|
||||
await expect(page.locator("#syncButton")).toBeVisible();
|
||||
await page.keyboard.press("Escape");
|
||||
await page.locator("#alertButton").click();
|
||||
await expect(page.locator("#alertsDialog")).toBeVisible();
|
||||
await page.locator("#closeAlertsDialog").click();
|
||||
@@ -589,6 +598,7 @@ test("manual refresh stays in place without reopening the full-page loader", asy
|
||||
await page.goto("/index.html");
|
||||
await expect(page.locator("#loadingOverlay")).toBeHidden();
|
||||
|
||||
await openHeaderCommandMenu(page);
|
||||
await page.locator("#refreshButton").click();
|
||||
|
||||
await expect(page.locator("#refreshButton")).toBeDisabled();
|
||||
@@ -3134,6 +3144,7 @@ test("global dialogs share the stage 18 geometry without changing account or adm
|
||||
expect(assistantGeometry.contentDisplay).toBe("flex");
|
||||
await page.locator("#closeAssistantDialog").click();
|
||||
|
||||
await openHeaderCommandMenu(page);
|
||||
await page.locator("#accountButton").click();
|
||||
await page.locator('[data-account-panel="membership"]').click();
|
||||
await expect(page.locator("#settingsDialog")).toHaveAttribute("aria-labelledby", "accountDialogTitle");
|
||||
@@ -3144,6 +3155,7 @@ test("global dialogs share the stage 18 geometry without changing account or adm
|
||||
expect(Math.abs(accountBox.y + accountBox.height / 2 - 450)).toBeLessThanOrEqual(2);
|
||||
await page.locator("#closeSettingsDialog").click();
|
||||
|
||||
await openHeaderCommandMenu(page);
|
||||
await page.locator("#settingsButton").click();
|
||||
await expect(page.locator("#adminDialog")).toHaveAttribute("aria-labelledby", "adminDialogTitle");
|
||||
await expect(page.locator("#adminSectionSelect")).toBeVisible();
|
||||
@@ -3163,3 +3175,63 @@ test("global dialogs share the stage 18 geometry without changing account or adm
|
||||
expect(mobileGeometry.width).toBeLessThanOrEqual(375);
|
||||
expect(mobileGeometry.documentOverflow).toBeLessThanOrEqual(1);
|
||||
});
|
||||
|
||||
test("merged header keeps date, detail fields and 13 pool columns after dual-review rework", async ({ page }) => {
|
||||
await mockApplication(page, session("admin", true));
|
||||
await page.goto("/index.html");
|
||||
await page.waitForTimeout(400);
|
||||
await expect(page.locator("#currentPageSubtitle")).toContainText("市场复盘 ·");
|
||||
await expect(page.locator("#headerMenuButton")).toBeVisible();
|
||||
await expect(page.locator("#headerCommandGroup")).toBeHidden();
|
||||
await expect(page.locator("#themeToggle")).toBeVisible();
|
||||
await expect(page.locator("#refreshButton")).toBeHidden();
|
||||
|
||||
await page.locator('[data-view="limitPool"]').first().click();
|
||||
await expect(page.locator("#currentPageSubtitle")).toContainText("市场复盘 ·");
|
||||
await expect(page.locator("#currentPageSubtitle")).not.toHaveText("市场复盘");
|
||||
|
||||
await page.setViewportSize({ width: 1280, height: 800 });
|
||||
await expect(page.locator(".tape-optional").first()).toBeHidden();
|
||||
await page.locator("#overviewToggle").click();
|
||||
const detailText = await page.locator(".tape-detail").innerText();
|
||||
for (const label of ["市场情绪", "上涨家数", "下跌家数", "涨停", "跌停", "炸板", "封板率", "两市成交", "数据日期"]) {
|
||||
expect(detailText).toContain(label);
|
||||
}
|
||||
expect(detailText).not.toContain("涨停 / 跌停");
|
||||
await expect(page.locator("#tapeLimitDown")).toBeVisible();
|
||||
await expect(page.locator("#detailBroken")).toBeVisible();
|
||||
await expect(page.locator("#dataDateMetric")).toBeVisible();
|
||||
await page.keyboard.press("Escape");
|
||||
|
||||
await page.setViewportSize({ width: 1600, height: 1000 });
|
||||
await page.locator('[data-view="limitPool"]').first().click();
|
||||
const tableFit = await page.evaluate(() => {
|
||||
const card = document.querySelector("#limitPool .pool-table-card");
|
||||
const reason = document.querySelector("#limitTable .reason-column");
|
||||
const header = document.querySelector(".app-header");
|
||||
return {
|
||||
cardOverflow: card.scrollWidth - card.clientWidth,
|
||||
reasonVisible: reason.getBoundingClientRect().right <= card.getBoundingClientRect().right + 1,
|
||||
reasonText: reason.textContent.trim(),
|
||||
headerOverflow: header.scrollWidth - header.clientWidth,
|
||||
};
|
||||
});
|
||||
expect(tableFit.reasonText).toContain("涨停原因");
|
||||
expect(tableFit.reasonVisible).toBe(true);
|
||||
expect(tableFit.cardOverflow).toBeLessThanOrEqual(1);
|
||||
expect(tableFit.headerOverflow).toBeLessThanOrEqual(1);
|
||||
|
||||
await page.locator('[data-view="heavenView"]').first().click();
|
||||
await expect(page.locator(".app-header .overview-strip")).toBeHidden();
|
||||
await expect(page.locator("#overviewToggle")).toBeHidden();
|
||||
|
||||
await page.setViewportSize({ width: 390, height: 844 });
|
||||
await page.locator('[data-view="limitPool"]').first().click({ force: true });
|
||||
await page.locator("#mobileMarketViewSelect").selectOption("sentimentCycleView");
|
||||
await page.locator("#overviewToggle").click();
|
||||
const mobileDetail = await page.locator(".tape-detail").innerText();
|
||||
for (const label of ["市场情绪", "上涨家数", "下跌家数", "涨停", "跌停", "炸板", "封板率", "两市成交", "数据日期"]) {
|
||||
expect(mobileDetail).toContain(label);
|
||||
}
|
||||
await expect(page.locator("#dataDateMetric")).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user