diff options
author | Dan J Miller <danjm.com@gmail.com> | 2017-12-22 11:03:01 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@users.noreply.github.com> | 2017-12-22 11:03:01 +0800 |
commit | 4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13 (patch) | |
tree | 8bb568d9bcab093855e4dd57afbeaf9517dba869 | |
parent | 4ef71f036510da50566dad35a100529186b08bc9 (diff) | |
download | tangerine-wallet-browser-4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13.tar tangerine-wallet-browser-4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13.tar.gz tangerine-wallet-browser-4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13.tar.bz2 tangerine-wallet-browser-4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13.tar.lz tangerine-wallet-browser-4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13.tar.xz tangerine-wallet-browser-4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13.tar.zst tangerine-wallet-browser-4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13.zip |
[NewUI] Fixes tests and sends user to NewUI after registering. (#2788)
* Fixes tests and sends user to NewUI after registering.
* Karma config?
* Empty commit
* Remove unneeded json state mock file.
-rw-r--r-- | development/states/first-time.json | 1 | ||||
-rw-r--r-- | test/base.conf.js | 4 | ||||
-rw-r--r-- | test/unit/actions/tx_test.js | 3 | ||||
-rw-r--r-- | ui/app/select-app.js | 9 | ||||
-rw-r--r-- | ui/app/send-v2.js | 2 | ||||
-rw-r--r-- | ui/index.js | 1 |
6 files changed, 12 insertions, 8 deletions
diff --git a/development/states/first-time.json b/development/states/first-time.json index b2cc8ef8f..480839d59 100644 --- a/development/states/first-time.json +++ b/development/states/first-time.json @@ -8,6 +8,7 @@ "frequentRpcList": [], "unapprovedTxs": {}, "currentCurrency": "USD", + "featureFlags": {"betaUI": true}, "conversionRate": 12.7527416, "conversionDate": 1487624341, "noActiveNotices": false, diff --git a/test/base.conf.js b/test/base.conf.js index 122392822..82b9d8eec 100644 --- a/test/base.conf.js +++ b/test/base.conf.js @@ -54,6 +54,8 @@ module.exports = function(config) { // Concurrency level // how many browser should be started simultaneous - concurrency: Infinity + concurrency: 1, + + nocache: true, } } diff --git a/test/unit/actions/tx_test.js b/test/unit/actions/tx_test.js index ea6dfda6a..b6a691860 100644 --- a/test/unit/actions/tx_test.js +++ b/test/unit/actions/tx_test.js @@ -51,9 +51,8 @@ describe('tx confirmation screen', function () { actions.cancelTx({value: firstTxId})((action) => { result = reducers(initialState, action) - done() }) - + done() }) it('should transition to the account detail view', function () { diff --git a/ui/app/select-app.js b/ui/app/select-app.js index a51182f47..0b837b547 100644 --- a/ui/app/select-app.js +++ b/ui/app/select-app.js @@ -13,6 +13,7 @@ function mapStateToProps (state) { autoAdd: autoAddToBetaUI(state), isUnlocked: state.metamask.isUnlocked, isMascara: state.metamask.isMascara, + firstTime: Object.keys(state.metamask.identities).length === 0, } } @@ -35,9 +36,10 @@ SelectedApp.prototype.componentWillReceiveProps = function (nextProps) { setFeatureFlagWithModal, setFeatureFlagWithoutModal, isMascara, + firstTime, } = this.props - if (isMascara) { + if (isMascara || firstTime) { setFeatureFlagWithoutModal() } else if (!isUnlocked && nextProps.isUnlocked && (nextProps.autoAdd)) { setFeatureFlagWithModal() @@ -45,7 +47,8 @@ SelectedApp.prototype.componentWillReceiveProps = function (nextProps) { } SelectedApp.prototype.render = function () { - const { betaUI, isMascara } = this.props - const Selected = betaUI || isMascara ? App : OldApp + const { betaUI, isMascara, firstTime } = this.props + + const Selected = betaUI || isMascara || firstTime ? App : OldApp return h(Selected) } diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js index b7f2e7277..7c9b6dbc6 100644 --- a/ui/app/send-v2.js +++ b/ui/app/send-v2.js @@ -572,7 +572,7 @@ SendTransactionScreen.prototype.getEditedTx = function () { from: ethUtil.addHexPrefix(from), gas: ethUtil.addHexPrefix(gas), gasPrice: ethUtil.addHexPrefix(gasPrice), - } + }, } if (selectedToken) { diff --git a/ui/index.js b/ui/index.js index fff677471..2aa30d3fe 100644 --- a/ui/index.js +++ b/ui/index.js @@ -8,7 +8,6 @@ global.log = require('loglevel') module.exports = launchMetamaskUi - log.setLevel(global.METAMASK_DEBUG ? 'debug' : 'warn') function launchMetamaskUi (opts, cb) { |