施工(HEL-129): P5 收官打磨——修复5处陈旧桌面e2e用例被手机分流劫持,新增手机端全页面回归套件

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
施工员
2026-08-25 09:53:41 +08:00
co-authored by multica-agent
parent bbb3fab6b9
commit 8a5e78f022
2 changed files with 352 additions and 5 deletions
+6 -5
View File
@@ -1986,7 +1986,7 @@ test("stylesheet layers do not repeat identical rules in the same cascade contex
test("mobile shell stays within the viewport", async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await mockApplication(page, session("user", true));
await page.goto("/index.html");
await page.goto("/index.html?ui=desktop");
const overflow = await page.evaluate(() => document.documentElement.scrollWidth - window.innerWidth);
expect(overflow).toBeLessThanOrEqual(1);
await expect(page.locator("#globalSearchButton")).toBeHidden();
@@ -2013,7 +2013,7 @@ test("mobile shell stays within the viewport", async ({ page }) => {
test("mobile shell remains usable at supported narrow widths", async ({ page }) => {
await page.setViewportSize({ width: 430, height: 932 });
await mockApplication(page, session("user", true));
await page.goto("/index.html");
await page.goto("/index.html?ui=desktop");
const registeredViews = await page.evaluate(() => window.XiaobaiPages.pages.map((entry) => entry.id));
for (const viewport of [
{ width: 430, height: 932 },
@@ -2730,7 +2730,7 @@ for (const viewport of [
test(`member workflows fit a mobile ${viewport.name} viewport`, async ({ page }) => {
await page.setViewportSize({ width: viewport.width, height: viewport.height });
await mockApplication(page, session("user", true));
await page.goto("/index.html");
await page.goto("/index.html?ui=desktop");
await page.locator('[data-view="reviewWorkspaceView"]').first().click();
const overflow = await page.evaluate(() => document.documentElement.scrollWidth - window.innerWidth);
expect(overflow).toBeLessThanOrEqual(1);
@@ -2829,7 +2829,7 @@ test("heaven workspace actions remain compact and do not overlap", async ({ page
test("heaven workspace controls fit a narrow viewport", async ({ page }) => {
await page.setViewportSize({ width: 375, height: 812 });
await mockApplication(page, session("user", true));
await page.goto("/index.html");
await page.goto("/index.html?ui=desktop");
await page.locator('[data-view="heavenView"]').first().click();
expect(await page.evaluate(() => window.scrollY)).toBe(0);
@@ -3562,7 +3562,8 @@ test("header username stays untruncated on desktop and in the mobile menu", asyn
for (const account of accounts) {
await mockApplication(page, account.auth);
await page.goto("/index.html");
await page.setViewportSize({ width: 1600, height: 1000 });
await page.goto("/index.html?ui=desktop");
await expect(page.locator("#accountName")).toHaveText(account.username);
for (const theme of ["day", "night"]) {