Skip to content

Commit

Permalink
Merge pull request #876 from LiskHQ/875-explorer-e2e-tests-are-failing
Browse files Browse the repository at this point in the history
Random failing e2etests due to reseting transaction filter - Closes #875
  • Loading branch information
faival committed Jun 5, 2018
2 parents 67378e6 + 1a3132d commit b9b8c44
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
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
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
@@ -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
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
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
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
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

0 comments on commit b9b8c44

Please sign in to comment.