diff --git a/.changelog/1869.internal.md b/.changelog/1869.internal.md new file mode 100644 index 0000000000..3823a3db6a --- /dev/null +++ b/.changelog/1869.internal.md @@ -0,0 +1 @@ +Show better description in Delete Profile dialog if user forgot their password diff --git a/playwright/tests/persist.spec.ts b/playwright/tests/persist.spec.ts index cf10af2bc1..6acc523486 100644 --- a/playwright/tests/persist.spec.ts +++ b/playwright/tests/persist.spec.ts @@ -225,12 +225,8 @@ test.describe('Persist', () => { }) async function testDeletingAndCreatingNew(page: Page) { - await page.getByRole('button', { name: 'Delete profile' }).click() - await page - .getByLabel( - "Are you sure you want to delete this profile? This action cannot be undone and will erase your private keys.To continue please enter 'delete' below.", - ) - .fill('delete') + await page.getByRole('button', { name: 'Forgot password?' }).click() + await page.getByLabel(/To confirm and proceed/).fill('delete') await page.getByRole('button', { name: 'Yes, delete' }).click() await page.getByRole('button', { name: /Open wallet/ }).click() diff --git a/playwright/tests/toolbar.spec.ts b/playwright/tests/toolbar.spec.ts index bdccc68df7..b986d6021c 100644 --- a/playwright/tests/toolbar.spec.ts +++ b/playwright/tests/toolbar.spec.ts @@ -24,7 +24,7 @@ test.describe('Profile tab', () => { await page.getByTestId('account-selector').click() await page.getByTestId('toolbar-profile-tab').click() await page.getByRole('button', { name: 'Delete profile' }).click() - await page.getByLabel(/Are you sure you want/).fill('delete') + await page.getByLabel(/To confirm and proceed/).fill('delete') await page.getByRole('button', { name: 'Yes, delete' }).click() await expect(page).not.toHaveURL(new RegExp(`/account/${privateKeyAddress}`)) }) diff --git a/src/app/components/FatalErrorHandler/index.tsx b/src/app/components/FatalErrorHandler/index.tsx index 148967ed78..2c240651a5 100644 --- a/src/app/components/FatalErrorHandler/index.tsx +++ b/src/app/components/FatalErrorHandler/index.tsx @@ -61,7 +61,7 @@ export function FatalErrorHandler({ children }: Props) { return ( - {t('appTitle')} + {t('appTitle', diff --git a/src/app/components/Persist/DeleteProfileButton.tsx b/src/app/components/Persist/DeleteProfileButton.tsx index 965cbc5f27..0557ee8da7 100644 --- a/src/app/components/Persist/DeleteProfileButton.tsx +++ b/src/app/components/Persist/DeleteProfileButton.tsx @@ -12,9 +12,10 @@ import { Header } from 'app/components/Header' interface DeleteProfileButtonProps { prominent?: boolean + variant: 'voluntary' | 'forgot-password' } -export function DeleteProfileButton({ prominent }: DeleteProfileButtonProps) { +export function DeleteProfileButton({ prominent, variant }: DeleteProfileButtonProps) { const { t } = useTranslation() const dispatch = useDispatch() const navigate = useNavigate() @@ -33,7 +34,11 @@ export function DeleteProfileButton({ prominent }: DeleteProfileButtonProps) { <>