资产流转E2E后退前等待未保存状态落定 [09-06-release-gate-integrity]
ci-e2e / e2e (push) Canceled after 0s
ci-minimal / check-minimal (push) Canceled after 0s

保存后 URL 同步 replace,而「表单已保存」需多次渲染才传到导航拦截器
(UnsavedChangesGuard 的 ref 在 effect 中更新)。负载下测试在 URL 变化后
立即 goBack 被拦为未保存(门禁 5 轮失败 2 次,快照可见确认框)。
改为沿用 r103 的写法,先等 html[data-unsaved-changes="false"] 再后退;
断言不变。

Co-Authored-By: Claude Opus 5.5 <[email protected]>
这个提交包含在:
2026-09-26 20:28:08 +08:00
共同撰写人 Claude Opus 5.5
父节点 0931b1ea49
当前提交 70af0c6b9a
+3
查看文件
@@ -119,6 +119,9 @@ test("E2E 资产流转主链路:建卡→领用归还→调拨→盘点", asyn
const assetId = createAssetPayload.data.asset.id;
await expect(page).toHaveURL(new RegExp(`/assets/${assetId}$`));
await expect(page.getByTestId("unsaved-changes-dialog")).toHaveCount(0);
// The URL changes before the saved form state reaches the navigation guard;
// going back earlier is blocked as "unsaved" on a loaded host.
await expect(page.locator("html")).toHaveAttribute("data-unsaved-changes", "false");
await page.goBack();
await expect(page).toHaveURL(/\/assets$/);
await page.goForward();