Skip to content

Commit

Permalink
Update generator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmukai committed Jan 10, 2024
1 parent a109c80 commit 1fe33d8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/screenshot_generator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def test_generate_screenshots(target_locale):
psbt_views.PSBTMathView,
(psbt_views.PSBTAddressDetailsView, dict(address_num=0)),

# TODO: Render Multisig change w/ and w/out the multisig wallet descriptor onboard
(psbt_views.PSBTChangeDetailsView, dict(change_address_num=0)),
(NotYetImplementedView, {}, "PSBTChangeDetailsView_multisig_unverified"), # Must manually re-run this below
(psbt_views.PSBTChangeDetailsView, dict(change_address_num=0), "PSBTChangeDetailsView_multisig_verified"),
(psbt_views.PSBTAddressVerificationFailedView, dict(is_change=True, is_multisig=False), "PSBTAddressVerificationFailedView_singlesig_change"),
(psbt_views.PSBTAddressVerificationFailedView, dict(is_change=False, is_multisig=False), "PSBTAddressVerificationFailedView_singlesig_selftransfer"),
(psbt_views.PSBTAddressVerificationFailedView, dict(is_change=True, is_multisig=True), "PSBTAddressVerificationFailedView_multisig_change"),
Expand Down Expand Up @@ -293,8 +293,16 @@ def screencap_view(view_cls: View, view_name: str, view_args: dict={}, toast_thr
readme += "</td></tr></table>"

# many screens don't work, leaving a missing image, re-run here for now
controller.psbt_seed = None
screenshot_renderer.set_screenshot_path(os.path.join(screenshot_root, "psbt_views"))

decoder = DecodeQR()
decoder.add_data(BASE64_PSBT_1)
controller.psbt = decoder.get_psbt()
controller.psbt_seed = seed_12b
controller.multisig_wallet_descriptor = None
screencap_view(psbt_views.PSBTChangeDetailsView, 'PSBTChangeDetailsView_multisig_unverified', dict(change_address_num=0))

controller.psbt_seed = None
screencap_view(psbt_views.PSBTSelectSeedView, 'PSBTSelectSeedView', {})

with open(os.path.join(screenshot_root, "README.md"), 'w') as readme_file:
Expand Down

0 comments on commit 1fe33d8

Please sign in to comment.