Skip to content

Commit

Permalink
fix(fxa-auth-server) change user-facing 'verify' references to 'confi…
Browse files Browse the repository at this point in the history
…rm' in emails

fix(fxa-settings): swap in 'confirm' for 'verify'

fix(fxa-auth-server): update 'verify' to 'confirm'

fix(fxa-support-panel): update 'verify' to 'confirm' in copy

fix(fxa-content-server): update 'verify' to 'confirm'

fix(fxa-settings) append string version to translation id for fluent

fix(fxa-settings): fix failing test (also failing on main)

fix(fxa-auth-server): update tests

Update packages/fxa-auth-server/lib/senders/emails/templates/verifyPrimary/en.ftl

Co-authored-by: Bryan Olsson <bolsson@mozilla.com>

chore(fxa-auth-server): add tests and errors to string id util, update impacted tests
  • Loading branch information
millmason committed Aug 10, 2022
1 parent d3139ef commit b88cfd9
Show file tree
Hide file tree
Showing 82 changed files with 387 additions and 256 deletions.
2 changes: 1 addition & 1 deletion packages/functional-tests/lib/fixtures/standard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const test = base.extend<TestOptions, WorkerOptions>({
try {
await target.auth.accountDestroy(credentials.email, credentials.password);
} catch (error: any) {
if (error.message === 'Unverified session') {
if (error.message === 'Unconfirmed session') {
// If totp was enabled we'll need a verified session to destroy the account
if (credentials.secret) {
// we don't know if the original session still exists
Expand Down
4 changes: 2 additions & 2 deletions packages/functional-tests/tests/settings/misc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test.describe('severity-1 #smoke', () => {
credentials,
pages: { settings, deleteAccount, page },
}) => {
test.slow();
test.slow();
await settings.goto();
await settings.clickDeleteAccount();
await deleteAccount.checkAllBoxes();
Expand Down Expand Up @@ -76,7 +76,7 @@ test.describe('severity-2 #smoke', () => {
await secondaryEmail.submit();
// skip verification
await settings.goto();
expect(await settings.secondaryEmail.statusText()).toMatch('UNVERIFIED');
expect(await settings.secondaryEmail.statusText()).toMatch('UNCONFIRMED');
await settings.secondaryEmail.clickDelete();
await settings.waitForAlertBar();
expect(await settings.alertBarText()).toMatch('successfully deleted');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ it('displays the account', async () => {
);

expect(getByTestId('account-section')).toBeInTheDocument();
expect(getByTestId('account-verified-status')).toHaveTextContent('verified');
expect(getByTestId('account-verified-status')).toHaveTextContent('confirmed');
expect(getByTestId('email-label')).toHaveTextContent(
accountResponse.emails![0].email
);
Expand Down Expand Up @@ -250,7 +250,7 @@ it('displays the unverified account', async () => {
</MockedProvider>
);
expect(getByTestId('account-verified-status')).toHaveTextContent(
'not verified'
'not confirmed'
);
});

Expand Down Expand Up @@ -344,5 +344,5 @@ it('displays secondary emails', async () => {
expect(getByTestId('secondary-email')).toHaveTextContent(
'ohdeceiver@gmail.com'
);
expect(getByTestId('secondary-verified')).toHaveTextContent('not verified');
expect(getByTestId('secondary-verified')).toHaveTextContent('not confirmed');
});
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ export const DangerZone = ({
}: DangerZoneProps) => {
const [unverify, { loading: unverifyLoading }] = useMutation(UNVERIFY_EMAIL, {
onCompleted: () => {
window.alert("The user's email has been unverified.");
window.alert("The user's email has been unconfirmed.");
onCleared();
},
onError: () => {
window.alert('Error in unverifying email');
window.alert('Error in unconfirming email');
},
});

Expand Down Expand Up @@ -248,17 +248,17 @@ export const DangerZone = ({
</p>
</Guard>
<Guard features={[AdminPanelFeature.UnverifyEmail]}>
<h2 className="text-lg account-header">Email Verification</h2>
<h2 className="text-lg account-header">Email Confirmation</h2>
<div className="border-l-2 border-red-600 mb-4 pl-4">
<p className="text-base leading-6">
Reset email verification. User needs to re-verify on next login.
Reset email confirmation. User needs to re-confirm on next login.
</p>
<button
className="bg-grey-10 border-2 border-grey-100 font-medium h-12 leading-6 mt-4 mr-4 rounded text-red-700 w-40 hover:border-2 hover:border-grey-10 hover:bg-grey-50 hover:text-red-700"
type="button"
onClick={handleUnverify}
>
Unverify Email
Unconfirm Email
</button>
<br />
<p className="text-base">{unverifyMessage}</p>
Expand Down Expand Up @@ -360,7 +360,7 @@ export const Account = ({
: 'account-disabled-unverified'
}
>
{primaryEmail.isVerified ? 'verified' : 'not verified'}
{primaryEmail.isVerified ? 'confirmed' : 'not confirmed'}
</span>
}
/>
Expand Down Expand Up @@ -431,7 +431,7 @@ export const Account = ({
: 'account-disabled-unverified'
}`}
>
{secondaryEmail.isVerified ? 'verified' : 'not verified'}
{secondaryEmail.isVerified ? 'confirmed' : 'not confirmed'}
</span>
</li>
))}
Expand Down Expand Up @@ -766,7 +766,7 @@ const TotpEnabled = ({ verified, createdAt, enabled }: TotpType) => {
TOTP Created At: <span data-testid="totp-created-at">{totpDate}</span>
</li>
<li className="account-li">
TOTP Verified:{' '}
TOTP Confirmed:{' '}
<span
data-testid="totp-verified"
className={`ml-3 text-base ${
Expand All @@ -775,7 +775,7 @@ const TotpEnabled = ({ verified, createdAt, enabled }: TotpType) => {
: 'account-disabled-unverified'
}`}
>
{verified ? 'verified' : 'not verified'}
{verified ? 'confirmed' : 'not confirmed'}
</span>
</li>
<li className="account-li">
Expand Down Expand Up @@ -812,7 +812,7 @@ const RecoveryKeys = ({ verifiedAt, createdAt, enabled }: RecoveryKeysType) => {
</span>
</li>
<li className="account-li">
Recovery Key Verified At:{' '}
Recovery Key Confirmed At:{' '}
<span
data-testid="recovery-keys-verified"
className={`ml-3 text-base ${
Expand All @@ -821,7 +821,7 @@ const RecoveryKeys = ({ verifiedAt, createdAt, enabled }: RecoveryKeysType) => {
: 'account-disabled-unverified'
}`}
>
{verifiedAt ? recoveryKeyVerifiedDate : 'not verified'}
{verifiedAt ? recoveryKeyVerifiedDate : 'not confirmed'}
</span>
</li>
<li className="account-li">
Expand Down
14 changes: 7 additions & 7 deletions packages/fxa-auth-server/lib/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ AppError.unverifiedAccount = function () {
code: 400,
error: 'Bad Request',
errno: ERRNO.ACCOUNT_UNVERIFIED,
message: 'Unverified account',
message: 'Unconfirmed account',
});
};

Expand All @@ -396,7 +396,7 @@ AppError.invalidVerificationCode = function (details) {
code: 400,
error: 'Bad Request',
errno: ERRNO.INVALID_VERIFICATION_CODE,
message: 'Invalid verification code',
message: 'Invalid confirmation code',
},
details
);
Expand Down Expand Up @@ -844,7 +844,7 @@ AppError.unverifiedSession = function () {
code: 400,
error: 'Bad Request',
errno: ERRNO.SESSION_UNVERIFIED,
message: 'Unverified session',
message: 'Unconfirmed session',
});
};

Expand Down Expand Up @@ -955,7 +955,7 @@ AppError.cannotChangeEmailToUnverifiedEmail = function () {
code: 400,
error: 'Bad Request',
errno: ERRNO.CHANGE_EMAIL_TO_UNVERIFIED_EMAIL,
message: 'Can not change primary email to an unverified email',
message: 'Can not change primary email to an unconfirmed email',
});
};

Expand Down Expand Up @@ -1011,7 +1011,7 @@ AppError.invalidTokenVerficationCode = function (details) {
code: 400,
error: 'Bad Request',
errno: ERRNO.INVALID_TOKEN_VERIFICATION_CODE,
message: 'Invalid token verification code',
message: 'Invalid token confirmation code',
},
details
);
Expand All @@ -1023,7 +1023,7 @@ AppError.expiredTokenVerficationCode = function (details) {
code: 400,
error: 'Bad Request',
errno: ERRNO.EXPIRED_TOKEN_VERIFICATION_CODE,
message: 'Expired token verification code',
message: 'Expired token confirmation code',
},
details
);
Expand Down Expand Up @@ -1469,7 +1469,7 @@ AppError.invalidOrExpiredOtpCode = () => {
code: 400,
error: 'Bad Request',
errno: ERRNO.INVALID_EXPIRED_OTP_CODE,
message: 'Invalid or expired verification code',
message: 'Invalid or expired confirmation code',
});
};

Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-auth-server/lib/l10n/auth.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
## Non-email strings

session-verify-send-push-title = Logging in to { -product-firefox-accounts }?
session-verify-send-push-body = Click here to verify it’s you
session-verify-send-push-body-2 = Click here to confirm it’s you
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@
"postAddLinkedAccount": 1,
"postChangePrimary": 5,
"postRemoveSecondary": 5,
"postVerify": 6,
"postVerifySecondary": 5,
"postVerify": 7,
"postVerifySecondary": 6,
"recovery": 5,
"unblockCode": 6,
"verificationReminderFirst": 9,
"verificationReminderSecond": 9,
"verificationReminderSecond": 10,
"verify": 6,
"verifyPrimary": 7,
"verifyPrimary": 8,
"verifyLogin": 5,
"verifyLoginCode": 6,
"verifyShortCode": 3,
"verifySecondaryCode": 2,
"verifyLoginCode": 7,
"verifyShortCode": 4,
"verifySecondaryCode": 3,
"postAddTwoStepAuthentication": 8,
"postRemoveTwoStepAuthentication": 8,
"postConsumeRecoveryCode": 5,
Expand All @@ -47,6 +47,6 @@
"postRemoveAccountRecovery": 6,
"cadReminderFirst": 3,
"cadReminderSecond": 3,
"subscriptionAccountReminderFirst": 2,
"subscriptionAccountReminderSecond": 2
"subscriptionAccountReminderFirst": 3,
"subscriptionAccountReminderSecond": 3
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
postVerify-sub-title = { -product-firefox-account } verified. You’re almost there.
postVerify-sub-title-2 = { -product-firefox-account } confirmed. You’re almost there.
postVerify-title = Next sync between your devices!
postVerify-description = Sync privately keeps your bookmarks, passwords and other { -brand-firefox } data the same across all your devices.
postVerify-subject = Account verified. Next, sync another device to finish setup
postVerify-subject-2 = Account confirmed. Next, sync another device to finish setup
postVerify-setup = Set up next device
postVerify-action = Set up next device
# Variables:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"subject": {
"id": "postVerify-subject",
"message": "Account verified. Next, sync another device to finish setup"
"id": "postVerify-subject-2",
"message": "Account confirmed. Next, sync another device to finish setup"
},
"action": {
"id": "postVerify-action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<mj-section>
<mj-column>
<mj-text css-class="text-sub-body">
<span data-l10n-id="postVerify-sub-title">Firefox account verified. You’re almost there.</span>
<span data-l10n-id="postVerify-sub-title-2">Firefox account confirmed. You’re almost there.</span>
</mj-text>
<mj-text css-class="text-header">
<span data-l10n-id="postVerify-title">Next sync between your devices!</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
postVerify-sub-title = "Firefox account verified. You’re almost there."
postVerify-sub-title-2 = "Firefox account confirmed. You’re almost there."

postVerify-title = "Next sync between your devices!"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ postVerifySecondary-subject = Secondary email added
postVerifySecondary-title = Secondary email added
# Variables:
# $secondaryEmail (String) - A user's secondary email address
postVerifySecondary-content = You have successfully verified { $secondaryEmail } as a secondary email for your { -product-firefox-account }. Security notifications and sign-in confirmations will now be delivered to both email addresses.
postVerifySecondary-content-2 = You have successfully confirmed { $secondaryEmail } as a secondary email for your { -product-firefox-account }. Security notifications and sign-in confirmations will now be delivered to both email addresses.
postVerifySecondary-action = Manage account
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<mj-column>
<mj-text css-class="text-body">
<span
data-l10n-id="postVerifySecondary-content"
data-l10n-id="postVerifySecondary-content-2"
data-l10n-args="<%= JSON.stringify({secondaryEmail}) %>">
You have successfully verified <%- secondaryEmail %> as a secondary
You have successfully confirmed <%- secondaryEmail %> as a secondary
email for your Firefox account. Security notifications and sign-in
confirmations will now be delivered to both email addresses.
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
postVerifySecondary-title = "Secondary email added"

postVerifySecondary-content = "You have successfully verified <%- secondaryEmail %> as a secondary email for your Firefox account. Security notifications and sign-in confirmations will now be delivered to both email addresses."
postVerifySecondary-content-2 = "You have successfully confirmed <%- secondaryEmail %> as a secondary email for your Firefox account. Security notifications and sign-in confirmations will now be delivered to both email addresses."

<%- include('/partials/manageAccount/index.txt') %>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
subscriptionAccountReminderFirst-subject = Reminder: Finish setting up your account
subscriptionAccountReminderFirst-title = You can’t access your subscription yet
subscriptionAccountReminderFirst-content-info = A few days ago you created a { -product-firefox-account } but never verified it. We hope you’ll finish setting up your account, so you can use your new subscription.
subscriptionAccountReminderFirst-content-select = Select “Create Password” to set up a new password and finish verifying your account.
subscriptionAccountReminderFirst-content-info-2 = A few days ago you created a { -product-firefox-account } but never confirmed it. We hope you’ll finish setting up your account, so you can use your new subscription.
subscriptionAccountReminderFirst-content-select-2 = Select “Create Password” to set up a new password and finish confirming your account.
subscriptionAccountReminderFirst-action = Create Password
subscriptionAccountReminderFirst-action-plaintext = { subscriptionAccountReminderFirst-action }:
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</mj-text>
<mj-text css-class="text-body">
<span data-l10n-id="subscriptionAccountReminderFirst-content-info">
A few days ago you created a Firefox account but never verified it. We hope you’ll finish setting up your account, so you can use your new subscription.
<span data-l10n-id="subscriptionAccountReminderFirst-content-info-2">
A few days ago you created a Firefox account but never confirmed it. We hope you’ll finish setting up your account, so you can use your new subscription.
</span>
</mj-text>
<mj-text css-class="text-body">
<span data-l10n-id="subscriptionAccountReminderFirst-content-select">
Select “Create Password” to set up a new password and finish verifying your account.
<span data-l10n-id="subscriptionAccountReminderFirst-content-select-2">
Select “Create Password” to set up a new password and finish confirming your account.
</span>
</mj-text>
</mj-column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ subscriptionAccountReminderFirst-subject = "Reminder: Finish setting up your acc

subscriptionAccountReminderFirst-title = "You can’t access your subscription yet"

subscriptionAccountReminderFirst-content-info = "A few days ago you created a Firefox account but never verified it. We hope you’ll finish setting up your account, so you can use your new subscription."
subscriptionAccountReminderFirst-content-info-2 = "A few days ago you created a Firefox account but never confirmed it. We hope you’ll finish setting up your account, so you can use your new subscription."

subscriptionAccountReminderFirst-content-select = "Select “Create Password” to set up a new password and finish verifying your account."
subscriptionAccountReminderFirst-content-select-2 = "Select “Create Password” to set up a new password and finish confirming your account."

subscriptionAccountReminderFirst-action-plaintext = "Create Password:"
<%- link %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
subscriptionAccountReminderSecond-subject = Final reminder: Setup your account
subscriptionAccountReminderSecond-title = Welcome to { -brand-firefox }!
subscriptionAccountReminderSecond-content-info = A few days ago you created a { -product-firefox-account } but never verified it. We hope you’ll finish setting up your account, so you can use your new subscription.
subscriptionAccountReminderSecond-content-select = Select “Create Password” to set up a new password and finish verifying your account.
subscriptionAccountReminderSecond-content-info-2 = A few days ago you created a { -product-firefox-account } but never confirmed it. We hope you’ll finish setting up your account, so you can use your new subscription.
subscriptionAccountReminderSecond-content-select-2 = Select “Create Password” to set up a new password and finish confirming your account.
subscriptionAccountReminderSecond-action = Create Password
subscriptionAccountReminderSecond-action-plaintext = { subscriptionAccountReminderSecond-action }:
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</mj-text>
<mj-text css-class="text-body">
<span data-l10n-id="subscriptionAccountReminderSecond-content-info">
A few days ago you created a Firefox account but never verified it. We hope you’ll finish setting up your account, so you can use your new subscription.
<span data-l10n-id="subscriptionAccountReminderSecond-content-info-2">
A few days ago you created a Firefox account but never confirmed it. We hope you’ll finish setting up your account, so you can use your new subscription.
</span>
</mj-text>
<mj-text css-class="text-body">
<span data-l10n-id="subscriptionAccountReminderSecond-content-select">
Select “Create Password” to set up a new password and finish verifying your account.
<span data-l10n-id="subscriptionAccountReminderSecond-content-select-2">
Select “Create Password” to set up a new password and finish confirming your account.
</span>
</mj-text>
</mj-column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ subscriptionAccountReminderSecond-subject = "Final reminder: Setup your account"

subscriptionAccountReminderSecond-title = "Welcome to Firefox!"

subscriptionAccountReminderSecond-content-info = "A few days ago you created a Firefox account but never verified it. We hope you’ll finish setting up your account, so you can use your new subscription."
subscriptionAccountReminderSecond-content-info-2 = "A few days ago you created a Firefox account but never confirmed it. We hope you’ll finish setting up your account, so you can use your new subscription."

subscriptionAccountReminderSecond-content-select = "Select “Create Password” to set up a new password and finish verifying your account."
subscriptionAccountReminderSecond-content-select-2 = "Select “Create Password” to set up a new password and finish confirming your account."

subscriptionAccountReminderSecond-action-plaintext = "Create Password:"
<%- link %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
verificationReminderSecond-subject = Final reminder: Activate your account
verificationReminderSecond-title = Still there?
verificationReminderSecond-description = Almost a week ago you created a { -product-firefox-account } but never verified it. We’re worried about you.
verificationReminderSecond-description-2 = Almost a week ago you created a { -product-firefox-account } but never confirmed it. We’re worried about you.
verificationReminderSecond-sub-description = Confirm this email address to activate your account and let us know you’re okay.
verificationReminderSecond-action = Confirm email
Loading

0 comments on commit b88cfd9

Please sign in to comment.