refactor(embed): iframe title + captured frame ref, allow-absent test, router comment
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user