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

Replace old account page with new one - Closes #1780 #1827

Merged
merged 19 commits into from Mar 22, 2019
Merged
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
1449c84
:recycle: Add delegate and votes tab to wallet
massao Mar 18, 2019
17bc4ef
:recycle: Point explorer/account to new version
massao Mar 18, 2019
5c4ab9e
:white_check_mark: Adjust e2e tests for new account page
massao Mar 18, 2019
359cf43
:recycle: Adjust style for votesTab and when to fetch new data
massao Mar 18, 2019
25b3915
:white_check_mark: Adjust unit tests
massao Mar 18, 2019
5fca420
:white_check_mark: Adjust e2e tests
massao Mar 18, 2019
58093bc
:fire: Remove old account page files
massao Mar 18, 2019
8310add
:white_check_mark: Add delegate test to walletTransactionsV2 file
massao Mar 18, 2019
46b910d
:white_check_mark: Make cypress scroll so first row is not blocked
massao Mar 18, 2019
88d813c
:fire: Remove send files used on old account page
massao Mar 18, 2019
51dc834
:white_check_mark: Fix test being unskipped wrongly
massao Mar 18, 2019
7a611f2
:white_check_mark: Adjust e2e tests
massao Mar 18, 2019
3a1dda2
:white_check_mark: Fix e2e tests due to change on selector
massao Mar 18, 2019
40955be
:recycle: Adjust as requested per review
massao Mar 20, 2019
92933b6
:recycle: Adjust as requested per QA review
massao Mar 22, 2019
309dc5a
:recycle: Remove global scoped graph plugin on balance chart
massao Mar 22, 2019
4d3c1b2
:white_check_mark: Adjust tests after QA review fixes
massao Mar 22, 2019
634f37b
Merge branch '1.14.0' into 1780-replace-old-account-page
massao Mar 22, 2019
a4618d7
:recycle: Update to use since last login instead of visit
massao Mar 22, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -350,7 +350,6 @@
"Release Notes": "Release Notes",
"Reload": "Reload",
"Reload the page": "Reload the page",
"Remove from bookmarks": "Remove from bookmarks",
"Removed Votes": "Removed Votes",
"Report the error via E-Mail": "Report the error via E-Mail",
"Request": "Request",
@@ -391,7 +390,6 @@
"Send anonymous usage statistics": "Send anonymous usage statistics",
"Send to Address": "Send to Address",
"Send to address": "Send to address",
"Send to this address": "Send to this address",
"Send {{value}} LSK": "Send {{value}} LSK",
"Sender": "Sender",
"Session timeout": "Session timeout",
@@ -135,8 +135,8 @@ export const searchAccount = ({ address }) =>
}
dispatch({ data: accountData, type: actionTypes.searchAccount });
dispatch(updateWallet(response, getState().peers));
dispatch(searchVotes({ address, offset: 0, limit: 101 }));
});
dispatch(searchVotes({ address, offset: 0, limit: 101 }));
}
};

@@ -1,34 +1,11 @@
import React from 'react';
import grid from 'flexboxgrid/dist/flexboxgrid.css';
import ExplorerTransactions from './../transactions/explorerTransactions';
import ExplorerTransactionsV2 from './../transactionsV2/explorerTransactionsV2';
import SendTo from '../sendTo';
import styles from './accountTransactions.css';
import routes from '../../constants/routes';

