test(sweep): add capture surfaces for the Wave-1 standalone modals

Register sweep surfaces so the redesigned Wave-1 modals get captured for visual
review: modal-qr-popup, modal-request-payment, modal-validate-address,
modal-address-label, modal-daemon-prompt, and modal-antivirus (the last renders
only on Windows, where its #ifdef body compiles). Each is driven through the
dialog's public show()/flag; teardown closes it. Adds a static hide() to
RequestPaymentDialog / ValidateAddressDialog / AddressLabelDialog for clean sweep
teardown (they had no public close). The contact add/edit and explorer block-detail
modals are tab-embedded and not yet surfaced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 17:15:24 -05:00
parent abbdf3f4f7
commit 21be39c725
6 changed files with 50 additions and 0 deletions

View File

@@ -24,6 +24,10 @@
#include "ui/windows/bootstrap_download_dialog.h"
#include "ui/windows/daemon_download_dialog.h"
#include "ui/windows/xmrig_download_dialog.h"
#include "ui/windows/qr_popup_dialog.h"
#include "ui/windows/request_payment_dialog.h"
#include "ui/windows/validate_address_dialog.h"
#include "ui/windows/address_label_dialog.h"
#include "ui/pages/settings_page.h"
#include "util/platform.h"
#include "wallet/wallet_capabilities.h"
@@ -325,6 +329,25 @@ void App::buildSweepCatalog()
a.show_pin_remove_ = false; a.pin_status_.clear();
memset(a.pin_old_buf_, 0, sizeof(a.pin_old_buf_));
});
// Wave-1 standalone dialogs (rendered globally from App::render, so any page works).
add("modal-qr-popup", ui::NavPage::Receive,
[](App&) { ui::QRPopupDialog::show(kDemoZAddr, "Savings"); },
[](App&) { ui::QRPopupDialog::close(); });
add("modal-request-payment", ui::NavPage::Receive,
[](App&) { ui::RequestPaymentDialog::show(kDemoZAddr); },
[](App&) { ui::RequestPaymentDialog::hide(); });
add("modal-validate-address", ui::NavPage::Receive,
[](App&) { ui::ValidateAddressDialog::show(); },
[](App&) { ui::ValidateAddressDialog::hide(); });
add("modal-address-label", ui::NavPage::Overview,
[](App& a) { ui::AddressLabelDialog::show(&a, kDemoZAddr, true); },
[](App&) { ui::AddressLabelDialog::hide(); });
add("modal-daemon-prompt", ui::NavPage::Settings,
[](App& a) { a.daemon_update_bundled_size_ = 12345678ull; a.show_daemon_update_prompt_ = true; },
[](App& a) { a.show_daemon_update_prompt_ = false; });
add("modal-antivirus", ui::NavPage::Mining,
[](App& a) { a.pending_antivirus_dialog_ = true; },
[](App& a) { a.pending_antivirus_dialog_ = false; });
add("modal-about", ui::NavPage::Overview,
[](App& a) { a.show_about_ = true; }, [](App& a) { a.show_about_ = false; });
add("modal-settings", ui::NavPage::Settings,