From b594d2748e7c2028010a849cc866857d85b7a3b6 Mon Sep 17 00:00:00 2001 From: weichen Date: Fri, 16 Oct 2026 15:39:11 +0000 Subject: [PATCH] Stabilize cockpit e2e login: settle identity refresh before entry click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why: after login the store's identity epoch and the capability probe each settle once more; the app closes open workspaces on identity change, so clicking the sidebar entry too early raced the overlay close (intermittent 加载中 hang, caught across I4 e2e runs). Evidence: instrumented probe (rows=2 parsed then overlay closed on identity bump); settled-login rerun follows on the Dev I4 card. Impact: spec stability only. Refs: rollout I4 --- e2e/rdm-cockpit.playwright.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/e2e/rdm-cockpit.playwright.ts b/e2e/rdm-cockpit.playwright.ts index 5c2d8e5..ea7adec 100644 --- a/e2e/rdm-cockpit.playwright.ts +++ b/e2e/rdm-cockpit.playwright.ts @@ -22,9 +22,13 @@ async function login(page: Page, user: string, password: string) { } async function loginOwner(page: Page) { - await login(page, OWNER, PASSWORD) - await expect(page.locator('.tsb-tool', { hasText: '文档驾驶舱' })).toBeVisible({ timeout: 15_000 }) -} + await login(page, OWNER, PASSWORD) + await expect(page.locator('.tsb-tool', { hasText: '文档驾驶舱' })).toBeVisible({ timeout: 15_000 }) + // 登录后身份纪元与能力探针仍可能各跳一次;应用在身份变更时会关闭已开 + // 工作区——等落定再点入口,避免 overlay 被身份刷新关掉(竞态实测)。 + await page.waitForLoadState('networkidle').catch(() => {}) + await page.waitForTimeout(1_500) + } async function openCockpit(page: Page) { await page.locator('.tsb-tool', { hasText: '文档驾驶舱' }).click() -- 2.54.0