-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wallet 441 cw automation backup secret phrase #1075
base: develop
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
import { | ||
DEFAULT_FIRST_ACCOUNT, | ||
DEFAULT_SECOND_ACCOUNT, | ||
vaultPassword | ||
} from '../../constants'; | ||
import { popup, popupExpect } from '../../fixtures'; | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use the |
||
//TODO | ||
// add check to comparedisplayed phrase with the one used in onboarding | ||
popup.describe('Popup UI: back up secret phrase', () => { | ||
popup( | ||
"should display a secret phrase after providing password and copy phrase", | ||
async ({ popupPage, unlockVault, providePassword }) => { | ||
await unlockVault(); | ||
await popupPage.getByTestId('menu-open-icon').click(); | ||
await popupPage.getByText('Back up your secret recovery phrase').click(); | ||
await providePassword(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'Back up your secret recovery phrase' }) | ||
).toBeVisible(); | ||
await popupPage.getByText('Click to reveal secret recovery phrase').click(); | ||
await popupPage.getByText('Copy secret recovery phrase').click(); | ||
|
||
|
||
|
||
await popupExpect( | ||
popupPage.getByText( | ||
'Copied to clipboard' | ||
) | ||
).toBeVisible(); | ||
} | ||
Comment on lines
+12
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just wanted to let you know that you didn't check if the secret phrase was displayed and if it was copied. |
||
|
||
); | ||
popup( | ||
'should display safety tips', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that we need this test. Here we test UI text and no functionality |
||
async ({ popupPage, unlockVault, providePassword }) => { | ||
await unlockVault(); | ||
await popupPage.getByTestId('menu-open-icon').click(); | ||
await popupPage.getByText('Back up your secret recovery phrase').click(); | ||
await providePassword(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'Back up your secret recovery phrase' }) | ||
).toBeVisible(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByText( | ||
'Save a backup in multiple secure locations.' | ||
) | ||
).toBeVisible(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByText( | ||
'Never share the phrase with anyone.' | ||
) | ||
).toBeVisible(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByText( | ||
'Be careful of phishing! Casper Wallet will never spontaneously ask you for your secret recovery phrase.' | ||
) | ||
).toBeVisible(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByText( | ||
'If you need to back up your secret recovery phrase again, you can find it in Settings.' | ||
) | ||
).toBeVisible(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByText( | ||
'Casper Wallet cannot recover your secret recovery phrase! If you lose it, you may not be able to recover your funds.' | ||
) | ||
).toBeVisible(); | ||
}) | ||
|
||
|
||
popup( | ||
"should timeout after providing wrong password 5 times", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we already have a test for locking the wallet for 5 minutes when the user types the wrong password 5 times |
||
async ({ popupPage, unlockVault, passwordTimeout }) => { | ||
await unlockVault(); | ||
|
||
await popupPage.getByTestId('menu-open-icon').click(); | ||
await popupPage.getByText('Back up your secret recovery phrase').click(); | ||
|
||
await passwordTimeout(); | ||
|
||
|
||
await popupExpect( | ||
popupPage.getByRole('heading', { name: 'Please wait before the next attempt to unlock your wallet' }) | ||
).toBeVisible(); | ||
}) | ||
}); | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this code do?