9941c9bfaa
* fix: deposits tests, also convert to basic cypress * add new home tests which test redirect to trading page and markets page * chore: replace portfolio page feature with raw cypress * chore: replace market page feature with raw cypress tests * chore: replace home page tests with global.ts for wallet connections * chore: add raw cypress withdrawals tests with mocks * fix: complete withdrawals prompt and add assertion for it * chore: remove unnecessary cypress envs now that we are mocking assets * chore: ignore lint errors temporarily * chore: add mock for deposit page query, add wait for mocked queries to resolve * fix: order of waiting for withdraw page query * fix: validate vega wallet connection * chore: remove rest of page objects and convert trading page feature to regular cypress * fix: assertion on transaction dialog after withdrawal * chore: split withdraw and withdrawals pages into separate files * chore: split trading tests into own files, connect wallet once for deal ticket * feat: convert home page tests to raw cypress
83 lines
2.9 KiB
TypeScript
83 lines
2.9 KiB
TypeScript
import { Web3Container } from '../../components/web3-container';
|
|
import { t } from '@vegaprotocol/react-helpers';
|
|
import { PositionsContainer } from '@vegaprotocol/positions';
|
|
import { OrderListContainer } from '@vegaprotocol/order-list';
|
|
import { AccountsContainer } from '@vegaprotocol/accounts';
|
|
import { AnchorButton } from '@vegaprotocol/ui-toolkit';
|
|
|
|
import { WithdrawalsContainer } from './withdrawals/withdrawals-container';
|
|
import { GridTab, GridTabs } from '../../components/grid-tabs';
|
|
|
|
const Portfolio = () => {
|
|
const tabClassName = 'p-[16px] pl-[316px]';
|
|
|
|
return (
|
|
<Web3Container>
|
|
<div className="h-full text-ui">
|
|
<main className="relative h-[calc(100%-200px)]">
|
|
<aside className="absolute px-[8px] py-[16px] w-[300px] mt-[28px] h-[calc(100%-28px)] w-[300px] overflow-auto">
|
|
<h2 className="text-h4 text-black dark:text-white">
|
|
{t('Filters')}
|
|
</h2>
|
|
</aside>
|
|
<section data-testid="portfolio-grid">
|
|
<GridTabs>
|
|
<GridTab id="positions" name={t('Positions')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('Positions')}
|
|
</h4>
|
|
<PositionsContainer />
|
|
</div>
|
|
</GridTab>
|
|
<GridTab id="orders" name={t('Orders')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('Orders')}
|
|
</h4>
|
|
<OrderListContainer />
|
|
</div>
|
|
</GridTab>
|
|
<GridTab id="fills" name={t('Fills')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('Fills')}
|
|
</h4>
|
|
</div>
|
|
</GridTab>
|
|
<GridTab id="history" name={t('History')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('History')}
|
|
</h4>
|
|
</div>
|
|
</GridTab>
|
|
</GridTabs>
|
|
</section>
|
|
</main>
|
|
<section className="fixed bottom-0 left-0 w-full h-[200px]">
|
|
<GridTabs>
|
|
<GridTab id="collateral" name={t('Collateral')}>
|
|
<AccountsContainer />
|
|
</GridTab>
|
|
<GridTab id="deposits" name={t('Deposits')}>
|
|
<AnchorButton data-testid="deposit" href="/portfolio/deposit">
|
|
{t('Deposit')}
|
|
</AnchorButton>
|
|
</GridTab>
|
|
<GridTab id="withdrawals" name={t('Withdrawals')}>
|
|
<WithdrawalsContainer />
|
|
</GridTab>
|
|
</GridTabs>
|
|
</section>
|
|
</div>
|
|
</Web3Container>
|
|
);
|
|
};
|
|
|
|
Portfolio.getInitialProps = () => ({
|
|
page: 'portfolio',
|
|
});
|
|
|
|
export default Portfolio;
|