(runDir: string, window: TimelineWindow)
| 42 | |
| 43 | /** Record that the scenario is acting on `window` (deduped per run). */ |
| 44 | export const markFocus = (runDir: string, window: TimelineWindow): void => { |
| 45 | const timeline = read(runDir); |
| 46 | if (timeline.focus.at(-1)?.window === window) return; |
| 47 | timeline.focus.push({ at: Date.now(), window }); |
| 48 | write(runDir, timeline); |
| 49 | }; |
| 50 | |
| 51 | /** Record a main-frame navigation (deduped against the previous URL). */ |
| 52 | export const markNavigation = (runDir: string, url: string): void => { |
no test coverage detected