From d02c696030c3853202098a31e4e70fd741f341b8 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 20 Sep 2017 12:48:03 +0200 Subject: [PATCH] Update failing tests --- js/package-lock.json | 64 +++++++++++++------------- js/src/ParityBar/parityBar.spec.js | 8 +--- js/src/Status/status.css | 9 ++-- js/src/SyncWarning/syncWarning.spec.js | 1 + 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/js/package-lock.json b/js/package-lock.json index 36b5ce2e6..28d590f1b 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -43,11 +43,11 @@ "version": "github:paritytech/dapp-account#eb7f989f2d801b1940b4251463b8f6a09433973c", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/dapp-accounts": "github:paritytech/dapp-accounts#cd59bc6f3bbe6a8656e624789a678fcbf5220d22", + "@parity/dapp-accounts": "github:paritytech/dapp-accounts#c7613306fdb888896370c87b1ec3ad6ca1d76ec0", "@parity/dapp-vaults": "github:paritytech/dapp-vaults#f1ce18e69df07648bb13ac5cfe88b52cd83dc731", "@parity/parity.js": "1.8.7", "@parity/shapeshift": "github:paritytech/js-shapeshift#1e015cb4355b8db81aeac6a71abf971677de8f5b", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e", "happypack": "3.1.0", "lodash": "4.17.2", @@ -67,11 +67,11 @@ } }, "@parity/dapp-accounts": { - "version": "github:paritytech/dapp-accounts#cd59bc6f3bbe6a8656e624789a678fcbf5220d22", + "version": "github:paritytech/dapp-accounts#c7613306fdb888896370c87b1ec3ad6ca1d76ec0", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/dapp-vaults": "github:paritytech/dapp-vaults#f1ce18e69df07648bb13ac5cfe88b52cd83dc731", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e", "file-saver": "1.3.3", "react": "15.6.1", @@ -87,7 +87,7 @@ "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/dapp-account": "github:paritytech/dapp-account#eb7f989f2d801b1940b4251463b8f6a09433973c", "@parity/dapp-addresses": "github:paritytech/dapp-addresses#4eb1345610273de6d32ad6cb3d0b6fe3f0fb1af3", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -95,8 +95,8 @@ "version": "github:paritytech/dapp-addresses#4eb1345610273de6d32ad6cb3d0b6fe3f0fb1af3", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/dapp-accounts": "github:paritytech/dapp-accounts#cd59bc6f3bbe6a8656e624789a678fcbf5220d22", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/dapp-accounts": "github:paritytech/dapp-accounts#c7613306fdb888896370c87b1ec3ad6ca1d76ec0", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -104,7 +104,7 @@ "version": "github:paritytech/dapp-chaindeploy#bac23d818afe88cf82c9da1d47076309ddaa6462", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "react": "15.6.1", "react-dom": "15.6.1" } @@ -114,7 +114,7 @@ "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/dapp-account": "github:paritytech/dapp-account#eb7f989f2d801b1940b4251463b8f6a09433973c", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -123,8 +123,8 @@ "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/dapp-account": "github:paritytech/dapp-account#eb7f989f2d801b1940b4251463b8f6a09433973c", - "@parity/dapp-accounts": "github:paritytech/dapp-accounts#cd59bc6f3bbe6a8656e624789a678fcbf5220d22", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/dapp-accounts": "github:paritytech/dapp-accounts#c7613306fdb888896370c87b1ec3ad6ca1d76ec0", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -132,7 +132,7 @@ "version": "github:paritytech/dapp-dapp-accounts#8293a2ebddf634dc81cab31121ea6064c730544b", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -140,7 +140,7 @@ "version": "github:paritytech/dapp-dapp-methods#ca9e29a56b79d355ba5bbdb11f8fa662a8be5bdc", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -148,7 +148,7 @@ "version": "github:paritytech/dapp-dapp-visible#ad8f2fa2a9a0d1a1e9e7be3e3eeee9f63ccfca68", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -156,7 +156,7 @@ "version": "github:paritytech/dapp-dappreg#8fb1c14ea6d219517ca2cb2c73f62f36e45ee7d9", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -166,7 +166,7 @@ "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/dapp-contracts": "github:paritytech/dapp-contracts#e7656290c46d598eab76ad5b7402386c32b87c44", "@parity/parity.js": "1.8.7", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e", "oo7": "0.5.3", "oo7-parity": "0.6.8", @@ -182,7 +182,7 @@ "version": "github:paritytech/dapp-githubhint#56924a5d7091c795717e82b20d1d4c719cf3627f", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "moment": "2.17.0", "react": "15.6.1", "react-dom": "15.6.1", @@ -194,7 +194,7 @@ "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/dapp-web": "github:paritytech/dapp-web#b5e209ab2a9e6ac37b780b292a648e8764cb5f96", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e", "react-markdown": "2.4.4" }, @@ -215,7 +215,7 @@ "version": "github:paritytech/dapp-localtx#c4580253c6e018e2291d40c56188f3f6f13f50f8", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -223,7 +223,7 @@ "version": "github:paritytech/dapp-playground#5546b96468d4629419b671897e86ce53ea141d09", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -231,7 +231,7 @@ "version": "github:paritytech/dapp-registry#f55bb3951f28b39a9210dadb2696e880e5dabe28", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e", "material-ui": "0.16.5" } @@ -240,7 +240,7 @@ "version": "github:paritytech/dapp-settings#5c0e6240d18976968cf648be105871b59f2322f8", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -248,7 +248,7 @@ "version": "github:paritytech/dapp-signaturereg#03020dd725580969f3401f30d76479dc631a4987", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "moment": "2.17.0", "react": "15.6.1", "react-dom": "15.6.1", @@ -259,7 +259,7 @@ "version": "github:paritytech/dapp-signer#9c7c00a8d63696dda657b6922f3310a850187505", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -267,7 +267,7 @@ "version": "github:paritytech/dapp-status#45a7bbe97156ba29bc5914da65988685e52ad674", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e", "bytes": "2.4.0", "format-number": "2.0.1" @@ -277,7 +277,7 @@ "version": "github:paritytech/dapp-tokendeploy#0d45226202f4abdcbdf9fbc07d0c5dcd82688643", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -285,7 +285,7 @@ "version": "github:paritytech/dapp-tokenreg#659b768f02691a6230983ca6fcfa48bebefaae91", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "material-ui": "0.16.5", "react": "15.6.1", "react-dom": "15.6.1", @@ -296,7 +296,7 @@ "version": "github:paritytech/dapp-vaults#f1ce18e69df07648bb13ac5cfe88b52cd83dc731", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -305,7 +305,7 @@ "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/dapp-account": "github:paritytech/dapp-account#eb7f989f2d801b1940b4251463b8f6a09433973c", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e" } }, @@ -313,7 +313,7 @@ "version": "github:paritytech/dapp-web#b5e209ab2a9e6ac37b780b292a648e8764cb5f96", "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "@parity/ui": "github:paritytech/js-ui#dcdf4c22013eb0f125afb8cfc5789b22df7c217e", "base32.js": "0.1.0" } @@ -370,7 +370,7 @@ } }, "@parity/shared": { - "version": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "version": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "requires": { "@parity/ledger": "github:paritytech/js-ledger#2566041c4a9ef7157adc67fe2faf66eaa8652f11", "eventemitter3": "2.0.3", @@ -393,7 +393,7 @@ "requires": { "@parity/api": "github:paritytech/js-api#ca3e026f40d434218eec9ab27a3958ec6761e8ea", "@parity/etherscan": "github:paritytech/js-etherscan#a3b432ebfca2f57462da93c68b6d6f8aebb1244f", - "@parity/shared": "github:paritytech/js-shared#753cc3229c9cd8392a3dda859997e5bb85605954", + "@parity/shared": "github:paritytech/js-shared#859361fc126e7c19ac2dece27db9b941a4c400cd", "bignumber.js": "3.0.1", "brace": "0.9.0", "date-difference": "1.0.0", diff --git a/js/src/ParityBar/parityBar.spec.js b/js/src/ParityBar/parityBar.spec.js index 26ce4983f..17da275d3 100644 --- a/js/src/ParityBar/parityBar.spec.js +++ b/js/src/ParityBar/parityBar.spec.js @@ -138,13 +138,9 @@ describe('ParityBar', () => { expect(label.find('FormattedMessage').props().id).to.equal('parityBar.label.signer'); }); - it('does not render a badge when no pending requests', () => { - expect(label.find('Badge')).to.have.length(0); - }); - it('renders a badge when pending requests', () => { render({}, { signer: { pending: ['123', '456'] } }); - expect(shallow(instance.renderSignerLabel()).find('Badge').props().value).to.equal(2); + expect(shallow(instance.renderSignerLabel()).find('SignerPending')).to.be.ok; }); }); @@ -161,7 +157,7 @@ describe('ParityBar', () => { it('renders expanded with opened === true', () => { expect(instance.renderExpanded).not.to.have.been.called; - instance.setState({ opened: true }); + instance.store.setOpen(true); expect(instance.renderExpanded).to.have.been.called; }); }); diff --git a/js/src/Status/status.css b/js/src/Status/status.css index 9e017a698..1331e09f6 100644 --- a/js/src/Status/status.css +++ b/js/src/Status/status.css @@ -34,9 +34,12 @@ $textColor: #ccc; text-align: right; vertical-align: middle; - div { - display: inline-block; - margin-left: 1em; + >div, + >img, + >span { + display: inline-block !important; + margin: 0 0 0 1em; + vertical-align: middle; } } diff --git a/js/src/SyncWarning/syncWarning.spec.js b/js/src/SyncWarning/syncWarning.spec.js index 8e45647af..14256be5e 100644 --- a/js/src/SyncWarning/syncWarning.spec.js +++ b/js/src/SyncWarning/syncWarning.spec.js @@ -23,6 +23,7 @@ let component; function createRedux (syncing = null) { return { + dispatch: () => {}, subscribe: () => {}, getState: () => { return {