fix: adjust route strcuture (#2708)
This commit is contained in:
parent
d7440cfe54
commit
bcbc3bb146
@ -829,7 +829,7 @@ context(
|
|||||||
cy.highlight(`Associating tokens for first time`);
|
cy.highlight(`Associating tokens for first time`);
|
||||||
cy.ethereum_wallet_connect();
|
cy.ethereum_wallet_connect();
|
||||||
cy.connectVegaWallet();
|
cy.connectVegaWallet();
|
||||||
cy.get('[href="/validators/associate"]').first().click();
|
cy.get('[href="/token/associate"]').first().click();
|
||||||
cy.getByTestId('associate-radio-wallet', { timeout: 30000 }).click();
|
cy.getByTestId('associate-radio-wallet', { timeout: 30000 }).click();
|
||||||
cy.getByTestId('token-amount-input', epochTimeout).type('1');
|
cy.getByTestId('token-amount-input', epochTimeout).type('1');
|
||||||
cy.getByTestId('token-input-submit-button', txTimeout)
|
cy.getByTestId('token-input-submit-button', txTimeout)
|
||||||
|
@ -7,11 +7,11 @@ const vegaWalletUnstakedBalance =
|
|||||||
'[data-testid="vega-wallet-balance-unstaked"]';
|
'[data-testid="vega-wallet-balance-unstaked"]';
|
||||||
const txTimeout = Cypress.env('txTimeout');
|
const txTimeout = Cypress.env('txTimeout');
|
||||||
const vegaWalletPublicKeyShort = Cypress.env('vegaWalletPublicKeyShort');
|
const vegaWalletPublicKeyShort = Cypress.env('vegaWalletPublicKeyShort');
|
||||||
const ethWalletAssociateButton = '[href="/validators/associate"]';
|
const ethWalletAssociateButton = '[href="/token/associate"]';
|
||||||
const associateWalletRadioButton = '[data-testid="associate-radio-wallet"]';
|
const associateWalletRadioButton = '[data-testid="associate-radio-wallet"]';
|
||||||
const tokenAmountInputBox = '[data-testid="token-amount-input"]';
|
const tokenAmountInputBox = '[data-testid="token-amount-input"]';
|
||||||
const tokenSubmitButton = '[data-testid="token-input-submit-button"]';
|
const tokenSubmitButton = '[data-testid="token-input-submit-button"]';
|
||||||
const ethWalletDissociateButton = '[href="/validators/disassociate"]';
|
const ethWalletDissociateButton = '[href="/token/disassociate"]';
|
||||||
const vestingContractSection = '[data-testid="vega-in-vesting-contract"]';
|
const vestingContractSection = '[data-testid="vega-in-vesting-contract"]';
|
||||||
const vegaInWalletSection = '[data-testid="vega-in-wallet"]';
|
const vegaInWalletSection = '[data-testid="vega-in-wallet"]';
|
||||||
const connectedVegaKey = '[data-testid="connected-vega-key"]';
|
const connectedVegaKey = '[data-testid="connected-vega-key"]';
|
||||||
|
@ -131,7 +131,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
|
|||||||
cy.get(associateVegaLink)
|
cy.get(associateVegaLink)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.and('have.attr', 'href')
|
.and('have.attr', 'href')
|
||||||
.and('equal', '/validators/associate');
|
.and('equal', '/token/associate');
|
||||||
});
|
});
|
||||||
it('should have STAKING button', function () {
|
it('should have STAKING button', function () {
|
||||||
cy.get(stakingBtn)
|
cy.get(stakingBtn)
|
||||||
|
@ -2,8 +2,8 @@ const walletContainer = '[data-testid="ethereum-wallet"]';
|
|||||||
const walletHeader = '[data-testid="wallet-header"] h1';
|
const walletHeader = '[data-testid="wallet-header"] h1';
|
||||||
const connectToEthButton = '[data-testid="connect-to-eth-wallet-button"]';
|
const connectToEthButton = '[data-testid="connect-to-eth-wallet-button"]';
|
||||||
const connectorList = '[data-testid="web3-connector-list"]';
|
const connectorList = '[data-testid="web3-connector-list"]';
|
||||||
const associate = '[href="/validators/associate"]';
|
const associate = '[href="/token/associate"]';
|
||||||
const disassociate = '[href="/validators/disassociate"]';
|
const disassociate = '[href="/token/disassociate"]';
|
||||||
const disconnect = '[data-testid="disconnect-from-eth-wallet-button"]';
|
const disconnect = '[data-testid="disconnect-from-eth-wallet-button"]';
|
||||||
const accountNo = '[data-testid="ethereum-account-truncated"]';
|
const accountNo = '[data-testid="ethereum-account-truncated"]';
|
||||||
const currencyTitle = '[data-testid="currency-title"]';
|
const currencyTitle = '[data-testid="currency-title"]';
|
||||||
|
@ -3,8 +3,8 @@ const tokenSubmitButton = '[data-testid="token-input-submit-button"]';
|
|||||||
const tokenInputApprove = '[data-testid="token-input-approve-button"]';
|
const tokenInputApprove = '[data-testid="token-input-approve-button"]';
|
||||||
const addStakeRadioButton = '[data-testid="add-stake-radio"]';
|
const addStakeRadioButton = '[data-testid="add-stake-radio"]';
|
||||||
const removeStakeRadioButton = '[data-testid="remove-stake-radio"]';
|
const removeStakeRadioButton = '[data-testid="remove-stake-radio"]';
|
||||||
const ethWalletAssociateButton = '[href="/validators/associate"]';
|
const ethWalletAssociateButton = '[href="/token/associate"]';
|
||||||
const ethWalletDissociateButton = '[href="/validators/disassociate"]';
|
const ethWalletDissociateButton = '[href="/token/disassociate"]';
|
||||||
const vegaWalletUnstakedBalance =
|
const vegaWalletUnstakedBalance =
|
||||||
'[data-testid="vega-wallet-balance-unstaked"]';
|
'[data-testid="vega-wallet-balance-unstaked"]';
|
||||||
const vegaWalletAssociatedBalance = '[data-testid="currency-value"]';
|
const vegaWalletAssociatedBalance = '[data-testid="currency-value"]';
|
||||||
|
@ -164,12 +164,12 @@ const ConnectedKey = () => {
|
|||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
<WalletCardActions>
|
<WalletCardActions>
|
||||||
<Link className="flex-1" to={`${Routes.VALIDATORS}/associate`}>
|
<Link className="flex-1" to={Routes.ASSOCIATE}>
|
||||||
<Button size="sm" fill={true}>
|
<Button size="sm" fill={true}>
|
||||||
{t('associate')}
|
{t('associate')}
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
<Link className="flex-1" to={`${Routes.VALIDATORS}/disassociate`}>
|
<Link className="flex-1" to={Routes.DISASSOCIATE}>
|
||||||
<Button size="sm" fill={true}>
|
<Button size="sm" fill={true}>
|
||||||
{t('disassociate')}
|
{t('disassociate')}
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -264,8 +264,6 @@ const routerConfig = [
|
|||||||
path: Routes.VALIDATORS,
|
path: Routes.VALIDATORS,
|
||||||
element: <LazyStaking name="Staking" />,
|
element: <LazyStaking name="Staking" />,
|
||||||
children: [
|
children: [
|
||||||
{ path: 'associate', element: <LazyStakingAssociate /> },
|
|
||||||
{ path: 'disassociate', element: <LazyStakingDisassociate /> },
|
|
||||||
{ path: ':node', element: <LazyStakingNode /> },
|
{ path: ':node', element: <LazyStakingNode /> },
|
||||||
{
|
{
|
||||||
index: true,
|
index: true,
|
||||||
@ -311,6 +309,8 @@ const routerConfig = [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{ path: 'associate', element: <LazyStakingAssociate /> },
|
||||||
|
{ path: 'disassociate', element: <LazyStakingDisassociate /> },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -12,8 +12,8 @@ const Routes = {
|
|||||||
REDEEM: '/token/redeem',
|
REDEEM: '/token/redeem',
|
||||||
WITHDRAWALS: '/token/withdraw',
|
WITHDRAWALS: '/token/withdraw',
|
||||||
SUPPLY: '/token/tranches',
|
SUPPLY: '/token/tranches',
|
||||||
ASSOCIATE: '/validators/associate',
|
ASSOCIATE: '/token/associate',
|
||||||
DISASSOCIATE: '/validators/disassociate',
|
DISASSOCIATE: '/token/disassociate',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Routes;
|
export default Routes;
|
||||||
|
@ -93,7 +93,7 @@ const Home = ({ name }: RouteChildProps) => {
|
|||||||
<p>
|
<p>
|
||||||
<Link
|
<Link
|
||||||
data-testid="associate-vega-tokens-link-on-homepage"
|
data-testid="associate-vega-tokens-link-on-homepage"
|
||||||
to={`${Routes.VALIDATORS}/associate`}
|
to={Routes.ASSOCIATE}
|
||||||
className="underline text-white"
|
className="underline text-white"
|
||||||
>
|
>
|
||||||
{t('Associate VEGA tokens')}
|
{t('Associate VEGA tokens')}
|
||||||
|
Loading…
Reference in New Issue
Block a user