Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor some tests, remove onboarding tutorial & preferences #2255

Merged
merged 12 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions PENDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Fixed

- [#\2188](https://github.com/cosmos/voyager/issues/2188) Fixed issues with the way we were loading PageNetwork @jbibla
- [#\2246](https://github.com/cosmos/voyager/issues/2246) Fix from moniker not visible on withdraw txs @faboweb

### Added

- [\#1959](https://github.com/cosmos/voyager/issues/1959) display transactions on block page @fedekunze

### Changed

- [\#2255](https://github.com/cosmos/voyager/pull/2255) removed onboarding tutorial @fedekunze
- [\#2259](https://github.com/cosmos/voyager/issues/2259) removed PagePreferences @fedekunze
- [\#1337](https://github.com/cosmos/voyager/issues/1337) refactor unit tests: Page404, ShortBech32 @fedekunze
- Ignore changelog check on master @faboweb
- [#\2217](https://github.com/cosmos/voyager/issues/2217) Limit inputs to max precision @faboweb
60 changes: 0 additions & 60 deletions app/src/renderer/components/common/AnchorCopy.vue

This file was deleted.

5 changes: 5 additions & 0 deletions app/src/renderer/components/common/Page404.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
<ul>
<li>
<router-link to="/">
Network
</router-link>
</li>
<li>
<router-link to="/wallet">
Wallet
</router-link>
</li>
Expand Down
73 changes: 0 additions & 73 deletions app/src/renderer/components/common/PagePreferences.vue

This file was deleted.

17 changes: 14 additions & 3 deletions app/src/renderer/components/common/TmField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@
<div>{{ resolvedOptions.unchecked }}</div>
</div>
<div class="toggle-handle" />
<input :value="currentToggleState" type="checkbox" @change="onChange">
<input
:disabled="isDisabled"
:value="currentToggleState"
type="checkbox"
@change="onChange"
>
</div>
</label>

Expand Down Expand Up @@ -110,6 +115,10 @@ export default {
keydown: {
type: Function,
default: null
},
isDisabled: {
type: Boolean,
default: false
}
},
data: () => ({
Expand Down Expand Up @@ -153,8 +162,10 @@ export default {
},
methods: {
toggle() {
this.currentToggleState = !this.currentToggleState
this.onChange(this.currentToggleState)
if (!this.isDisabled) {
this.currentToggleState = !this.currentToggleState
this.onChange(this.currentToggleState)
}
},
updateValue(value) {
let formattedValue = value
Expand Down
49 changes: 0 additions & 49 deletions app/src/renderer/components/common/TmLiCopy.vue

This file was deleted.

3 changes: 0 additions & 3 deletions app/src/renderer/components/common/ToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
<i v-tooltip.bottom="'Refresh'" class="material-icons">refresh</i>
</a>
<slot />
<router-link v-if="session.signedIn" id="settings" to="/preferences">
<i v-tooltip.bottom="'Preferences'" class="material-icons">settings</i>
</router-link>
<a
v-if="session.signedIn"
id="signOut-btn"
Expand Down
6 changes: 0 additions & 6 deletions app/src/renderer/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ export default [
name: `validator`,
component: require(`./components/staking/PageValidator`).default
},
{
path: `/preferences`,
name: `preferences`,
component: require(`./components/common/PagePreferences`).default,
meta: { requiresAuth: true }
},
{
path: `/wallet`,
name: `wallet`,
Expand Down
1 change: 0 additions & 1 deletion app/src/renderer/vuex/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const lastPage = state => {
state.session.history[state.session.history.length - 1]
)
}
export const onboarding = state => state.onboarding

// wallet
export const transactions = state => state.transactions
Expand Down
1 change: 0 additions & 1 deletion app/src/renderer/vuex/modules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default opts => ({
delegation: require(`./delegation.js`).default(opts),
connection: require(`./connection.js`).default(opts),
notifications: require(`./notifications.js`).default(opts),
onboarding: require(`./onboarding.js`).default(opts),
proposals: require(`./governance/proposals.js`).default(opts),
votes: require(`./governance/votes.js`).default(opts),
deposits: require(`./governance/deposits.js`).default(opts),
Expand Down
41 changes: 0 additions & 41 deletions app/src/renderer/vuex/modules/onboarding.js

This file was deleted.

6 changes: 3 additions & 3 deletions app/src/renderer/vuex/modules/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ export default () => {
const ERROR_COLLECTION_KEY = `voyager_error_collection`

const state = {
experimentalMode: config.development,
insecureMode: config.development,
experimentalMode: config.development, // development mode
fedekunze marked this conversation as resolved.
Show resolved Hide resolved
insecureMode: config.development, // show the local signer
signedIn: false,
accounts: [],
localKeyPairName: null, // used for signing with a locally stored key, TODO move into own module
localKeyPairName: null, // used for signing with a locally stored key; TODO: move into own module
pauseHistory: false,
history: [],
address: null,
Expand Down
11 changes: 2 additions & 9 deletions test/e2e/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,14 @@ module.exports = {
})
console.log(`navigated to "${linkText}"`)
},
async navigateToPreferences(app) {
await module.exports.openMenu(app)
// click link
await app.client.waitForExist(`#settings`, 1000)
await app.client.$(`#settings`).click()
console.log(`navigated to preferences`)
},
sleep,
async waitForText(elGetterFn, text, timeout = 5000) {
const start = Date.now()
while ((await elGetterFn().getText()) !== text) {
if (Date.now() - start >= timeout) {
throw Error(
`Timed out waiting for text. Expected ${text}, Showing ${(await elGetterFn().getText()) ||
`nothing`}`
`nothing`}`
)
}
await sleep(100)
Expand All @@ -85,7 +78,7 @@ module.exports = {
if (Date.now() - start >= timeout) {
throw Error(
`Timed out waiting for value. Expected ${value}, Showing ${(await elGetterFn().getValue()) ||
`nothing`}`
`nothing`}`
)
}
await sleep(100)
Expand Down
Loading