From 6281640fc4fb0f6f7b3b56cc34749465348cc7a2 Mon Sep 17 00:00:00 2001 From: mirovladimitrovski Date: Wed, 17 Jan 2024 13:26:07 +0100 Subject: [PATCH 1/2] fix: place consents in appropriate section --- src/components/Account/Account.tsx | 2 +- .../__snapshots__/Account.test.tsx.snap | 48 +++++-------------- 2 files changed, 13 insertions(+), 37 deletions(-) diff --git a/src/components/Account/Account.tsx b/src/components/Account/Account.tsx index 5342090d0..32af8496b 100644 --- a/src/components/Account/Account.tsx +++ b/src/components/Account/Account.tsx @@ -78,7 +78,7 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true } const nonTerms: Consent[] = []; publisherConsents?.forEach((consent) => { - if (consent?.type === 'checkbox') { + if (!consent?.type || consent?.type === 'checkbox') { terms.push(consent); } else { nonTerms.push(consent); diff --git a/src/components/Account/__snapshots__/Account.test.tsx.snap b/src/components/Account/__snapshots__/Account.test.tsx.snap index 57fdb4bda..2a20a13d7 100644 --- a/src/components/Account/__snapshots__/Account.test.tsx.snap +++ b/src/components/Account/__snapshots__/Account.test.tsx.snap @@ -134,51 +134,27 @@ exports[` > renders and matches snapshot 1`] = ` account.terms_and_tracking -
-
-
-
-
-

- account.other_registration_details -

-
-
+
+ Receive Marketing Emails +
From ba1e0de5b60c8a5bfed1e52bacaf15d977b69894 Mon Sep 17 00:00:00 2001 From: mirovladimitrovski Date: Wed, 17 Jan 2024 14:10:28 +0100 Subject: [PATCH 2/2] fix: fix e2e test --- test-e2e/tests/account_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-e2e/tests/account_test.ts b/test-e2e/tests/account_test.ts index d5979e09b..519575898 100644 --- a/test-e2e/tests/account_test.ts +++ b/test-e2e/tests/account_test.ts @@ -253,7 +253,7 @@ function runTestSuite(config: typeof testConfigs.svod, providerName: string, res Scenario(`I can update my consents - ${providerName}`, async ({ I }) => { I.amOnPage(constants.accountsUrl); I.waitForText('Profile info', longTimeout); - I.scrollTo('//*[text() = "Other registration details"]'); + I.scrollTo('//*[text() = "Legal & Marketing"]', undefined, -100); I.dontSeeCheckboxIsChecked(consentCheckbox); I.dontSee('Save');