diff --git a/packages/functional-tests/pages/resetPassword.ts b/packages/functional-tests/pages/resetPassword.ts index 3a45f6314f8..265d5a2f979 100644 --- a/packages/functional-tests/pages/resetPassword.ts +++ b/packages/functional-tests/pages/resetPassword.ts @@ -194,7 +194,7 @@ export class ResetPasswordPage extends BaseLayout { } async fillOutTotpForm(code: string) { - await this.page.getByLabel('Enter code').fill(code); + await this.page.getByLabel('Enter 6-digit code').fill(code); return this.page.getByRole('button', { name: 'Confirm' }).click(); } @@ -203,9 +203,7 @@ export class ResetPasswordPage extends BaseLayout { } async fillOurRecoveryCodeForm(code: string) { - await this.page - .getByLabel('Enter 10-digit backup authentication code') - .fill(code); + await this.page.getByLabel('Enter 10-character code').fill(code); return this.page.getByRole('button', { name: 'Confirm' }).click(); } diff --git a/packages/functional-tests/pages/signinRecoveryCode.ts b/packages/functional-tests/pages/signinRecoveryCode.ts index 078acfeaaf7..b9c96fea702 100644 --- a/packages/functional-tests/pages/signinRecoveryCode.ts +++ b/packages/functional-tests/pages/signinRecoveryCode.ts @@ -10,7 +10,7 @@ export class SigninRecoveryCodePage extends BaseTokenCodePage { get codeInput() { this.checkPath(); return this.page - .getByLabel('Enter 10-digit backup') // React + .getByLabel('Enter 10-character code') // React .or(this.page.getByPlaceholder('Enter 10-digit backup')); //Backbone } } diff --git a/packages/functional-tests/pages/signinTotpCode.ts b/packages/functional-tests/pages/signinTotpCode.ts index 39c9427ca1a..f8b697ab8e0 100644 --- a/packages/functional-tests/pages/signinTotpCode.ts +++ b/packages/functional-tests/pages/signinTotpCode.ts @@ -10,7 +10,7 @@ export class SigninTotpCodePage extends BaseTokenCodePage { get codeInput() { this.checkPath(); return this.page - .getByLabel('Enter code') // React + .getByLabel('Enter 6-digit code') // React .or(this.page.getByPlaceholder('Enter 6-digit code')); //Backbone } diff --git a/packages/fxa-settings/src/components/HeadingPrimary/index.stories.tsx b/packages/fxa-settings/src/components/HeadingPrimary/index.stories.tsx new file mode 100644 index 00000000000..0979645aefe --- /dev/null +++ b/packages/fxa-settings/src/components/HeadingPrimary/index.stories.tsx @@ -0,0 +1,14 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import React from 'react'; +import { HeadingPrimary } from '.'; +import { Meta } from '@storybook/react'; + +export default { + title: 'Components/HeadingPrimary', + component: HeadingPrimary, +} as Meta; + +export const Default = Primary heading text; diff --git a/packages/fxa-settings/src/components/HeadingPrimary/index.tsx b/packages/fxa-settings/src/components/HeadingPrimary/index.tsx new file mode 100644 index 00000000000..be83ff4df88 --- /dev/null +++ b/packages/fxa-settings/src/components/HeadingPrimary/index.tsx @@ -0,0 +1,13 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import React from 'react'; + +export const HeadingPrimary = ({ + children, + marginClass = 'mb-5', +}: { + children: React.ReactNode; + marginClass?: string; +}) =>

{children}

; diff --git a/packages/fxa-settings/src/components/InlineRecoveryKeySetupCreate/index.tsx b/packages/fxa-settings/src/components/InlineRecoveryKeySetupCreate/index.tsx index 11c4c2a6742..620f343750f 100644 --- a/packages/fxa-settings/src/components/InlineRecoveryKeySetupCreate/index.tsx +++ b/packages/fxa-settings/src/components/InlineRecoveryKeySetupCreate/index.tsx @@ -8,6 +8,7 @@ import { FtlMsg } from 'fxa-react/lib/utils'; import { CreateRecoveryKeyHandler } from '../../pages/InlineRecoveryKeySetup/interfaces'; import Banner from '../Banner'; import { useFtlMsgResolver } from '../../models'; +import { HeadingPrimary } from '../HeadingPrimary'; export const InlineRecoveryKeySetupCreate = ({ createRecoveryKeyHandler, @@ -50,11 +51,9 @@ export const InlineRecoveryKeySetupCreate = ({ content={{ localizedHeading: localizedErrorBannerMessage }} /> )} -

- - Secure your account - -

+ + Secure your account + diff --git a/packages/fxa-settings/src/pages/InlineRecoveryKeySetup/index.tsx b/packages/fxa-settings/src/pages/InlineRecoveryKeySetup/index.tsx index 6feb6fa903a..90b398d765f 100644 --- a/packages/fxa-settings/src/pages/InlineRecoveryKeySetup/index.tsx +++ b/packages/fxa-settings/src/pages/InlineRecoveryKeySetup/index.tsx @@ -14,6 +14,7 @@ import { InlineRecoveryKeySetupProps } from './interfaces'; import RecoveryKeySetupHint from '../../components/RecoveryKeySetupHint'; import Banner from '../../components/Banner'; import { useFtlMsgResolver } from '../../models'; +import { HeadingPrimary } from '../../components/HeadingPrimary'; const viewName = 'inline-recovery-key-setup'; @@ -43,11 +44,9 @@ export const InlineRecoveryKeySetup = ({ case 3: return ( <> -

- - Security recommendation - -

+ + Security recommendation + { @@ -69,11 +68,9 @@ export const InlineRecoveryKeySetup = ({ ), }} /> -

- - Secure your account - -

+ + Secure your account +

diff --git a/packages/fxa-settings/src/pages/ResetPassword/AccountRecoveryConfirmKey/index.tsx b/packages/fxa-settings/src/pages/ResetPassword/AccountRecoveryConfirmKey/index.tsx index f8cd7b950c8..6e037608de7 100644 --- a/packages/fxa-settings/src/pages/ResetPassword/AccountRecoveryConfirmKey/index.tsx +++ b/packages/fxa-settings/src/pages/ResetPassword/AccountRecoveryConfirmKey/index.tsx @@ -22,6 +22,7 @@ import { getLocalizedErrorMessage } from '../../../lib/error-utils'; import { RecoveryKeyImage } from '../../../components/images'; import { Constants } from '../../../lib/constants'; import Banner from '../../../components/Banner'; +import { HeadingPrimary } from '../../../components/HeadingPrimary'; // TODO in FXA-7894 use sensitive data client to pass sensitive data // Depends on FXA-7400 @@ -138,23 +139,19 @@ const AccountRecoveryConfirmKey = ({ }; return ( - + -

- Reset your password -

+ Reset your password
{errorMessage && ( )} -

- Enter your account recovery key -

+

Enter your account recovery key

-

+

This key recovers your encrypted browsing data, such as passwords and bookmarks, from Firefox servers.

@@ -190,7 +187,7 @@ const AccountRecoveryConfirmKey = ({
{recoveryKeyHint && ( -
+

Your storage hint is:

diff --git a/packages/fxa-settings/src/pages/ResetPassword/CompleteResetPassword/index.tsx b/packages/fxa-settings/src/pages/ResetPassword/CompleteResetPassword/index.tsx index 2ca0b1cd45d..fcf053e34e3 100644 --- a/packages/fxa-settings/src/pages/ResetPassword/CompleteResetPassword/index.tsx +++ b/packages/fxa-settings/src/pages/ResetPassword/CompleteResetPassword/index.tsx @@ -18,6 +18,7 @@ import { FtlMsg } from 'fxa-react/lib/utils'; import ResetPasswordWarning from '../../../components/ResetPasswordWarning'; import { Link, useLocation } from '@reach/router'; import Banner from '../../../components/Banner'; +import { HeadingPrimary } from '../../../components/HeadingPrimary'; const CompleteResetPassword = ({ email, @@ -63,11 +64,9 @@ const CompleteResetPassword = ({ }; return ( - + -

- Reset your password -

+ Reset your password
{/* @@ -92,11 +91,9 @@ const CompleteResetPassword = ({ -

- Create a new password -

+

Create a new password

-
+
+ -

Reset your password

+ Reset your password
{resendStatus === ResendStatus.sent && !hasResendError && ( @@ -61,16 +62,14 @@ const ConfirmResetPassword = ({ )} -

Check your email

+

Check your email

-

- We sent a confirmation code to {spanElement}. -

+

We sent a confirmation code to {spanElement}.

-
+