Skip to content

Commit

Permalink
🔥 Remove go to confirmPage on vote protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltomasik committed Mar 28, 2018
1 parent ee70288 commit 1560ef9
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 74 deletions.
2 changes: 0 additions & 2 deletions i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@
"Redo": "Redo",
"Register": "Register",
"Register 2nd passphrase": "Register 2nd passphrase",
"Register Second Passphrase": "Register Second Passphrase",
"Register as delegate": "Register as delegate",
"Reload": "Reload",
"Remove": "Remove",
"Report Issue...": "Report Issue...",
Expand Down
3 changes: 1 addition & 2 deletions src/components/delegateSidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const DelegateSidebar = props => (
<MultiStep className={styles.wrapper} finalCallback={() => true}>
<VotesPreview votes={props.votes}
updateList={(value) => { props.updateList(value); }}
onMount={props.setLayover}
history={props.history}/>
onMount={props.setLayover} />
<PassphraseSteps onMount={props.setLayover} />
<ConfirmVotes
updateList={(value) => { props.updateList(value); }}
Expand Down
25 changes: 0 additions & 25 deletions src/components/dialog/dialogs.js

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/savedAccounts/modalTheme.css

This file was deleted.

7 changes: 0 additions & 7 deletions src/components/votesPreview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ class VotesPreview extends React.Component {
if (typeof this.props.onMount === 'function') {
this.props.onMount(false, 'VotesPreview');
}

if (this.props.history &&
this.props.history.location.search.includes('votes') &&
this.props.account.balance !== 0) {
this.props.updateList(true);
this.props.nextStep({});
}
}

dismissSurpassMessage() {
Expand Down
6 changes: 0 additions & 6 deletions src/components/votesPreview/votesPreview.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('votesPreview', () => {
unconfirmed: false,
},
},
history: { location: { search: 'votes?trest' } },
nextStep: spy(),
updateList: spy(),
};
Expand Down Expand Up @@ -79,9 +78,4 @@ describe('votesPreview', () => {
className = wrapper.find('.selection-wrapper').props().className;
expect(className.match(/red/g)).to.have.lengthOf(1);
});

it('should call nextStep and updateList when history.location.search contains votes', () => {
expect(props.nextStep).to.have.been.calledWith({});
expect(props.updateList).to.have.been.calledWith(true);
});
});
3 changes: 1 addition & 2 deletions src/components/voting/voting.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class Voting extends React.Component {
<aside className={`${grid['col-sm-12']} ${grid['col-md-4']} ${styles.votingBox}`}>
<DelegateSidebar votes={this.props.votes}
setLayover={this.setLayover.bind(this)}
updateList={(value) => { this.toggleSummery(value); }}
history={this.props.history} />
updateList={(value) => { this.toggleSummery(value); }} />
</aside>
<section className={`${grid['col-sm-12']} ${grid['col-md-8']} ${styles.votingBox}`}>
<DelegateList showChangeSummery={this.state.showChangeSummery} />
Expand Down
1 change: 0 additions & 1 deletion src/store/middlewares/account.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ describe('Account middleware', () => {
data: {},
},
account: {
balance: 0,
address: 'sample_address',
},
transactions: {
Expand Down
15 changes: 5 additions & 10 deletions test/e2e/voting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,8 @@ Feature: Voting page
And I wait 0.5 seconds
Then I should see text "You’re votes are being processed and will be confirmed. It may take up to 10 minutes to be secured in the blockchain." in "result box message" element

Scenario: should allow to select delegates by URL
Given I'm logged in as "delegate candidate"
When I go to "/main/voting/vote?votes=genesis_12,genesis_14,genesis_16"
And I wait 1 seconds
Then I should see text "Confirm (Fee: 1 LSK)" in "confirm" element
<<<<<<< HEAD
=======
And I should see 3 instances of "selected row"
>>>>>>> :white_check_mark: Add missing test
# Scenario: should allow to select delegates by URL
# Given I'm logged in as "delegate candidate"
# When I go to "/main/voting/vote?votes=genesis_12,genesis_14,genesis_16"
# And I wait 1 seconds
# And I should see 3 instances of "selected row"

0 comments on commit 1560ef9

Please sign in to comment.