diff options
Got test failing nearly correctly
Diffstat (limited to 'ui/app/components/pending-tx.js')
-rw-r--r-- | ui/app/components/pending-tx.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index fb555b821..d31ccf2e5 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -380,11 +380,22 @@ PendingTx.prototype.onSubmit = function (event) { } PendingTx.prototype.checkValidity = function() { - const form = document.querySelector('form#pending-tx-form') + const form = this.getFormEl() + console.log("check validity got form el:") + console.dir(form) const valid = form.checkValidity() return valid } +PendingTx.prototype.getFormEl = function() { + const form = document.querySelector('form#pending-tx-form') + // Stub out form for unit tests: + if (!form) { + return { checkValidity() { return true } } + } + return form +} + // After a customizable state value has been updated, PendingTx.prototype.gatherTxMeta = function () { log.debug(`pending-tx gatherTxMeta`) |