-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(suite-web): add a test for t3t1 multishare backup
- Loading branch information
1 parent
cb2d5d1
commit d0683e0
Showing
3 changed files
with
93 additions
and
2 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
packages/suite-web/e2e/tests/backup/t3t1-create-addtional-share.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// @group_device-management | ||
// @retry=2 | ||
|
||
const mnemonic = | ||
'academic again academic academic academic academic academic academic academic academic academic academic academic academic academic academic academic pecan provide remember'; | ||
describe('Backup success', () => { | ||
beforeEach(() => { | ||
cy.task('startEmu', { wipe: true, model: 'T3T1', version: '2.8.1' }); | ||
cy.task('setupEmu', { | ||
needs_backup: false, | ||
mnemonic, | ||
}); | ||
cy.task('startBridge'); | ||
|
||
cy.viewport('macbook-15').resetDb(); | ||
cy.prefixedVisit('/'); | ||
cy.getTestElement('@analytics/continue-button', { timeout: 40000 }) | ||
.click() | ||
.getTestElement('@onboarding/exit-app-button') | ||
.click(); | ||
cy.passThroughAuthenticityCheck(); | ||
cy.getTestElement('@onboarding/viewOnly/enable').click(); | ||
cy.getTestElement('@viewOnlyTooltip/gotIt', { timeout: 15000 }) | ||
.should('be.visible') | ||
.click(); | ||
// navigate to device settings page | ||
cy.getTestElement('@suite/menu/settings').click(); | ||
cy.getTestElement('@settings/menu/device').click(); | ||
|
||
cy.getTestElement('@settings/device/create-multi-share-backup-button').click(); | ||
cy.getTestElement('@multi-share-backup/checkbox/1').click(); | ||
cy.getTestElement('@multi-share-backup/checkbox/2').click(); | ||
cy.getTestElement('@multi-share-backup/1st-info/submit-button').click(); | ||
cy.getTestElement('@multi-share-backup/2nd-info/submit-button').click(); | ||
|
||
// cy.pause(); | ||
// [device screen] check your backup? | ||
cy.task('swipeEmu', 'up'); | ||
// cy.pause(); | ||
|
||
// [device screen] select the number of words in your backup | ||
cy.task('inputEmu', '20'); | ||
// cy.pause(); | ||
|
||
// [device screen] backup instructions | ||
cy.task('swipeEmu', 'up'); | ||
for (const m of mnemonic.split(' ')) { | ||
// [device screen] enter next word | ||
cy.task('inputEmu', m); | ||
} | ||
// [device screen] create additional backup? | ||
cy.wait(1000); // without this timeout, backup on device simply disappears, it stinks | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] your wallet backup contains multiple lists of words in a specific order (shares) | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] multi share backup steps overview | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] set number of shares | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] multi share backup steps overview (2. set threshold) | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] set threshold | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] multi share backup steps overview (write down and check) | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] never put your digital backup anywhere digital! | ||
cy.task('swipeEmu', 'up'); | ||
// [device screen] instructions - start with share 1 | ||
cy.task('swipeEmu', 'up'); | ||
cy.wait(500); | ||
|
||
// TODO: uf, readAndConfirmMnemonicEmu doesn't work as expected. I could do it using getDebugState | ||
// but it would be reinventing the wheel. Lets wait for Jiri to help with it. | ||
cy.task('getDebugState', _event => {}); | ||
}); | ||
|
||
it('Successful backup happy path', () => { | ||
// access from notification | ||
// cy.pause(); | ||
}); | ||
}); | ||
|
||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters