Skip to content

Commit

Permalink
Merge pull request oasisprotocol#1914 from oasisprotocol/lw/remove-in…
Browse files Browse the repository at this point in the history
…cognito-btn

Remove incognito mode button (haven't removed all the related code)
  • Loading branch information
lukaw3d authored May 8, 2024
2 parents 0cc3448 + f3397c5 commit 016dfa1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions .changelog/1914.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove "Continue without the profile" button
6 changes: 4 additions & 2 deletions playwright/tests/persist.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
9 changes: 6 additions & 3 deletions playwright/tests/syncTabs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/Persist/UnlockForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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('')

Expand Down Expand Up @@ -50,6 +48,7 @@ export function UnlockForm() {
<Box direction="row-responsive" gap="large" justify="between" margin={{ top: 'medium' }}>
<Button type="submit" label={t('persist.loginToProfile.unlock', 'Unlock')} primary />

{/* TODO: remove all code related to "Continue without the profile"
<Button
label={t('persist.loginToProfile.skipUnlocking', 'Continue without the profile')}
onClick={() => {
Expand All @@ -58,6 +57,7 @@ export function UnlockForm() {
}}
plain
/>
*/}
</Box>
</Form>
<Box direction="row" margin={{ top: 'large' }}>
Expand Down
1 change: 0 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@
"enterPasswordHere": "Enter your password",
"hidePassword": "Hide password",
"showPassword": "Show password",
"skipUnlocking": "Continue without the profile",
"title": "Welcome Back!",
"unlock": "Unlock",
"wrongPassword": "Wrong password"
Expand Down

0 comments on commit 016dfa1

Please sign in to comment.