fix(record): saftey policy and rebase bug fix

This commit is contained in:
Ljy-0827 authored and GitHub committed 2026-08-24 10:42:45 +08:00
1 parent 887d1ed0b9
commit c08fed5de3
4 files changed
+16 -4

No files matched your search

@@ -139,8 +139,10 @@ describe("RecordingObservationRuntime", () => {
await recording.captureInitial(4);
const transition = await recording.captureTabTransition(4, 5);
await recording.captureInitial(4);
await recording.captureInitial(5);
expect(transition).toMatchObject({
expect(transition).toEqual({
preStateId: "s1",
postStateId: "s2",
targetUrl: "https://example.com/second",
@@ -26,4 +26,14 @@ describe("RecordingTabCoordinator", () => {
tabs.commit(6);
expect(tabs.currentTabId).toBe(6);
});
it("commits the freshly observed URL when returning to an existing tab", () => {
const tabs = new RecordingTabCoordinator(4);
tabs.navigation(5, "https://example.com/old");
tabs.commit(5, "https://example.com/new");
expect(tabs.currentTabId).toBe(5);
expect(tabs.navigation(5).currentUrl).toBe("https://example.com/new");
});
});