HomePhabricator

Add Qt tests for wallet spends

Description

Add Qt tests for wallet spends

Summary:
A few code changes were needed to accompany the test:

  • Adding setObjectName() calls for a few Qt controls to make them easily accessible from the test.
  • Calling contextMenu->popup() instead of contextMenu->exec() to open the transaction list context menu without blocking the test thread.
  • Opening the context menu at the contextualMenu event point rather than the cursor position (this change was not strictly needed to make the test work, but is more correct).
  • Updating the bumped transaction row with showTransaction=true instead of false. This is needed to prevent the bumped tx from being hidden, so the last part of the test which attempts to bump the bumped tx can work. (Technically this change is a more general bugfix not limited to the testing environment, but the bug doesn't happen outside of the testing environment because in the full Qt client, a queued NotifyTransactionChanged notification causes the row to be updated twice, first with showTransaction=false, then immediately after with showTransaction=true.)

Backport of Core PR10420
https://github.com/bitcoin/bitcoin/pull/10420/files
Completes T512

Test Plan: make check

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2538

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Mar 9 2017, 22:56
jasonbcoxCommitted on Feb 12 2019, 22:28
jasonbcoxPushed on Feb 12 2019, 22:53
Reviewer
Restricted Project
Differential Revision
D2538: Add Qt tests for wallet spends
Parents
rSTAGING43e73d0dfed6: nits in abc-replay-protection
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/7361, tag: phabricator/base/7319, tag: phabricator/base/7316