From f3397c5bddc718c32c5e69d1226e3791e5ceb4b5 Mon Sep 17 00:00:00 2001 From: lukaw3d Date: Sat, 4 May 2024 00:15:00 +0200 Subject: [PATCH] Remove incognito mode button (haven't removed all the related code) --- .changelog/1914.feature.md | 1 + playwright/tests/persist.spec.ts | 6 ++++-- playwright/tests/syncTabs.spec.ts | 9 ++++++--- src/app/components/Persist/UnlockForm.tsx | 4 ++-- src/locales/en/translation.json | 1 - 5 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .changelog/1914.feature.md diff --git a/.changelog/1914.feature.md b/.changelog/1914.feature.md new file mode 100644 index 0000000000..1db15cd248 --- /dev/null +++ b/.changelog/1914.feature.md @@ -0,0 +1 @@ +Remove "Continue without the profile" button diff --git a/playwright/tests/persist.spec.ts b/playwright/tests/persist.spec.ts index 17cdc4c2a5..bcc27371b0 100644 --- a/playwright/tests/persist.spec.ts +++ b/playwright/tests/persist.spec.ts @@ -184,7 +184,8 @@ test.describe('Persist', () => { await expect(page.getByTestId('account-selector')).toBeHidden() }) - test('Should NOT persist changes after user skips unlocking', async ({ page }) => { + test.skip('Should NOT persist changes after user skips unlocking', async ({ page }) => { + // TODO: remove all code related to "Continue without the profile" await addPersistedStorageV1(page, '/app.webmanifest') await page.goto('/') await page.getByRole('button', { name: /Continue without the profile/ }).click() @@ -204,7 +205,8 @@ test.describe('Persist', () => { await expect(page.getByTestId('account-choice')).toHaveCount(1) }) - test('Should NOT crash after quickly locking a wallet', async ({ page }) => { + test.skip('Should NOT crash after quickly locking a wallet', async ({ page }) => { + // TODO: re-enable and change so it doesn't depend on "Continue without the profile" await addPersistedStorageV1(page, '/app.webmanifest') await page.goto('/') await page.getByRole('button', { name: /Continue without the profile/ }).click() diff --git a/playwright/tests/syncTabs.spec.ts b/playwright/tests/syncTabs.spec.ts index 7bf80d8e83..2e09f49d18 100644 --- a/playwright/tests/syncTabs.spec.ts +++ b/playwright/tests/syncTabs.spec.ts @@ -49,7 +49,8 @@ test.describe('syncTabs', () => { await expect(tab2.getByRole('button', { name: /^Unlock$/ })).toBeVisible() }) - test('incognito', async ({ page, context }) => { + test.skip('incognito', async ({ page, context }) => { + // TODO: remove all code related to "Continue without the profile" await addPersistedStorageV1(page, '/app.webmanifest') await page.goto('/') await page.getByRole('button', { name: 'Continue without the profile' }).click() @@ -111,7 +112,8 @@ test.describe('syncTabs', () => { await testSyncingNetwork(page, tab2) }) - test('incognito', async ({ page, context }) => { + test.skip('incognito', async ({ page, context }) => { + // TODO: remove all code related to "Continue without the profile" await addPersistedStorageV1(page, '/app.webmanifest') await page.goto('/') await page.getByRole('button', { name: 'Continue without the profile' }).click() @@ -216,7 +218,8 @@ test.describe('syncTabs', () => { await testSelectedAccountNotSync(page, tab2) }) - test('incognito', async ({ page, context }) => { + test.skip('incognito', async ({ page, context }) => { + // TODO: remove all code related to "Continue without the profile" await addPersistedStorageV1(page, '/app.webmanifest') await page.goto('/') await page.getByRole('button', { name: 'Continue without the profile' }).click() diff --git a/src/app/components/Persist/UnlockForm.tsx b/src/app/components/Persist/UnlockForm.tsx index 1af488bed3..c21569c4b3 100644 --- a/src/app/components/Persist/UnlockForm.tsx +++ b/src/app/components/Persist/UnlockForm.tsx @@ -9,14 +9,12 @@ import { useDispatch, useSelector } from 'react-redux' import { useTranslation } from 'react-i18next' import { PasswordField } from 'app/components/PasswordField' import { preventSavingInputsToUserData } from 'app/lib/preventSavingInputsToUserData' -import { useNavigate } from 'react-router-dom' import { DeleteProfileButton } from './DeleteProfileButton' import { LoginModalLayout } from './LoginModalLayout' export function UnlockForm() { const { t } = useTranslation() const dispatch = useDispatch() - const navigate = useNavigate() const enteredWrongPassword = useSelector(selectEnteredWrongPassword) const [password, setPassword] = React.useState('') @@ -50,6 +48,7 @@ export function UnlockForm() {