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:
@@ -251,6 +251,9 @@ public:
|
||||
|
||||
static bool isOpen() { return s_open; }
|
||||
|
||||
// Close the dialog (used by the UI sweep teardown).
|
||||
static void hide() { s_open = false; }
|
||||
|
||||
private:
|
||||
static inline bool s_open = false;
|
||||
static inline App* s_app = nullptr;
|
||||
|
||||
@@ -59,6 +59,15 @@ void RequestPaymentDialog::show(const std::string& address)
|
||||
}
|
||||
}
|
||||
|
||||
void RequestPaymentDialog::hide()
|
||||
{
|
||||
s_open = false;
|
||||
if (s_qr_texture != 0) {
|
||||
FreeQRTexture(s_qr_texture);
|
||||
s_qr_texture = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void RequestPaymentDialog::render(App* app)
|
||||
{
|
||||
if (!s_open) return;
|
||||
|
||||
@@ -26,6 +26,11 @@ public:
|
||||
* @brief Render the dialog (call each frame)
|
||||
*/
|
||||
static void render(App* app);
|
||||
|
||||
/**
|
||||
* @brief Close the dialog + free its QR texture (used by the UI sweep teardown)
|
||||
*/
|
||||
static void hide();
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
|
||||
@@ -42,6 +42,11 @@ bool ValidateAddressDialog::isOpen()
|
||||
return s_open;
|
||||
}
|
||||
|
||||
void ValidateAddressDialog::hide()
|
||||
{
|
||||
s_open = false;
|
||||
}
|
||||
|
||||
void ValidateAddressDialog::render(App* app)
|
||||
{
|
||||
if (!s_open) return;
|
||||
|
||||
@@ -33,6 +33,11 @@ public:
|
||||
*/
|
||||
static bool isOpen();
|
||||
|
||||
/**
|
||||
* @brief Close the dialog (used by the UI sweep teardown)
|
||||
*/
|
||||
static void hide();
|
||||
|
||||
private:
|
||||
static bool s_open;
|
||||
static bool s_validated;
|
||||
|
||||
Reference in New Issue
Block a user