Skip to content

Commit

Permalink
Merge pull request #15452 from mozilla/fxa-7373
Browse files Browse the repository at this point in the history
fix(text): Don't display `Step 1 of 2` when deleting account with no password set
  • Loading branch information
vbudhram authored Jun 15, 2023
2 parents d8eb1e4 + 453a44b commit c967d03
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/fxa-admin-server/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ const conf = convict({
googleAuthConfig: {
clientId: {
default:
'210899493109-u0erdakhegg6b572faenm3mn9hf4mdp8.apps.googleusercontent.com',
'218517873053-th4taguk9dvf03rrgk8sigon84oigf5l.apps.googleusercontent.com',
env: 'GOOGLE_AUTH_CLIENT_ID',
format: String,
doc: 'Google auth client id',
Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-auth-server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const convictConf = convict({
googleAuthConfig: {
clientId: {
default:
'210899493109-u0erdakhegg6b572faenm3mn9hf4mdp8.apps.googleusercontent.com',
'218517873053-th4taguk9dvf03rrgk8sigon84oigf5l.apps.googleusercontent.com',
env: 'GOOGLE_AUTH_CLIENT_ID',
format: String,
doc: 'Google auth client id',
Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-content-server/server/lib/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ const conf = (module.exports = convict({
},
clientId: {
default:
'210899493109-u0erdakhegg6b572faenm3mn9hf4mdp8.apps.googleusercontent.com',
'218517873053-th4taguk9dvf03rrgk8sigon84oigf5l.apps.googleusercontent.com',
env: 'GOOGLE_AUTH_CLIENT_ID',
format: String,
doc: 'Google auth client id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ describe('PageDeleteAccount', () => {
</AppContext.Provider>
);

expect(screen.queryByText('Step 1 of 2')).toBeNull();

await advanceStep();

expect(logViewEvent).toHaveBeenCalledWith(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* 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, { useCallback, useState, ChangeEvent } from 'react';
import React, { useCallback, useState, ChangeEvent, useEffect } from 'react';
import { useForm } from 'react-hook-form';
import { RouteComponentProps, useNavigate } from '@reach/router';
import { useAccount, useAlertBar } from '../../../models';
Expand Down Expand Up @@ -117,6 +117,12 @@ export const PageDeleteAccount = (_: RouteComponentProps) => {
const goHome = useCallback(() => window.history.back(), []);

const account = useAccount();

useEffect(() => {
if (!account.hasPassword) {
setSubtitleText('');
}
}, [account.hasPassword]);

const advanceStep = () => {
// Accounts that do not have a password set, will delete immediately
Expand Down

0 comments on commit c967d03

Please sign in to comment.