aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-05-12 08:43:40 +0800
committerDan Finlay <dan@danfinlay.com>2017-05-12 08:43:40 +0800
commitf0eeb1e1620b9c607390505c2e443979c9b44b1a (patch)
tree68198aba4f9ba6c1b830ffdc4e78a7d14886a92a
parentde5cf2526ca3b3791545afc32d90a3bb88a8b8e3 (diff)
downloadtangerine-wallet-browser-f0eeb1e1620b9c607390505c2e443979c9b44b1a.tar
tangerine-wallet-browser-f0eeb1e1620b9c607390505c2e443979c9b44b1a.tar.gz
tangerine-wallet-browser-f0eeb1e1620b9c607390505c2e443979c9b44b1a.tar.bz2
tangerine-wallet-browser-f0eeb1e1620b9c607390505c2e443979c9b44b1a.tar.lz
tangerine-wallet-browser-f0eeb1e1620b9c607390505c2e443979c9b44b1a.tar.xz
tangerine-wallet-browser-f0eeb1e1620b9c607390505c2e443979c9b44b1a.tar.zst
tangerine-wallet-browser-f0eeb1e1620b9c607390505c2e443979c9b44b1a.zip
Got a useful error message for next step
-rw-r--r--package.json1
-rw-r--r--test/unit/components/pending-tx-test.js24
2 files changed, 23 insertions, 2 deletions
diff --git a/package.json b/package.json
index 5f2436112..11931b32f 100644
--- a/package.json
+++ b/package.json
@@ -165,6 +165,7 @@
"qunit": "^0.9.1",
"react-addons-test-utils": "^15.5.1",
"react-dom": "^15.5.4",
+ "react-testutils-additions": "^15.2.0",
"sinon": "^1.17.3",
"tape": "^4.5.1",
"testem": "^1.10.3",
diff --git a/test/unit/components/pending-tx-test.js b/test/unit/components/pending-tx-test.js
index 5ddea7b23..2594a1a26 100644
--- a/test/unit/components/pending-tx-test.js
+++ b/test/unit/components/pending-tx-test.js
@@ -1,4 +1,5 @@
-var assert = require('assert')
+const assert = require('assert')
+const additions = require('react-testutils-additions')
const h = require('react-hyperscript')
var PendingTx = require('../../../ui/app/components/pending-tx')
const createReactFactory = require('create-react-factory').createReactFactory
@@ -52,10 +53,28 @@ describe.only('PendingTx', function () {
}
const pendingTxComponent = h(PendingTx, props)
+ var component = additions.renderIntoDocument(pendingTxComponent);
renderer.render(pendingTxComponent)
const result = renderer.getRenderOutput()
+ const form = result.props.children
+ console.log('FORM children')
+ console.dir(form.props.children)
+ const children = form.props.children[form.props.children.length - 1]
assert.equal(result.type, 'div', 'should create a div')
- console.dir(result)
+ console.dir(children)
+
+ console.log('finding input')
+
+ try{
+
+ const input = additions.find(component, '.cell.row input[type="number"]')
+ console.log('input')
+ console.dir(input)
+
+ } catch (e) {
+ console.log("WHAAAA")
+ console.error(e)
+ }
const noop = () => {}
@@ -68,6 +87,7 @@ describe.only('PendingTx', function () {
// Get the submit button
// Click the submit button
// Get the output of the submit event.
+ // Assert that the value was updated.
}, 200)