Options
All
  • Public
  • Public/Protected
  • All
Menu

qa

qa-yieldmo-com

Real fake ads

Introduction

  • This codebase allows developers to add and/or delete custom ad responses for the purposes of testing.

  • Dynamically creates test pages. See test pages for more information.

Written in Typescript

Requirements

  • NodeJS = v12.18.3
  • NPM = v6

Getting Started

  • npm i to install

  • run using npm run start

  • visit localhost:8080

  • npm run webpack to build qa-rig.ts for top level index

  • npm run typescript to build app.ts

  • npm run serve to server to localhost:8080

test pages

The test pages are located at /test

there are pages for

  • /test/amp

  • /test/amp-safeframe

  • /test/cop

  • /test/dfp

  • /test/dfp-safeframe

  • /test/iframe

  • /test/openx

  • /test/sandbox ** The inner frame for the sandbox is version controlled in this repo @ views/testPages/includes/testSandbox.html but is hosted in static.yieldmo.com bucket on S3 **

    ** The inner frame for the dfp-safeframe is version controlled in this repo @ views/testPages/includes/dfpSafeframes.html but is hosted in google.com/dfp as creative SAFEFRAMES_QA_DYNAMIC_PATTERN_PARAM_Test **

Analogous files exist for insights and test/insights/..., including the sandbox iframe contents.

DFP console setup

The dfp, amp-safeframe, and dfp-safeframe pages use dynamic DFP placements. Ad unit ids 0_dfp_qa_dynamic_pattern_param_test to 19_dfp_qa_dynamic_pattern_param_test serve in a DFP container, while ad unit ids 20_dfp_qa_dynamic_pattern_param_test through 40_dfp_qa_dynamic_pattern_param_test serve in DFP safeframes.

parameters

  • sandbox - the sandbox parameter for the iframe, only used in the sandbox environment
  • rf_force_p - a comma separated list of placement ids we will put these on the page. the only environment that doesn't support multiple placements is dfp/dfp-amp.
  • ym_force_pname - the name of the format on the page
  • img_top - image to place above placement
  • img_bottom - image to place below placement
  • licensed - use a licensed placement
  • tight - do not put a placeholder between ads, checks if truthy
  • infinite - make the page infinite scroll
  • landingUrl - override the landing url destination through data-landing-url parameter

Consent Framework Parameters

  • in_the_box (Consent in the box) - true meaning that the the consent framework should be rendered inside the safeframe (currently only works for the dfp implementation of sandbox)/iframe/sandbox the sdk is loaded into. A true cmp framework is not implemented in these cases because a true cmp framework will create a popup inside the box that covers the ad. Hiding said popup would make it impossible to toggle the consent. To toggle the consent on this fake framework use actual_consent and gdpr_applies
  • actual_consent - toggle for if consent is given in the case that in_the_box is true.
  • gdpr_applies - toggle for if in eu in the case that in_the_box is true

Note:

  • if licensed is checked, rf_force_p won't work
  • selecting a real fake ad will prevent rf_force_p and licensed
  • sandbox attributes will only be applied if 'Iframe Sandbox' is chosen
  • data-landing-url will only work for the first dfp/dfp safeframes placement (should be a https url)

adding placements

  • navigate to public/data/placement.json and edit the object array as necessary

adding temporary pages

  • temporary pages that are not used routinely for QA go in /temp. Dynamic test pages are added to routes.

known issues

  • Landing url overwrite doesn't work for amp

  • All container based environments except AMP and AMP-Safeframe will result in many NOPL errors.

adding an ad response

  • use '-' instead of spaces for a better searching experience

Github Actions

  • this pipeline now uses Github Actions to build and deploy the docker image to ECR and update the ECS Fargate service.

  • the Github Actions is set to trigger on commits to the master branch.

  • if you don't want to trigger the workflow, include "[skip ci]" anywhere within your git commit message:

    git commit -am "test comment [skip ci]"

Generated using TypeDoc