Skip to content

Load the decoupled prebid shim in the APS renderer browser spec - #988

Open
aram356 wants to merge 1 commit into
fix/aps-renderer-requestid-registrationfrom
fix/aps-renderer-spec-decoupled-shim
Open

Load the decoupled prebid shim in the APS renderer browser spec#988
aram356 wants to merge 1 commit into
fix/aps-renderer-requestid-registrationfrom
fix/aps-renderer-spec-decoupled-shim

Conversation

@aram356

@aram356 aram356 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

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 the trustedServer bid adapter. After #967 the external bundle is pure Prebid.js and the shim ships as the separately served tsjs-prebid.js deferred module. With no adapter registered the in-page auction never completes and the test times out at 30s. On rc/july the "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_bundle manifest stamp (only the decoupled bundle stamps it) and load dist/tsjs-prebid.js after the external bundle — the same script order the server serves.

Test-only change; no runtime code touched.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant