Skip to content

Commit 62e4cb4

Browse files
authored
Merge pull request #13398 from guardian/ph-20250217-1259-emily
signin gates edit: remove the privacy settings sentence in both legacy and auxia gates
2 parents f9fa9fb + 1f67b6f commit 62e4cb4

File tree

6 files changed

+5
-105
lines changed

6 files changed

+5
-105
lines changed

dotcom-rendering/playwright/tests/sign-in-gate.e2e.spec.ts

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import {
88
SIGN_IN_PROMPT,
99
SUBSCRIPTION_HEADER,
1010
} from '../../src/lib/signInAfterCheckOutText';
11-
import { CMP_LAYER1_IFRAME, cmpAcceptAll, disableCMP } from '../lib/cmp';
12-
import { addCookie, clearCookie } from '../lib/cookies';
13-
import { getIframeBody } from '../lib/iframe';
11+
import { disableCMP } from '../lib/cmp';
12+
import { addCookie } from '../lib/cookies';
1413
import { loadPageWithOverrides } from '../lib/load-page';
1514
import { expectToBeVisible, expectToNotExist } from '../lib/locators';
1615

@@ -225,35 +224,6 @@ test.describe('Sign In Gate Tests', () => {
225224

226225
expect(signInHref).toContain('profile.theguardian.com/signin');
227226
});
228-
229-
test('show cmp ui when privacy settings link is clicked', async ({
230-
context,
231-
page,
232-
}) => {
233-
// For this test remove the gu-cmp-disabled cookie to ensure cmp is shown
234-
await clearCookie(context, 'gu-cmp-disabled');
235-
236-
await loadPageWithOverrides(page, standardArticle);
237-
238-
await cmpAcceptAll(page);
239-
240-
// set article count to be min number to view gate
241-
await setArticleCount(page, 3);
242-
243-
await scrollToGateForLazyLoading(page);
244-
245-
await expectToBeVisible(page, SIGN_IN_GATE_MAIN_SELECTOR);
246-
247-
await page
248-
.locator('[data-testid=sign-in-gate-main_privacy]')
249-
.click();
250-
251-
await expectToBeVisible(page, CMP_LAYER1_IFRAME);
252-
253-
await expect(
254-
await getIframeBody(page, CMP_LAYER1_IFRAME),
255-
).toContainText('Privacy settings');
256-
});
257227
});
258228

259229
test.describe('SignInGate Personalised', () => {

dotcom-rendering/src/components/SignInGate/gateDesigns/SignInGateAuxia.tsx

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { cmp } from '@guardian/libs';
21
import { Button, Link, LinkButton } from '@guardian/source/react-components';
32
import { useConfig } from '../../ConfigContext';
43
import { trackLink } from '../componentEventTracking';
@@ -13,7 +12,6 @@ import {
1312
headingStyles,
1413
hideElementsCss,
1514
laterButton,
16-
privacyLink,
1715
registerButton,
1816
signInGateContainer,
1917
signInHeader,
@@ -39,13 +37,11 @@ export const SignInGateAuxia = ({
3937
The component must be written to gracefully handle empty values for the following field:
4038
- subtitle
4139
- body
42-
- privacy_button_name
4340
*/
4441

4542
const title = treatmentContent.title;
4643
const subtitle = treatmentContent.subtitle;
4744
const body = treatmentContent.body;
48-
const privacy_button_name = treatmentContent.privacy_button_name;
4945
const firstCtaName = treatmentContent.first_cta_name;
5046
const firstCtaLink = treatmentContent.first_cta_link;
5147
const secondCtaName = treatmentContent.second_cta_name;
@@ -60,32 +56,7 @@ export const SignInGateAuxia = ({
6056
<div css={firstParagraphOverlay} />
6157
<h1 css={headingStyles}>{title}</h1>
6258
{hasContent(subtitle) && <p css={bodyBold}>{subtitle}</p>}
63-
{hasContent(body) && (
64-
<p css={bodyText}>
65-
{body}{' '}
66-
{hasContent(privacy_button_name) && (
67-
<button
68-
data-testid="sign-in-gate-main_privacy"
69-
css={privacyLink}
70-
onClick={async () => {
71-
cmp.showPrivacyManager();
72-
trackLink(
73-
ophanComponentId,
74-
'privacy',
75-
renderingTarget,
76-
abTest,
77-
);
78-
await logTreatmentInteractionCall(
79-
'CLICKED',
80-
'PRIVACY-BUTTON',
81-
);
82-
}}
83-
>
84-
privacy settings
85-
</button>
86-
)}
87-
</p>
88-
)}
59+
{hasContent(body) && <p css={bodyText}>{body}</p>}
8960
<div css={actionButtons}>
9061
<LinkButton
9162
data-testid="sign-in-gate-main_register"

dotcom-rendering/src/components/SignInGate/gateDesigns/SignInGateFakeSocial.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { css } from '@emotion/react';
2-
import { cmp } from '@guardian/libs';
32
import {
43
from,
54
headlineBold28,
@@ -21,7 +20,6 @@ import {
2120
firstParagraphOverlay,
2221
hideElementsCss,
2322
laterButton,
24-
privacyLink,
2523
registerButton,
2624
signInGateContainer,
2725
signInLink,
@@ -311,25 +309,6 @@ export const SignInGateFakeSocial = ({
311309
you’re helping us to engage with you more deeply, and that allow
312310
us to keep our journalism free for all.
313311
</p>
314-
<p css={[bodyText, bodyPadding]}>
315-
You’ll always be able to control your own&nbsp;
316-
<button
317-
data-testid="sign-in-gate-fake-social_privacy"
318-
css={privacyLink}
319-
onClick={() => {
320-
cmp.showPrivacyManager();
321-
trackLink(
322-
ophanComponentId,
323-
'privacy',
324-
renderingTarget,
325-
abTest,
326-
);
327-
}}
328-
>
329-
privacy settings
330-
</button>{' '}
331-
and every article will remain free.
332-
</p>
333312
<div css={[actionButtons, buttonMargin, bodyPadding]}>
334313
<LinkButton
335314
data-testid="sign-in-gate-fake-social_register"

dotcom-rendering/src/components/SignInGate/gateDesigns/SignInGateMain.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { cmp } from '@guardian/libs';
21
import { Button, Link, LinkButton } from '@guardian/source/react-components';
32
import { useConfig } from '../../ConfigContext';
43
import { trackLink } from '../componentEventTracking';
@@ -13,7 +12,6 @@ import {
1312
headingStyles,
1413
hideElementsCss,
1514
laterButton,
16-
privacyLink,
1715
registerButton,
1816
signInGateContainer,
1917
signInHeader,
@@ -43,24 +41,7 @@ export const SignInGateMain = ({
4341
We’re committed to keeping our quality reporting open. By
4442
registering and providing us with insight into your preferences,
4543
you’re helping us to engage with you more deeply, and that
46-
allows us to keep our journalism free for all. You’ll always be
47-
able to control your own{' '}
48-
<button
49-
data-testid="sign-in-gate-main_privacy"
50-
css={privacyLink}
51-
onClick={() => {
52-
cmp.showPrivacyManager();
53-
trackLink(
54-
ophanComponentId,
55-
'privacy',
56-
renderingTarget,
57-
abTest,
58-
);
59-
}}
60-
>
61-
privacy settings
62-
</button>
63-
.
44+
allows us to keep our journalism free for all.
6445
</p>
6546
<div css={actionButtons}>
6647
<LinkButton

dotcom-rendering/src/components/SignInGate/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export interface TreatmentContentDecoded {
9393
title: string;
9494
subtitle: string;
9595
body: string;
96-
privacy_button_name: string;
9796
first_cta_name: string;
9897
first_cta_link: string;
9998
second_cta_name: string;

dotcom-rendering/src/components/SignInGateSelector.importable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ const decideDailyArticleCount = (): number => {
486486
const decideAuxiaProxyReaderPersonalData =
487487
async (): Promise<AuxiaGateReaderPersonalData> => {
488488
const browserId =
489-
getCookie({ name: 'bwid', shouldMemoize: true }) ?? '';
489+
getCookie({ name: 'bwid', shouldMemoize: true }) ?? undefined;
490490
const dailyArticleCount = decideDailyArticleCount();
491491
const hasConsent = await hasCmpConsentForBrowserId();
492492
const isSupporter = decideIsSupporter();

0 commit comments

Comments
 (0)