From 8b72ec8f184eb2b5f1843a211f581598cdeac522 Mon Sep 17 00:00:00 2001 From: DanielCliftonGuardian <110032454+DanielCliftonGuardian@users.noreply.github.com> Date: Wed, 7 Jun 2023 10:45:29 +0100 Subject: [PATCH] Update paid.content.cy.js --- .../cypress/e2e/parallel-6/paid.content.cy.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dotcom-rendering/cypress/e2e/parallel-6/paid.content.cy.js b/dotcom-rendering/cypress/e2e/parallel-6/paid.content.cy.js index 48a322d75e1..24da2ce3860 100644 --- a/dotcom-rendering/cypress/e2e/parallel-6/paid.content.cy.js +++ b/dotcom-rendering/cypress/e2e/parallel-6/paid.content.cy.js @@ -5,8 +5,15 @@ import { privacySettingsIframe } from '../../lib/privacySettingsIframe'; import { storage } from '@guardian/libs'; const paidContentPage = - 'https://www.theguardian.com/social-work-looking-to-the-future/2023/mar/13/social-work-in-2023-the-needs-the-challenges-and-reasons-to-be-optimistic'; - + 'https://www.theguardian.com/the-future-of-sustainable-entrepreneurship/2023/jun/01/take-your-sustainable-business-to-the-next-level-win-your-own-retail-space-at-one-of-londons-westfield-centres'; + +/** + * This test relies on labs campaigns, where the content is often taken down one the campaign is complete. + * If this happens you'll need to find a new labs article with a brand badge, you can often find these here: + * https://www.theguardian.com/tone/advertisement-features + * You need to edit the link as well as the expected requestURL to include the new brand in the code below, where it states `expect(requestURL).to.include('el=');`. + * You can grab the required info in the dev tools network tab on the page itself. + */ describe('Paid content tests', function () { beforeEach(function () { setLocalBaseUrl(); @@ -50,7 +57,7 @@ describe('Paid content tests', function () { let requestURL = interception.request.url; expect(requestURL).to.include('ec=click'); expect(requestURL).to.include('ea=sponsor%20logo'); - expect(requestURL).to.include('el=guardian%20jobs'); + expect(requestURL).to.include('el=westfield'); }); }); @@ -91,7 +98,7 @@ describe('Paid content tests', function () { let requestURL = interception.request.url; expect(requestURL).to.include('ec=click'); expect(requestURL).to.include('ea=sponsor%20logo'); - expect(requestURL).to.include('el=guardian%20jobs'); + expect(requestURL).to.include('el=westfield'); }); }); });