refactor(embed): iframe title + captured frame ref, allow-absent test, router comment

This commit is contained in:
root
2026-06-08 15:13:05 +10:00
parent 29a9185788
commit ae2ea09f0c
3 changed files with 12 additions and 4 deletions

View File

@@ -31,4 +31,11 @@ describe('embedView + wrappers', () => {
await (await import('../../public/views/aiusage.js')).render(main);
expect(main.querySelector('iframe.term-frame').getAttribute('src')).toBe('https://aiusage.hynesy.com/');
});
it('omits the allow attribute when not provided', async () => {
const { embedView } = await import('../../public/views/embed.js');
const main = document.getElementById('main');
await embedView({ title: 'AI Usage', src: 'https://aiusage.hynesy.com/' })(main);
expect(main.querySelector('iframe.term-frame').hasAttribute('allow')).toBe(false);
});
});