test(plugins): avoid a non-null assertion in the new frame visibility tests

The added test used querySelector('iframe')! which pushes the tests
no-non-null-assertion count one over its frozen baseline; cast instead.
This commit is contained in:
Maurice
2026-11-15 20:39:19 +01:00
parent c4a2a91578
commit f728b568ed
@@ -975,7 +975,7 @@ describe('PluginFrame visibility and mobile suspend', () => {
it('FE-PLUGINS-FRAME-062: tells the plugin when it leaves the screen', () => {
const { container } = render(<PluginFrame pluginId="demo" surface="dashboard-widget" />);
const iframe = container.querySelector('iframe')!;
const iframe = container.querySelector('iframe') as HTMLIFrameElement;
const posted: Array<Record<string, unknown>> = [];
(iframe.contentWindow as unknown as { postMessage: (m: unknown) => void }).postMessage = (m) => posted.push(m as Record<string, unknown>);
fire(false);