class AccountTransactions extends React.Component {
render() {
const explorerRoute = `${routes.accountsV2.pathPrefix}${routes.accountsV2.path}`;
const { match } = this.props;

return match.url.indexOf(explorerRoute) === -1 ? (
<div className={`${grid.row} ${styles.wrapper}`}>
<div className={`${grid['col-md-4']} ${styles.sendTo}`}>
<SendTo
address={this.props.match.params.address}
t={this.props.t}
account={this.props.account}
delegate={this.props.delegate}
/>
</div>
<div className={`${grid['col-sm-12']} ${styles.transactions} ${grid['col-md-8']} ${styles.transactions}`}>
<ExplorerTransactions
history={this.props.history}
address={this.props.match.params.address}
delegate={this.props.delegate} />
</div>
</div>
) : (
return (
<div className={`${grid.row}`}>
<div className={`${grid['col-xs-10']} ${grid['col-sm-12']} ${grid['col-md-12']} ${grid['col-lg-12']} ${styles.transactions}`}>
<ExplorerTransactionsV2
@@ -67,26 +67,7 @@ describe('AccountTransaction Component', () => {
searchAccountSpy.restore();
});

it('renders AccountTransaction Component and loads account transactions', () => {
const renderedAccountTransactions = wrapper.find(AccountTransactions);
expect(renderedAccountTransactions).to.be.present();
});

it('renders ExplorerTransactionsV2 if is accountsV2 route', () => {
props = {
...props,
match: {
url: `${routes.accountsV2.pathPrefix}${routes.accountsV2.path}/${accounts.genesis.address}`,
params: { address: accounts.genesis.address },
},
};

wrapper = mount(<Provider store={store}>
<Router>
<AccountTransactions {...props} i18n={i18n}/>
</Router>
</Provider>);

it('renders ExplorerTransactionsV2', () => {
expect(wrapper).to.have.descendants(ExplorerTransactionsV2);
});
});
@@ -32,7 +32,7 @@ const DelegateTab = ({ delegate, t }) => {
<li className={'delegate-since'}>
<span className={styles.label}>{t('Delegate since')}</span> {moment(delegateSince).format(t('DD MMM YYYY'))}
</li>
<li className={'vote-weight'}>
<li className={'vote'}>
<span className={styles.label}>{t('Vote weight')}</span> <span>
<LiskAmount val={delegate.vote}/> {t('LSK')}</span>
</li>
@@ -41,7 +41,7 @@ describe('Delegate Tab', () => {
expect(wrapper.find('.rank')).toIncludeText(props.delegate.rank);
expect(wrapper.find('.status')).toIncludeText('Active');
expect(wrapper.find('.delegate-since')).toIncludeText('24 May 2016');
expect(wrapper.find('.vote-weight')).toIncludeText('98,769,657.13168313 LSK');
expect(wrapper.find('.vote')).toIncludeText('98,769,657.13168313 LSK');
expect(wrapper.find('.approval')).toIncludeText(`${props.delegate.approval}%`);
expect(wrapper.find('.productivity')).toIncludeText(`${props.delegate.productivity}%`);
expect(wrapper.find('.blocks')).toIncludeText(`${props.delegate.producedBlocks} (${props.delegate.missedBlocks})`);
@@ -168,7 +168,7 @@ class FollowAccount extends React.Component {
<section className={`${styles.wrapper}`}>
<label className={`${styles.fieldGroup}`}>
<span className={`${styles.fieldLabel}`}>{t('Account Name')}</span>
<span className={`${styles.fieldInput}`}>
<span className={`${styles.fieldInput} account-title`}>
<InputV2
maxLength={40}
autoComplete={'off'}
@@ -202,8 +202,20 @@ class FollowAccount extends React.Component {
</div>
</label>
{isFollowing
? <DangerButtonV2 onClick={this.handleUnfollow}>{t('Unfollow')}</DangerButtonV2>
: <PrimaryButtonV2 onClick={this.handleFollow} disabled={!isValid}>{t('Confirm')}</PrimaryButtonV2>
? (
<DangerButtonV2
className={'follow-account-button'}
onClick={this.handleUnfollow}>
{t('Unfollow')}
</DangerButtonV2>
) : (
<PrimaryButtonV2
className={'follow-account-button'}
onClick={this.handleFollow}
disabled={!isValid}>
{t('Confirm')}
</PrimaryButtonV2>
)
}
</section>
);

This file was deleted.

This file was deleted.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.