Move detailed QML functional coverage into integration tests

bitcoin-core/gui-qml: PR #1090

4 suggestions

Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Watch-only migration introduces an unsupported PSBT constructor

Source inspection shows that 7bf181be cannot compile the integration target against the unchanged Core pin; 53852f26 fixes the call twelve commits later.

Location: test/integration/signers/test_watchonly.cpp:66 at 7bf181be1ff9 (commit) (commit).

Details and suggested fix

Commit 7bf181be1ff9995a8024d8b1e83337b2ca995925 adds the watch-only module to bitcoinqml_integration_tests and constructs PartiallySignedTransaction psbt{CMutableTransaction{}};. The pinned psbt.h requires a second argument, uint32_t version, with no default. With application tests enabled, this leaves the integration target unbuildable until 53852f26133091b73420f6dce2ed9c873984af56 supplies /*version=*/2. Squash that one-line correction into the introducing commit so reviewing or bisecting the intervening series does not encounter the unsupported call. The final tree already contains the correction.


Link

[suggestion] · Default Click retries can conceal swallowed first clicks

The integration helper's default Click retries swallowed gestures and treats eventual delivery as success; no currently masked regression was identified.

Location: test/integration/fixture/test_util.h:201 (head).

Details and suggested fix

Click(QObject*) always delegates to ClickWithRetries. If an overlay or closing popup consumes the first gesture without either pressed() or clicked() reaching the target, the polling loop sends another full gesture and returns true once clicked() arrives. Before this PR, the helper sent one gesture. Retries produce only a non-failing qWarning, so an ordinary integration row can pass even though a user would need to click again. Make the default Click fail when more than one gesture was needed, and retain ClickWithRetries as an explicit opt-in for call sites that intentionally tolerate modal-exit retries. Preserve the existing rejection of canceled presses.


Link

[suggestion] · Calendar Apply coverage bypasses pointer delivery

The calendar-range integration case invokes Apply's clicked() signal directly, leaving pointer accessibility untested; this does not establish a current UI defect.

Location: test/integration/wallet_activity/test_activity.cpp:292 (head).

Details and suggested fix

In calendarRangeFiltersAndResetsLiveRows, the date cells and Reset use qmltest::Click, but Apply uses QMetaObject::invokeMethod(apply, "clicked") after checking only enabled. This executes the production onClicked handler even if layout, clipping or an overlay prevents a pointer gesture from reaching the button. Replace that invocation with QVERIFY(qmltest::Click(m_app, "activityDateRangeApply")); and retain the range and row-count assertions. The shared helper checks visibility, scrolling and window containment and requires a completed clicked() signal.


Link

[suggestion] · Unlabelled scenario self-test is omitted from documented local runs

The new qml_scenario_runner CTest entry has no label, so the README's -L 'unit|qml' command skips its exit-status and stage-selection checks; unfiltered CI still includes them.

Location: test/CMakeLists.txt:8 (head).

Details and suggested fix

qml_scenario_runner runs test_qml_scenarios.py, including the mixed pass/skip exit-status checks and exact stage-selection assertions. Its add_test registration receives no LABELS, unlike the comparable Python self-test bitcoinqml_process_checks. Add qml_scenario_runner to the existing set_tests_properties(... PROPERTIES LABELS unit) call so developers following the documented unit/component command also run these checks.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

The application integration framework was introduced to exercise production startup and shutdown with a real regtest node, isolated data/settings, and fresh subprocesses. Detecting QML warnings, including binding loops during navigation, was already part of its intended coverage.

Moving detailed feature checks into application integration tests extends an existing real-application testing boundary rather than replacing functional coverage with model mocks. Warning failures and process isolation predate this migration and help explain why lifecycle and QML-engine behavior remain relevant even when assertions move out of Python.

Source 1

The custom integration runner reflects a stated delivery constraint: one GUI test binary must be able to run all GUI test cases. This was weighed against an objection that CTest could already provide subprocess scheduling, discovery, output handling, and reporting.

The current change adds feature-stage CTest entries while retaining one integration executable. The earlier discussion explains that arrangement's competing objectives: a self-contained test executable versus avoiding duplication of CTest infrastructure. It does not establish that every detail of the present runner is necessary.

Source 1 · Source 2

The historical external-signer GUI workflow deliberately distinguished an unsigned transaction proposal from an executable send. Private-key-disabled wallets without a signer produced exportable PSBTs for offline signing; external-signer wallets could request device signing. The implementation explicitly filled the PSBT without signing first to avoid invoking the signer prematurely, and broadcast only after completion.

This explains why a watch-only draft can legitimately support review and PSBT export without offering a final Send action. It also explains why external signers remain a distinct capability despite local private keys being disabled. At the pinned application head, currentTransactionCanSend feeds the review page's Send visibility, and draft preparation now derives that capability from local signing or an external signer.

Source 1

Ralph's inferences

The test-layer tradeoff is between exercising an independently launched executable through a restricted automation interface and directly observing production QML/models inside the application fixture. These approaches expose different boundaries rather than being interchangeable.

Before this PR, the Python bridge used separate RPC and UI channels, was compiled and activated only for testing, and could fall back from pointer simulation to direct action invocation. The integration fixture provides a different observation boundary. This supports the distinction between detailed live-model checks and retained restart, subprocess, device, and multi-node journeys, without treating the new ownership document itself as independent historical justification.

Source 1

Receive authorization is action-scoped: obtaining an address may need temporary access to encrypted key material, but completing that operation need not leave a previously locked wallet unlocked.

The shared hardened-wallet fixture deliberately creates the locked, exhausted-keypool condition. Pinned Core address generation can fail when its descriptor cache cannot be extended. The QML model requests a password after address-generation failure and uses a relock guard around the retry. Core's existing Qt UnlockContext similarly remembers whether the wallet was locked and restores that state on destruction. Together these contracts explain why cancellation, incorrect-password retry, address rotation, and automatic relocking are distinct integration cases rather than merely password-field tests.

A nonblocking status query trades definitive results for avoiding a wait on the wallet mutex; a transaction-existence lookup answers a different question and takes the mutex normally.

At the identical base/head Core pin, tryGetTxStatus returns false both for lock contention and for an absent transaction, whereas getTx waits for the lock and checks wallet membership. The application's base and head import paths both route known PSBT transactions to TransactionAlreadyKnown, but use those different APIs. This contract explains the behavioral distinction behind the known-PSBT change without attributing it to an upstream dependency change or asserting an undocumented historical motivation.