Skip to content

Commit

Permalink
Merge pull request #524 from kdmukai/test_passphrase_entry_flow
Browse files Browse the repository at this point in the history
[Test] Add missing flow-based test for bip39 passphrase entry
  • Loading branch information
newtonick authored Feb 12, 2024
2 parents a109c80 + a610dd8 commit 39d11d9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/test_flows_seed.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@ def test_scan_seedqr_flow(self):
])


def test_passphrase_entry_flow(self):
"""
Opting to add a bip39 passphrase on the Finalize Seed screen should enter the
passphrase entry / review flow and end at the SeedOptionsView.
"""
self.run_sequence([
FlowStep(MainMenuView, button_data_selection=MainMenuView.SCAN),
FlowStep(scan_views.ScanView, before_run=load_seed_into_decoder), # simulate read SeedQR; ret val is ignored
FlowStep(seed_views.SeedFinalizeView, button_data_selection=seed_views.SeedFinalizeView.PASSPHRASE),
FlowStep(seed_views.SeedAddPassphraseView, screen_return_value="muhpassphrase"),
FlowStep(seed_views.SeedReviewPassphraseView, button_data_selection=seed_views.SeedReviewPassphraseView.EDIT),
FlowStep(seed_views.SeedAddPassphraseView, screen_return_value="muhpassphrase2"),
FlowStep(seed_views.SeedReviewPassphraseView, button_data_selection=seed_views.SeedReviewPassphraseView.DONE),
FlowStep(seed_views.SeedOptionsView),
])


def test_mnemonic_entry_flow(self):
"""
Manually entering a mnemonic should land at the Finalize Seed flow and end at
Expand Down

0 comments on commit 39d11d9

Please sign in to comment.