Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions examples/personal-workspace-browser/chat-todo-proposal.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,16 @@ export const chatTodoProposalScenario = {
await composer.fill(RECOVERY_PROMPT);
await page.getByRole("button", { name: "发送", exact: true }).click();
await waitFor(() => api.turnRequests.length > turnsBeforeRecovery, "The recovery prompt was not sent");
// Arm the transient failure before reload: on a slow page, recovery can
// finish while the Goal Chat tab is reopening.
api.failNextActionPreview = true;
await page.reload({ waitUntil: "domcontentloaded" });
await page.getByTestId("personal-goal-home").waitFor({ state: "visible" });
await openGoalChat();
api.failNextActionPreview = true;
await page.locator(".personal-channel-timeline").getByText("恢复后给出一个步骤。", { exact: true }).waitFor({ state: "visible", timeout: 15_000 });
const recoveredCard = page.locator(".personal-proposal-row", { hasText: RECOVERY_TEXT });
await recoveredCard.waitFor({ state: "visible", timeout: 5_000 });
await recoveredCard.waitFor({ state: "visible", timeout: 15_000 });
if (api.failNextActionPreview) throw new Error("Recovery did not exercise the transient preview failure");
await waitFor(() => new Set(previewsWithText(RECOVERY_TEXT).map((item) => item.idempotency_key)).size === 1,
"The recovered proposal did not map to exactly one Todo preview");
const [recoveredPreview] = previewsWithText(RECOVERY_TEXT);
Expand Down
4 changes: 3 additions & 1 deletion tests/test_chat_operation_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ def test_browser_operation_fixture_needs_no_test_framework(tmp_path: Path) -> No
check=True,
)
fixtures = json.loads(result.stdout)
assert list(fixtures) == ["confirmed", "waiting", "unknown", "reconciled"]
assert list(fixtures) == [
"prepared", "delivered", "confirmed", "waiting", "unknown", "reconciled"
]
for proposal in fixtures.values():
assert proposal["normalized_parameters"]["goal_id"] == "product-release"
assert proposal["normalized_parameters"]["executor"]["kind"] == "managed_turn"
Expand Down
Loading