diff --git a/packages/dotcom-ui-shell/src/__test__/components/GTMHead.test.tsx b/packages/dotcom-ui-shell/src/__test__/components/GTMHead.test.tsx index ca264db58..91c977c16 100644 --- a/packages/dotcom-ui-shell/src/__test__/components/GTMHead.test.tsx +++ b/packages/dotcom-ui-shell/src/__test__/components/GTMHead.test.tsx @@ -24,4 +24,16 @@ describe('dotcom-ui-shell/src/components/GTMHead', () => { const tree = renderer.create().toJSON() expect(tree).toMatchSnapshot() }) + + it('renders the first party gtm script when the ads-first-party-gtm flag is on', () => { + const props = { + flags: { + enableGTM: true, + 'ads-first-party-gtm': true + } + } + + const tree = renderer.create().toJSON() + expect(tree).toMatchSnapshot() + }) }) diff --git a/packages/dotcom-ui-shell/src/__test__/components/__snapshots__/GTMHead.test.tsx.snap b/packages/dotcom-ui-shell/src/__test__/components/__snapshots__/GTMHead.test.tsx.snap index 16f44b91b..b8ae656e1 100644 --- a/packages/dotcom-ui-shell/src/__test__/components/__snapshots__/GTMHead.test.tsx.snap +++ b/packages/dotcom-ui-shell/src/__test__/components/__snapshots__/GTMHead.test.tsx.snap @@ -2,15 +2,33 @@ exports[`dotcom-ui-shell/src/components/GTMHead renders null when the enableGTM flag is off 1`] = `null`; +exports[`dotcom-ui-shell/src/components/GTMHead renders the first party gtm script when the ads-first-party-gtm flag is on 1`] = ` +