diff --git a/client/src/components/Plugins/PluginFrame.test.tsx b/client/src/components/Plugins/PluginFrame.test.tsx
index dbf7d1eb1..c5381a74a 100644
--- a/client/src/components/Plugins/PluginFrame.test.tsx
+++ b/client/src/components/Plugins/PluginFrame.test.tsx
@@ -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();
- const iframe = container.querySelector('iframe')!;
+ const iframe = container.querySelector('iframe') as HTMLIFrameElement;
const posted: Array> = [];
(iframe.contentWindow as unknown as { postMessage: (m: unknown) => void }).postMessage = (m) => posted.push(m as Record);
fire(false);