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

Random failing e2etests due to reseting transaction filter - Closes #875 #876

Merged
merged 4 commits into from
Jun 5, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import styles from './../transactions.css';
import TransactionOverview from './../transactionOverview';
import TransactionDetailView from './../transactionDetailView';
import Box from './../../box';
import txFilters from './../../../constants/transactionFilters';

class ExplorerTransactions extends React.Component {
onInit() {
Expand All @@ -15,7 +16,7 @@ class ExplorerTransactions extends React.Component {
activePeer: this.props.activePeer,
address: this.props.address,
limit: 25,
filter: this.props.activeFilter,
filter: txFilters.all,
});
}
onLoadMore() {
Expand Down
4 changes: 0 additions & 4 deletions src/components/transactions/transactionOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ class TransactionsOverview extends React.Component {
this.props.onInit();
}

componentWillUnmount() {
this.setTransactionsFilter(txFilters.all);
}

loadMore() {
if (this.canLoadMore) {
this.canLoadMore = false;
Expand Down
4 changes: 2 additions & 2 deletions src/components/transactions/walletTransactions/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { connect } from 'react-redux';
import { translate } from 'react-i18next';
import { withRouter } from 'react-router-dom';
import { loadTransactions, transactionsRequested, transactionsFilterSet } from '../../../actions/transactions';
import { transactionsRequested, transactionsFilterSet } from '../../../actions/transactions';
import { accountVotersFetched, accountVotesFetched } from '../../../actions/account';
import WalletTransactions from './walletTransactions';

/* istanbul ignore next */
const mapStateToProps = state => ({
activePeer: state.peers.data,
account: state.account,
Expand All @@ -18,7 +19,6 @@ const mapStateToProps = state => ({
});

const mapDispatchToProps = dispatch => ({
loadTransactions: data => dispatch(loadTransactions(data)),
transactionsRequested: data => dispatch(transactionsRequested(data)),
transactionsFilterSet: data => dispatch(transactionsFilterSet(data)),
accountVotersFetched: data => dispatch(accountVotersFetched(data)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('WalletTransactions Component', () => {
activePeer: match.any,
address: accounts.genesis.address,
limit: 25,
filter: txFilters.all,
}).returnsPromise().resolves({ transactions: [{ id: 'Some ID' }], count: 1000 });


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import styles from './../transactions.css';
import TransactionOverview from './../transactionOverview';
import TransactionDetailView from './../transactionDetailView';
import Box from './../../box';
import txFilters from './../../../constants/transactionFilters';

class WalletTransactions extends React.Component {
onInit() {
this.props.loadTransactions({
this.props.transactionsFilterSet({
activePeer: this.props.activePeer,
address: this.props.account.address,
publicKey: this.props.account.publicKey,
limit: 25,
filter: txFilters.all,
});

if (this.props.account.isDelegate &&
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/registerDelegate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: Register delegate
And I click "second-passphrase-next"
And I wait 1 seconds
And I click "confirm-delegate-registration"
And I wait 10 seconds
And I wait 15 seconds
Then I should see text "Success!" in "success-header" element
Then I should see text "Your registration is secured on the blockchain" in "success-description" element
And I click "registration-success"
Expand Down
4 changes: 2 additions & 2 deletions test/integration/wallet.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ describe('@integration: Wallet', () => {

describe('Scenario: should allow to view transactions', () => {
step('Given I\'m on "wallet" as "genesis" account', () => setupStep('genesis'));
step('Then I should see 50 rows', () => helper.shouldSeeCountInstancesOf(50, 'TransactionRow'));
step('Then I should see 25 rows', () => helper.shouldSeeCountInstancesOf(25, 'TransactionRow'));
step('When I scroll to the bottom of "transactions box"', () => { wrapper.find('Waypoint').props().onEnter(); });
step('Then I should see 75 rows', () => { wrapper.update(); helper.shouldSeeCountInstancesOf(75, 'TransactionRow'); });
step('Then I should see 50 rows', () => { wrapper.update(); helper.shouldSeeCountInstancesOf(50, 'TransactionRow'); });
});

describe.skip('Scenario: should allow to filter transactions', () => {
Expand Down