From d2377539162e6ac341bcb6bf9b572dabf112e842 Mon Sep 17 00:00:00 2001 From: Sylvain Duchesne Date: Mon, 21 Sep 2026 12:13:12 +0200 Subject: [PATCH] Mount the @data harness inside Refine, and stop the bundle leaking globals The harness builds its bundles with a classic script tag, so an unwrapped bundle publishes every top-level declaration as a global. Bundling Refine brought in @tanstack/query-core, whose exported MutationObserver class then shadowed the DOM one for Playwright's injected script, and every waitForFunction died on defaultMutationOptions. --format=iife keeps the bundle's declarations to itself. The harness also mounted the data context outside and called the previous bootstrapWallet signature; it now mirrors the app's provider order and seeds through the context, so tests and app write events by one path. --- src/shared/support/hooks.ts | 15 +++++++++++++-- src/shared/test-harness/harness-ng.tsx | 25 +++++++++++++++++++------ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/shared/support/hooks.ts b/src/shared/support/hooks.ts index 65ac27a..6725a22 100644 --- a/src/shared/support/hooks.ts +++ b/src/shared/support/hooks.ts @@ -325,13 +325,24 @@ async function ensureAuth(): Promise { BeforeAll({ timeout: 10 * 60 * 1000 }, async function () { console.log('Starting Festipod BDD tests...'); + // `--format=iife` IS LOad-BEARING, not tidiness. Both bundles are loaded as + // CLASSIC scripts (`