diff --git a/tests/fixtures/e2e-known-red.json b/tests/fixtures/e2e-known-red.json index 6da47d3..7515679 100644 --- a/tests/fixtures/e2e-known-red.json +++ b/tests/fixtures/e2e-known-red.json @@ -1,5 +1,5 @@ { - "$comment": "e2e 已知失败清单。用途:把「长期红」与「新红」分开,避免门禁信号被噪声淹没。维护:修好一条就删一条;新红由 scripts/e2e-known-red-report.js 报出来。kind=unknown 表示尚未逐条判定。退役清单见 retired。 2026-11-27 追记:iwb-picker 9/9 已修复(初始默认视口被误持久化导致 doFit 被跳过),已移出清单。", + "$comment": "e2e 已知失败清单。用途:把「长期红」与「新红」分开,避免门禁信号被噪声淹没。维护:修好一条就删一条;新红由 scripts/e2e-known-red-report.js 报出来。kind=unknown 表示尚未逐条判定。退役清单见 retired。 2026-11-27 追记:iwb-picker 9/9 已修复(初始默认视口被误持久化导致 doFit 被跳过),已移出清单。 2026-11-27 追记:iwb-private-gate 4 条(.iwb-ctxmenu 未排除子菜单 + 设置页默认页变化)与 iwb-connect-menu ⑤(同一 strict 问题)已修,移出清单。", "measuredAt": "2026-11-27", "measuredVersion": "3.26.107", "measuredCommit": "64f37e1", @@ -7,7 +7,7 @@ "specs": 52, "tests": 195, "passed": 162, - "failed": 25 + "failed": 20 }, "baseUrl": { "clipboard-audit": "http://127.0.0.1:8799", @@ -30,14 +30,6 @@ "reason": "flush 语义用例超时(2026-11-24 起长期红,尚未定位)", "since": "2026-11-27 实测" }, - { - "spec": "tests/iwb-connect-menu.spec.js", - "knownFailures": 1, - "total": 9, - "kind": "defect", - "reason": "⑤ .iwb-ctxmenu 同时命中主菜单与子菜单(strict mode),选择器需收窄", - "since": "2026-11-27 实测" - }, { "spec": "tests/iwb-download-cors.spec.js", "knownFailures": 1, @@ -78,14 +70,6 @@ "reason": "LOD 阈值相关断言失败,可能与取景缩放变化有关,待判定", "since": "2026-11-27 实测" }, - { - "spec": "tests/iwb-private-gate.spec.js", - "knownFailures": 4, - "total": 4, - "kind": "unknown", - "reason": "分层/润色入口的可见性断言失败,疑似入口位置随停靠栏布局变化", - "since": "2026-11-27 实测" - }, { "spec": "tests/iwb-resize-perf.spec.js", "knownFailures": 1, diff --git a/tests/iwb-connect-menu.spec.js b/tests/iwb-connect-menu.spec.js index 3a6aba2..315f1b0 100644 --- a/tests/iwb-connect-menu.spec.js +++ b/tests/iwb-connect-menu.spec.js @@ -180,8 +180,10 @@ test('⑤ 分层/润色默认隐藏:底栏与右键菜单都没有新建入口 // 右键菜单 const canvas = await page.locator('.iwb-canvas').boundingBox() await page.mouse.click(canvas.x + canvas.width * 0.5, canvas.y + canvas.height * 0.5, { button: 'right' }) - await expect(page.locator('.iwb-ctxmenu')).toBeVisible({ timeout: 8000 }) - const items = await page.locator('.iwb-ctxmenu .iwb-ctx-item').evaluateAll((els) => els.map((e) => (e.textContent || '').trim())) + // 2026-11-27:主菜单与子菜单都带 .iwb-ctxmenu ⇒ 收窄到主菜单(否则 strict mode 命中 2 个) + const MAIN_CTX = '.iwb-ctxmenu:not(.iwb-ctx-sub)' + await expect(page.locator(MAIN_CTX)).toBeVisible({ timeout: 8000 }) + const items = await page.locator(MAIN_CTX + ' .iwb-ctx-item').evaluateAll((els) => els.map((e) => (e.textContent || '').trim())) expect(items.some((t) => t.includes('润色')), '右键菜单默认不应有「润色」').toBe(false) expect(items.some((t) => t.includes('分层')), '右键菜单默认不应有「分层」').toBe(false) // 但常规节点仍在 diff --git a/tests/iwb-private-gate.spec.js b/tests/iwb-private-gate.spec.js index 544c846..6993307 100644 --- a/tests/iwb-private-gate.spec.js +++ b/tests/iwb-private-gate.spec.js @@ -43,12 +43,14 @@ async function ensureCanvas(page) { await page.waitForTimeout(200) } +// 2026-11-27:右键菜单是「主菜单 + 子菜单」两层,两者都带 .iwb-ctxmenu ⇒ 必须排除子菜单 +const MAIN_CTX = '.iwb-ctxmenu:not(.iwb-ctx-sub)' async function openCtxMenu(page) { await ensureCanvas(page) await page.locator('.iwb-canvas').click({ button: 'right', position: { x: 900, y: 620 } }) - await expect(page.locator('.iwb-ctxmenu')).toBeVisible() + await expect(page.locator(MAIN_CTX)).toBeVisible() } -const layerCtxItem = (page) => page.locator('.iwb-ctxmenu .iwb-ctx-item', { hasText: '分层' }) +const layerCtxItem = (page) => page.locator(MAIN_CTX + ' .iwb-ctx-item', { hasText: '分层' }) test('默认隐藏:无开关时右键菜单与设置面板都没有分层入口', async ({ page }) => { const errors = [] @@ -79,7 +81,9 @@ test('链接暗号:开启后入口出现且地址栏不留痕,off 可关闭' await expect(layerCtxItem(page)).toHaveCount(1) await page.keyboard.press('Escape') await page.locator('.iwb-navrail .iwb-nav-item[title="设置"]').click() - await expect(page.locator('.iwb-settings-modal').getByText(/分层模型(/)).toBeVisible() + // 2026-11-27:设置默认页是「通用」,分层模型区块在「生图服务」页的服务商卡片里 + await page.locator('.iwb-settings-modal .iwb-tab').filter({ hasText: '生图服务' }).first().click() + await expect(page.locator('.iwb-settings-modal .iwb-gset-group-h').filter({ hasText: '分层模型' }).first()).toBeVisible() await page.locator('.iwb-modal-head button[title="关闭"]').click() // ② off 关闭:入口重新消失