From a610dd8dccb3c0b7a38af4c4ca76b57be8bf0eb2 Mon Sep 17 00:00:00 2001 From: kdmukai Date: Tue, 30 Jan 2024 19:04:08 -0600 Subject: [PATCH] Add missing flow-based test for bip39 passphrase entry --- tests/test_flows_seed.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_flows_seed.py b/tests/test_flows_seed.py index 3aedef947..cd315f2e0 100644 --- a/tests/test_flows_seed.py +++ b/tests/test_flows_seed.py @@ -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