From fa82c2bdab90557f558a6382197447f8e0895443 Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Tue, 27 Feb 2018 14:18:11 +0800 Subject: [PATCH 1/4] update max width, scrollbars --- app/src/renderer/components/common/NiPage.vue | 19 ++++--------------- app/src/renderer/components/common/NiPart.vue | 2 +- app/src/renderer/styles/app.styl | 5 ++++- app/src/renderer/styles/variables.styl | 2 +- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/app/src/renderer/components/common/NiPage.vue b/app/src/renderer/components/common/NiPage.vue index e194185391..48b583e215 100644 --- a/app/src/renderer/components/common/NiPage.vue +++ b/app/src/renderer/components/common/NiPage.vue @@ -25,20 +25,10 @@ export default { data: () => ({ ps: '' }), - methods: { - handleResize () { - if (this.config.desktop) { - const container = this.$el.querySelector('.ni-page-main') - this.ps = new PerfectScrollbar(container) - } else if (this.ps) { - this.ps.destroy() - this.ps = null - } - } - }, - mounted () { - this.handleResize() - window.addEventListener('resize', this.handleResize) + async mounted () { + await this.$nextTick() + const container = this.$el.querySelector('.ni-page-main') + this.ps = new PerfectScrollbar(container) } } @@ -55,7 +45,6 @@ export default { .ni-page-main flex 1 position relative - max-width width-main-max .ni-page-title color bright diff --git a/app/src/renderer/components/common/NiPart.vue b/app/src/renderer/components/common/NiPart.vue index d04aca72e3..5cd43a7f69 100644 --- a/app/src/renderer/components/common/NiPart.vue +++ b/app/src/renderer/components/common/NiPart.vue @@ -23,7 +23,7 @@ export default { .ni-part position relative - max-width width-main + max-width width-main-max .ni-part-container .ni-part-header diff --git a/app/src/renderer/styles/app.styl b/app/src/renderer/styles/app.styl index 024a221bb7..ba3ce7d395 100644 --- a/app/src/renderer/styles/app.styl +++ b/app/src/renderer/styles/app.styl @@ -12,6 +12,9 @@ reset-html5() html, body, #app background app-bg +html + overflow hidden + a color link text-decoration none @@ -28,7 +31,7 @@ a padding-top 3rem height 100vh width 100vw - max-width 100% + max-width 100% // fixes bug where horizontal scrollbar appears font-weight 300 display flex diff --git a/app/src/renderer/styles/variables.styl b/app/src/renderer/styles/variables.styl index 542afae0ce..264925f87a 100644 --- a/app/src/renderer/styles/variables.styl +++ b/app/src/renderer/styles/variables.styl @@ -50,7 +50,7 @@ danger = hsl(0,100%,55%) // sizes aw = 64rem width-main = 100% -width-main-max = 64rem +width-main-max = 48rem width-side = 16rem bw = 3*px From cfb1d4415cb09052197210fbad9be25aa2c522dd Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Tue, 27 Feb 2018 14:27:43 +0800 Subject: [PATCH 2/4] update snapshots --- .../__snapshots__/PageBond.spec.js.snap | 22 ++++++++++++++++++- .../__snapshots__/PageDelegates.spec.js.snap | 8 ++++++- .../PageTransactions.spec.js.snap | 22 ++++++++++++++++++- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/test/unit/specs/components/staking/__snapshots__/PageBond.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/PageBond.spec.js.snap index eba8a4932d..6fa6500426 100644 --- a/test/unit/specs/components/staking/__snapshots__/PageBond.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/PageBond.spec.js.snap @@ -78,7 +78,7 @@ exports[`PageBond has the expected html structure 1`] = `
+
+
+
+
+
+
`; diff --git a/test/unit/specs/components/staking/__snapshots__/PageDelegates.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/PageDelegates.spec.js.snap index 2b8437e421..74a7ff6823 100644 --- a/test/unit/specs/components/staking/__snapshots__/PageDelegates.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/PageDelegates.spec.js.snap @@ -46,7 +46,7 @@ exports[`PageDelegates has the expected html structure 1`] = ` -
+
@@ -133,6 +133,12 @@ exports[`PageDelegates has the expected html structure 1`] = ` 0 delegates selected
chevron_rightNext +
+
+
+
+
+
" diff --git a/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap b/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap index fedb6611b5..9b06348382 100644 --- a/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap +++ b/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap @@ -91,7 +91,7 @@ exports[`PageTransactions has the expected html structure 1`] = `
+
+
+
+
+
+
`; From cf650daa358335dcc87994313a2c6aa5915479ca Mon Sep 17 00:00:00 2001 From: Fabian Weber Date: Tue, 27 Feb 2018 10:11:56 +0100 Subject: [PATCH 3/4] update snapshots --- .../common/__snapshots__/NiPage.spec.js.snap | 25 ++++++++++- .../common/__snapshots__/Page404.spec.js.snap | 22 +++++++++- .../__snapshots__/PageBlock.spec.js.snap | 8 +++- .../__snapshots__/PageBlocks.spec.js.snap | 8 +++- .../__snapshots__/PageDelegate.spec.js.snap | 22 +++++++++- .../__snapshots__/PageBalances.spec.js.snap | 44 ++++++++++++++++++- .../__snapshots__/PageSend.spec.js.snap | 22 +++++++++- 7 files changed, 142 insertions(+), 9 deletions(-) diff --git a/test/unit/specs/components/common/__snapshots__/NiPage.spec.js.snap b/test/unit/specs/components/common/__snapshots__/NiPage.spec.js.snap index e327e03fbf..1a1e365050 100644 --- a/test/unit/specs/components/common/__snapshots__/NiPage.spec.js.snap +++ b/test/unit/specs/components/common/__snapshots__/NiPage.spec.js.snap @@ -37,7 +37,28 @@ exports[`NiPage has the expected html structure 1`] = `
+ class="ni-page-main ps" + > +
+
+
+
+
+
+
`; diff --git a/test/unit/specs/components/common/__snapshots__/Page404.spec.js.snap b/test/unit/specs/components/common/__snapshots__/Page404.spec.js.snap index a75a835926..5b8ffe29d5 100644 --- a/test/unit/specs/components/common/__snapshots__/Page404.spec.js.snap +++ b/test/unit/specs/components/common/__snapshots__/Page404.spec.js.snap @@ -36,7 +36,7 @@ exports[`Page404 has the expected html structure 1`] = `
+
+
+
+
+
+
`; diff --git a/test/unit/specs/components/monitor/__snapshots__/PageBlock.spec.js.snap b/test/unit/specs/components/monitor/__snapshots__/PageBlock.spec.js.snap index f6681b9e1a..8627f3a370 100644 --- a/test/unit/specs/components/monitor/__snapshots__/PageBlock.spec.js.snap +++ b/test/unit/specs/components/monitor/__snapshots__/PageBlock.spec.js.snap @@ -46,7 +46,7 @@ exports[`PageBlock has the expected html structure 1`] = ` -
+
@@ -253,6 +253,12 @@ exports[`PageBlock has the expected html structure 1`] = `
+
+
+
+
+
+
" `; diff --git a/test/unit/specs/components/monitor/__snapshots__/PageBlocks.spec.js.snap b/test/unit/specs/components/monitor/__snapshots__/PageBlocks.spec.js.snap index 43852d4d11..dcd2581d3b 100644 --- a/test/unit/specs/components/monitor/__snapshots__/PageBlocks.spec.js.snap +++ b/test/unit/specs/components/monitor/__snapshots__/PageBlocks.spec.js.snap @@ -42,7 +42,7 @@ exports[`PageBlocks has the expected html structure 1`] = ` -
+
@@ -152,6 +152,12 @@ exports[`PageBlocks has the expected html structure 1`] = `
+
+
+
+
+
+
" `; diff --git a/test/unit/specs/components/staking/__snapshots__/PageDelegate.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/PageDelegate.spec.js.snap index 4bad12516d..3f7e72ff33 100644 --- a/test/unit/specs/components/staking/__snapshots__/PageDelegate.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/PageDelegate.spec.js.snap @@ -94,7 +94,7 @@ exports[`PageDelegate has the expected html structure 1`] = `
+
+
+
+
+
+
`; diff --git a/test/unit/specs/components/wallet/__snapshots__/PageBalances.spec.js.snap b/test/unit/specs/components/wallet/__snapshots__/PageBalances.spec.js.snap index 82d46c79e7..ac41280de7 100644 --- a/test/unit/specs/components/wallet/__snapshots__/PageBalances.spec.js.snap +++ b/test/unit/specs/components/wallet/__snapshots__/PageBalances.spec.js.snap @@ -103,7 +103,7 @@ exports[`PageBalances has the expected html structure 1`] = `
+
+
+
+
+
+
`; @@ -426,7 +446,7 @@ exports[`PageBalances should filter the balances 1`] = `
+
+
+
+
+
+
`; diff --git a/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap b/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap index 5b5f2ba8ba..d8e852d71d 100644 --- a/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap +++ b/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap @@ -78,7 +78,7 @@ exports[`PageSend has the expected html structure 1`] = `
+
+
+
+
+
+
`; From 2314964b23ba1078d9bc45c6e3bab84ca5b79112 Mon Sep 17 00:00:00 2001 From: Fabian Weber Date: Tue, 27 Feb 2018 10:16:15 +0100 Subject: [PATCH 4/4] increase timeout for balance update --- test/e2e/wallet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/wallet.js b/test/e2e/wallet.js index f483e3ac00..4622393376 100644 --- a/test/e2e/wallet.js +++ b/test/e2e/wallet.js @@ -111,7 +111,7 @@ test('wallet', async function (t) { await client.$('.material-icons=refresh').click() let mycoinEl = () => balanceEl('fermion') - await waitForText(mycoinEl, '9007199254740892') + await waitForText(mycoinEl, '9007199254740892', 10000) t.pass('balance is reduced by 100') t.end() })