From e5e16a4148fd29ef93e0a35635b3e179932e977c Mon Sep 17 00:00:00 2001 From: Lihua <1017343802@qq.com> Date: Wed, 28 Oct 2026 07:01:14 -0700 Subject: [PATCH] test(dashboard): read the optional user action after it is listed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit goal-suggestions-live adds an optional user action through the real CLI after the page has loaded, but read the Goal vitals without refreshing, so the view still showed the empty Goal. The assertion /0 等你决定|可选/ matched only because the empty needs-you cell rendered a bare 0. Since #7478 that cell reads "暂无等待", so the scenario fails on main in dashboard-browser and chat-bundle-browser. Refresh status after adding the item, as the user-gate step already does, and assert the optional count the lane actually shows. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Lihua <1017343802@qq.com> --- examples/personal-workspace-browser/goal-suggestions-live.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/personal-workspace-browser/goal-suggestions-live.mjs b/examples/personal-workspace-browser/goal-suggestions-live.mjs index 2986c98a0a..cc7359b288 100644 --- a/examples/personal-workspace-browser/goal-suggestions-live.mjs +++ b/examples/personal-workspace-browser/goal-suggestions-live.mjs @@ -54,6 +54,7 @@ export const goalSuggestionsLiveScenario = { // An optional user action is listed by the real owner but is not a decision. assert.equal((await cli("add", "--goal-id", goalId, "--role", "user", "--task-class", "user_action", "--text", optionalText)).ok, true); + await refresh(); await openConversation(); await page.waitForTimeout(1_000); await summary.click(); @@ -62,7 +63,7 @@ export const goalSuggestionsLiveScenario = { assert.doesNotMatch(before, /等你决定/, `an optional user action is not a decision suggestion: ${before}`); await page.getByRole("navigation", { name: "Goal 视图" }).getByRole("button", { name: "概览", exact: true }).click(); const vitals = (await page.getByTestId("goal-vitals").innerText()).replace(/\s+/g, " "); - assert.match(vitals, /0 等你决定|可选/, `the lane itself shows the item as optional: ${vitals}`); + assert.match(vitals, /另有 1 项可选/, `the lane itself shows the item as optional: ${vitals}`); await home(); // A real gate is a decision; the count is the lane's own count.