Skip to content

Test mode added for Portal Prebid Test Site (publisher simulation)#7

Merged
IlliaMil merged 6 commits into
masterfrom
test-mode-added
Jun 23, 2026
Merged

Test mode added for Portal Prebid Test Site (publisher simulation)#7
IlliaMil merged 6 commits into
masterfrom
test-mode-added

Conversation

@IlliaMil

Copy link
Copy Markdown

No description provided.

@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds test mode support for a Portal Prebid Test Site (publisher simulation), introducing three enhancements to the Start.io bid adapter.

  • imp.tagid from params.placementId: Maps the optional placementId bid param to the ORTB imp.tagid field, coercing it to a string.
  • ext.prebid.channel population: Always sets { name: 'pbjs', version: '$prebid.version$' } on every outgoing request so the endpoint can identify the Prebid.js client version.
  • Test mode via params.testAdsEnabled: When truthy, sets request.test = 1 in the ORTB body and appends &testAdsEnabled=true to the endpoint URL; corresponding tests cover both the enabled and disabled cases.

Confidence Score: 5/5

Safe to merge — all changes are additive and guarded by optional chaining; no existing paths are modified.

The changes are purely additive: a new imp field, a new ext field, and a conditional test-mode flag. Each new feature is covered by a dedicated test. No existing request-building or response-parsing logic is altered.

No files require special attention.

Important Files Changed

Filename Overview
modules/startioBidAdapter.js Adds imp.tagid from params.placementId, sets ext.prebid.channel, and introduces test mode via params.testAdsEnabled (sets request.test=1 and appends a URL query param)
test/spec/modules/startioBidAdapter_spec.js Adds four test cases covering channel advertisement, placementId→tagid mapping, request.test flag, and testAdsEnabled URL parameter

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[buildRequests called] --> B[map over each bidRequest]
    B --> C{params.placementId set?}
    C -- yes --> D[imp.tagid = String placementId]
    C -- no --> E[tagid omitted]
    D --> F[set ext.prebid.channel]
    E --> F
    F --> G{params.testAdsEnabled truthy?}
    G -- yes --> H[request.test = 1]
    G -- yes --> I[url = ENDPOINT_URL + &testAdsEnabled=true]
    G -- no --> J[request.test unset]
    G -- no --> K[url = ENDPOINT_URL]
    H --> L[return request object]
    I --> L
    J --> L
    K --> L
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[buildRequests called] --> B[map over each bidRequest]
    B --> C{params.placementId set?}
    C -- yes --> D[imp.tagid = String placementId]
    C -- no --> E[tagid omitted]
    D --> F[set ext.prebid.channel]
    E --> F
    F --> G{params.testAdsEnabled truthy?}
    G -- yes --> H[request.test = 1]
    G -- yes --> I[url = ENDPOINT_URL + &testAdsEnabled=true]
    G -- no --> J[request.test unset]
    G -- no --> K[url = ENDPOINT_URL]
    H --> L[return request object]
    I --> L
    J --> L
    K --> L
Loading

Reviews (5): Last reviewed commit: "test param replaced with testAdsEnabled" | Re-trigger Greptile

Comment thread modules/startioBidAdapter.js Outdated
Comment thread modules/startioBidAdapter.js Outdated
@IlliaMil IlliaMil merged commit 8045d38 into master Jun 23, 2026
100 of 102 checks passed
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.

2 participants