Load the decoupled prebid shim in the APS renderer browser spec - #988
Open
aram356 wants to merge 1 commit into
Open
Load the decoupled prebid shim in the APS renderer browser spec#988aram356 wants to merge 1 commit into
aram356 wants to merge 1 commit into
Conversation
The APS adapter spec loads the external Prebid bundle and assumed it carries the tsjs shim (and the trustedServer adapter) inside it. Once the shim is decoupled (PR #967) the external bundle is pure Prebid.js, no adapter ever registers, and the in-page auction times out. Detect the decoupled world through the window.__tsjs_prebid_bundle manifest stamp and load dist/tsjs-prebid.js after the external bundle, matching the script order the server actually serves. On a coupled bundle the stamp is absent and the spec behaves exactly as before.
This was referenced Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #989. Stacked on #963. Fixes the browser integration failure that appears wherever #963's APS renderer spec meets #967's prebid decoupling (currently
rc/july).Problem
aps-renderer.spec.ts("renders a trustedServer adapter bid using Prebid's generated GAM ad ID") loads the external Prebid bundle and relies on it carrying the tsjs shim — which is what registers thetrustedServerbid adapter. After #967 the external bundle is pure Prebid.js and the shim ships as the separately servedtsjs-prebid.jsdeferred module. With no adapter registered the in-page auction never completes and the test times out at 30s. Onrc/julythe "Integration Tests" workflow has been red since the #967 merge (78632fe33); this spec doesn't exist on #967's branch, so its own CI never caught it.Fix
Detect which world the built bundle is from via the
window.__tsjs_prebid_bundlemanifest stamp (only the decoupled bundle stamps it) and loaddist/tsjs-prebid.jsafter the external bundle — the same script order the server serves.rc/july/anything containing Decouple the prebid tsjs shim from the bundled Prebid.js #967 (decoupled bundle): shim loads, adapter registers, test passes.Test-only change; no runtime code touched.