From 09b04fb302ee6b12de731483f44d516293e5807a Mon Sep 17 00:00:00 2001 From: yashar Date: Wed, 16 Aug 2017 15:01:56 +0430 Subject: [PATCH 1/6] Rename label of primary button in votingConfirm --- src/components/voting/confirmVotes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/voting/confirmVotes.js b/src/components/voting/confirmVotes.js index d13cc7d11..7ebeb57de 100644 --- a/src/components/voting/confirmVotes.js +++ b/src/components/voting/confirmVotes.js @@ -87,7 +87,7 @@ export class ConfirmVotes extends React.Component { onClick: this.props.closeDialog, }} primaryButton={{ - label: 'Vote', + label: 'Confirm', fee: Fees.vote, disabled: ( this.props.votedList.length === 0 && From 295d6ab306d2c5e883bf67684314142cdb2fa9e4 Mon Sep 17 00:00:00 2001 From: yashar Date: Wed, 16 Aug 2017 15:03:06 +0430 Subject: [PATCH 2/6] Fix a bug in confirmVotes test file --- src/components/voting/confirmVotes.test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/voting/confirmVotes.test.js b/src/components/voting/confirmVotes.test.js index 3b0fca9fd..941a02a98 100644 --- a/src/components/voting/confirmVotes.test.js +++ b/src/components/voting/confirmVotes.test.js @@ -7,7 +7,7 @@ import sinonChai from 'sinon-chai'; import PropTypes from 'prop-types'; import sinonStubPromise from 'sinon-stub-promise'; import store from '../../store'; -import ConfrimVotesContainer, { ConfirmVotes } from './confirmVotes'; +import ConfirmVotesContainer, { ConfirmVotes } from './confirmVotes'; import * as delegateApi from '../../utils/api/delegate'; sinonStubPromise(sinon); @@ -43,16 +43,16 @@ const props = { pendingVotesAdded: sinon.spy(), addTransaction: sinon.spy(), }; -describe('ConfrimVotesContainer', () => { - it('should render ConfrimVotes', () => { - const wrapper = mount(, { +describe('ConfirmVotesContainer', () => { + it('should render ConfirmVotes', () => { + const wrapper = mount(, { context: { store }, childContextTypes: { store: PropTypes.object.isRequired }, }); expect(wrapper.find('ConfirmVotes').exists()).to.be.equal(true); }); }); -describe('ConfrimVotes', () => { +describe('ConfirmVotes', () => { let wrapper; const delegateApiMock = sinon.stub(delegateApi, 'vote'); beforeEach(() => { @@ -69,7 +69,7 @@ describe('ConfrimVotes', () => { expect(props.pendingVotesAdded).to.have.been.calledWith(); expect(props.addTransaction).to.have.been.calledWith(); expect(props.showSuccessAlert).to.have.been.calledWith(); - // it should triger 'props.clearVoteLists' after 10000 ms + // it should trigger 'props.clearVoteLists' after 10000 ms clock.tick(10000); expect(props.clearVoteLists).to.have.been.calledWith(); }); From eed5816c9a3c608757b4042fa7eac7e53c9d7654 Mon Sep 17 00:00:00 2001 From: yashar Date: Wed, 16 Aug 2017 15:04:33 +0430 Subject: [PATCH 3/6] Change title of ConfirmVotes modal --- src/components/voting/votingHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/voting/votingHeader.js b/src/components/voting/votingHeader.js index c7a29fe6a..786337171 100644 --- a/src/components/voting/votingHeader.js +++ b/src/components/voting/votingHeader.js @@ -72,7 +72,7 @@ class VotingHeader extends React.Component {