diff --git a/client/__tests__/components/identity/__snapshots__/NewsletterPreference.test.tsx.snap b/client/__tests__/components/identity/__snapshots__/NewsletterPreference.test.tsx.snap index aff1bc555..388b0c701 100644 --- a/client/__tests__/components/identity/__snapshots__/NewsletterPreference.test.tsx.snap +++ b/client/__tests__/components/identity/__snapshots__/NewsletterPreference.test.tsx.snap @@ -6,7 +6,6 @@ exports[`NewsletterPreference component renders correctly and displays marketing font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; line-height: 1.333; margin-top: 12px; - padding-left: 30px; } .emotion-1 { @@ -307,7 +306,6 @@ exports[`NewsletterPreference component will select the checkbox when the select font-family: "Guardian Text Sans Web","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; line-height: 1.333; margin-top: 12px; - padding-left: 30px; } .emotion-1 { diff --git a/client/components/mma/identity/NewsletterPreference.tsx b/client/components/mma/identity/NewsletterPreference.tsx index 5c40a5aaa..cdbe51bab 100644 --- a/client/components/mma/identity/NewsletterPreference.tsx +++ b/client/components/mma/identity/NewsletterPreference.tsx @@ -120,7 +120,6 @@ export const NewsletterPreference: FC = (props) => { { lineHeight: '1.333', marginTop: '12px', - paddingLeft: '30px', }, ]} > diff --git a/client/components/mma/identity/PageSection.tsx b/client/components/mma/identity/PageSection.tsx index 533294105..a9a2e35f6 100644 --- a/client/components/mma/identity/PageSection.tsx +++ b/client/components/mma/identity/PageSection.tsx @@ -7,7 +7,6 @@ interface PageSectionProps { title?: string; description?: string | ReactNode; subtext?: string; - testSelector?: string; } const getTitle = (title: PageSectionProps['title']) => ( @@ -51,10 +50,9 @@ const getSubtext = (subtext: PageSectionProps['subtext']) => ( ); export const PageSection: FC = (props) => { - const { children, description, title, subtext, testSelector } = props; + const { children, description, title, subtext } = props; return (
= (props) => { const { newsletters, clickHandler } = props; return ( { .find('input[type=checkbox]') .should('not.be.checked'); - cy.get('[data-cy="your_newsletters"]') + cy.findByText('Your newsletters') + .parent() + .parent() .find('a') .click({ multiple: true }); - cy.get('[data-cy="your_newsletters"]') + cy.findByText('Your newsletters') + .parent() + .parent() .find('input[type=checkbox]') .should('not.be.checked'); });