Skip to content

Commit

Permalink
added test for list items to Balances and Delegates
Browse files Browse the repository at this point in the history
  • Loading branch information
faboweb committed Dec 19, 2017
1 parent bb235be commit 53f38fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
11 changes: 1 addition & 10 deletions test/unit/specs/PageBalances.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,7 @@ describe('PageBalances', () => {
})
wrapper = mount(PageBalances, {
localVue,
store,
stub: {
AnchorCopy: true,
Btn: true,
ListItem: true,
ModalSearch: true,
Page: true,
Part: true,
ToolBar: true
}
store
})
store.commit('setWalletBalances', [{
denom: 'ATOM',
Expand Down
7 changes: 6 additions & 1 deletion test/unit/specs/PageDelegates.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ describe('PageDelegates', () => {
localVue,
store,
stubs: {
'data-error': '<data-error />'
'data-error': '<data-error />',
'li-delegate': '<li-delegate />'
}
})

Expand All @@ -77,6 +78,10 @@ describe('PageDelegates', () => {
expect(wrapper.contains('.ni-modal-search')).toBe(true)
})

it('should show candidates', () => {
expect(wrapper.findAll('li-delegate').length).toBe(2)
})

it('should refresh candidates on click', () => {
wrapper.findAll('.ni-tool-bar i').at(1).trigger('click')
expect(store.dispatch).toHaveBeenCalledWith('getDelegates')
Expand Down

0 comments on commit 53f38fa

Please sign in to comment.