// @vitest-environment jsdom import { afterEach, describe, expect, it, vi } from 'vitest'; import { patchHtmlForIframe } from '@/lib/utils/iframe'; afterEach(() => { vi.restoreAllMocks(); document.body.innerHTML = ''; delete (window as unknown as Record).__maicElementPickerInstalled; }); describe('iframe element picker shim', () => { it('stays dormant, blocks armed page clicks, emits picks, syncs pins, and exits', () => { const patched = patchHtmlForIframe( '', ); const shim = patched.match(/