in monitoring/src/check-page/consent-or-pay-tcfv2.ts [480:514]
await checkSubsequentPage(
context,
config,
nextUrl,
BannerType.NON_ADVERTISING,
);
}
await page.close();
await browser.close();
log_info('Checking non advertising banner: Complete');
};
/**
* Checks that ads load correctly for the second page a user goes to
* when visiting the site, with respect to and interaction with the CMP.
*
* @param {BrowserContext} context
* @param {Config} config
* @param {string} url
*/
const checkSubsequentPage = async (
context: BrowserContext,
config: Config,
url: string,
bannerType: Banner,
) => {
log_info(`Start checking subsequent Page URL: ${url}`);
const page: Page = await makeNewPage(context);
await loadPage(page, url);
// There is no CMP since this we have already accepted this on a previous page.
await checkCMPIsNotVisible(page);
switch (bannerType) {