Merge branch 'master' into task/token-flow-tests
This commit is contained in:
commit
637acb336e
@ -56,14 +56,14 @@ export const TxsInfiniteListItem = ({
|
||||
data-testid="command-details"
|
||||
>
|
||||
<Icon name="search-template" />
|
||||
<Dialog
|
||||
open={open}
|
||||
onChange={(isOpen) => setOpen(isOpen)}
|
||||
intent={Intent.None}
|
||||
>
|
||||
<SyntaxHighlighter data={JSON.parse(Command)} />
|
||||
</Dialog>
|
||||
</button>
|
||||
<Dialog
|
||||
open={open}
|
||||
onChange={(isOpen) => setOpen(false)}
|
||||
intent={Intent.None}
|
||||
>
|
||||
<SyntaxHighlighter data={JSON.parse(Command)} />
|
||||
</Dialog>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
@ -38,7 +38,7 @@
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "129999.45",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "123949.3351449367653555",
|
||||
"locked_amount": "123771.490322542830121935",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129999.45",
|
||||
@ -488,7 +488,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "97499.58",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "64804.952997247079204604",
|
||||
"locked_amount": "64630.503793473215764854",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "97499.58",
|
||||
@ -521,7 +521,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "135173.4239508",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "88577.18263884362270361639432",
|
||||
"locked_amount": "88338.74069468335043789037108",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "135173.4239508",
|
||||
@ -554,7 +554,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "32499.86",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "27262.324604263582721104",
|
||||
"locked_amount": "27188.936836812527603638",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "32499.86",
|
||||
@ -587,7 +587,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "10833.29",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "8873.622111351784071168",
|
||||
"locked_amount": "8849.73510518450376725",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "10833.29",
|
||||
@ -675,7 +675,7 @@
|
||||
"tranche_end": "2022-11-01T00:00:00.000Z",
|
||||
"total_added": "22500",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "15101.45352128623275",
|
||||
"locked_amount": "15009.77977807970925",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "15000",
|
||||
@ -761,7 +761,7 @@
|
||||
"tranche_end": "2023-06-02T00:00:00.000Z",
|
||||
"total_added": "1939928.38",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "1788435.020023831121162896",
|
||||
"locked_amount": "1784450.526715937253657224",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1852091.69",
|
||||
@ -1777,7 +1777,7 @@
|
||||
"tranche_end": "2022-09-30T00:00:00.000Z",
|
||||
"total_added": "60916.66666633337",
|
||||
"total_removed": "18705.279504739679372649",
|
||||
"locked_amount": "14291.414097045104884895635487211",
|
||||
"locked_amount": "14174.3154725799324512925372029368",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "2833.333333",
|
||||
@ -5228,7 +5228,7 @@
|
||||
"tranche_end": "2022-09-03T00:00:00.000Z",
|
||||
"total_added": "19457.000000000000000003",
|
||||
"total_removed": "5056.88782409978",
|
||||
"locked_amount": "3438.09619897894364166053010683028919314",
|
||||
"locked_amount": "3398.13272038305485656052394501522070024",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "75",
|
||||
@ -14143,7 +14143,7 @@
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "3732368.4671",
|
||||
"total_removed": "74162.9780761646031",
|
||||
"locked_amount": "2772703.2835660003368440463",
|
||||
"locked_amount": "2766580.5046049960554378523",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1998.95815",
|
||||
@ -14855,8 +14855,8 @@
|
||||
"tranche_start": "2022-06-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-12-05T00:00:00.000Z",
|
||||
"total_added": "15788853.065470999700000001",
|
||||
"total_removed": "8977.81072959055965",
|
||||
"locked_amount": "15054047.07609322321427388182456345806299",
|
||||
"total_removed": "9334.9335972441156",
|
||||
"locked_amount": "15032447.2480229303798974414774589251797783",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "16249.93",
|
||||
@ -15400,6 +15400,11 @@
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0x57a5f040ac80c34cc5c90c2cf939c21fa2ef872042998703d69995c71184ab44"
|
||||
},
|
||||
{
|
||||
"amount": "357.12286765355595",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tx": "0xa8bd86154d3a5c4db84fa8f2f26199b14625b9977690fc175d349a668f2e26b8"
|
||||
},
|
||||
{
|
||||
"amount": "2446.31552516990115",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@ -15546,6 +15551,12 @@
|
||||
"tranche_id": 2,
|
||||
"tx": "0x57a5f040ac80c34cc5c90c2cf939c21fa2ef872042998703d69995c71184ab44"
|
||||
},
|
||||
{
|
||||
"amount": "357.12286765355595",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
"tranche_id": 2,
|
||||
"tx": "0xa8bd86154d3a5c4db84fa8f2f26199b14625b9977690fc175d349a668f2e26b8"
|
||||
},
|
||||
{
|
||||
"amount": "2446.31552516990115",
|
||||
"user": "0x20CD77B9FC2f1fEDfb6F184E25f7127BFE991C8b",
|
||||
@ -15590,8 +15601,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "194999.1675",
|
||||
"withdrawn_tokens": "8977.81072959055965",
|
||||
"remaining_tokens": "186021.35677040944035"
|
||||
"withdrawn_tokens": "9334.9335972441156",
|
||||
"remaining_tokens": "185664.2339027558844"
|
||||
},
|
||||
{
|
||||
"address": "0x89051CAb67Bc7F8CC44F7e270c6EDaf1EC57676c",
|
||||
@ -16995,8 +17006,8 @@
|
||||
"tranche_start": "2021-11-05T00:00:00.000Z",
|
||||
"tranche_end": "2023-05-05T00:00:00.000Z",
|
||||
"total_added": "14597706.0446472999",
|
||||
"total_removed": "2158746.556523576443330677",
|
||||
"locked_amount": "8247873.1795980633455589418403988",
|
||||
"total_removed": "2159399.571956092952408927",
|
||||
"locked_amount": "8227829.74049486209436849383466922",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "129284.449",
|
||||
@ -17280,6 +17291,11 @@
|
||||
"user": "0xcc2cf726A84e71301f9079FC177BA946aa98A694",
|
||||
"tx": "0x1f9f8184e28b9dabb8878b08ea6e50c93b7f18a724b1070a62c0223f12256339"
|
||||
},
|
||||
{
|
||||
"amount": "653.01543251650907825",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tx": "0xab622bab50344a6084b801420f43550a461b7d47402f9db0323258d02489ee9b"
|
||||
},
|
||||
{
|
||||
"amount": "652.48254356494551875",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@ -18922,6 +18938,12 @@
|
||||
"tranche_id": 3,
|
||||
"tx": "0x4ef5e959da18a286e010bc26fdc2bdda73f3e612334b232cb3e4af4c8c3d018d"
|
||||
},
|
||||
{
|
||||
"amount": "653.01543251650907825",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
"tranche_id": 3,
|
||||
"tx": "0xab622bab50344a6084b801420f43550a461b7d47402f9db0323258d02489ee9b"
|
||||
},
|
||||
{
|
||||
"amount": "652.48254356494551875",
|
||||
"user": "0x4Aa3c35F6CC2d507E5C18205ee57099A4C80B19b",
|
||||
@ -20160,8 +20182,8 @@
|
||||
}
|
||||
],
|
||||
"total_tokens": "359123.469575",
|
||||
"withdrawn_tokens": "156040.35185448395445825",
|
||||
"remaining_tokens": "203083.11772051604554175"
|
||||
"withdrawn_tokens": "156693.3672870004635365",
|
||||
"remaining_tokens": "202430.1022879995364635"
|
||||
},
|
||||
{
|
||||
"address": "0xBdd412797c1B78535Afc5F71503b91fAbD0160fB",
|
||||
@ -21176,7 +21198,7 @@
|
||||
"tranche_end": "2023-04-05T00:00:00.000Z",
|
||||
"total_added": "5778205.3912159303",
|
||||
"total_removed": "1417003.438054406291892727",
|
||||
"locked_amount": "2941881.17244069509858904234270872",
|
||||
"locked_amount": "2933961.88842931001107719366680201",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "552496.6455",
|
||||
@ -22332,7 +22354,7 @@
|
||||
"tranche_end": "2023-06-05T00:00:00.000Z",
|
||||
"total_added": "472355.6199999996",
|
||||
"total_removed": "75.634316334",
|
||||
"locked_amount": "439350.6847287052296870462810756",
|
||||
"locked_amount": "438380.49540303746176025562354132",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "3000",
|
||||
|
@ -38,7 +38,7 @@
|
||||
"tranche_end": "2022-11-26T13:48:10.000Z",
|
||||
"total_added": "100",
|
||||
"total_removed": "0",
|
||||
"locked_amount": "40.84151128868595",
|
||||
"locked_amount": "40.63611745306951",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "100",
|
||||
@ -242,7 +242,7 @@
|
||||
"tranche_end": "2022-10-12T00:53:20.000Z",
|
||||
"total_added": "1100",
|
||||
"total_removed": "673.04388635",
|
||||
"locked_amount": "312.01857876712325",
|
||||
"locked_amount": "309.75924657534241",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1000",
|
||||
|
@ -69,7 +69,7 @@
|
||||
"tranche_end": "2022-10-12T00:53:20.000Z",
|
||||
"total_added": "1010.000000000000000001",
|
||||
"total_removed": "668.4622323651",
|
||||
"locked_amount": "286.4897859589040750002836532534246575",
|
||||
"locked_amount": "284.4153082191780310002815993150684931",
|
||||
"deposits": [
|
||||
{
|
||||
"amount": "1000",
|
||||
|
108
apps/token-e2e/src/integration/staking.cy.js
Normal file
108
apps/token-e2e/src/integration/staking.cy.js
Normal file
@ -0,0 +1,108 @@
|
||||
import navigation from '../locators/navigation.locators';
|
||||
import staking from '../locators/staking.locators';
|
||||
|
||||
context('Staking Page - verify elements on page', function () {
|
||||
before('navigate to staking page', function () {
|
||||
cy.visit('/')
|
||||
.get(navigation.section)
|
||||
.within(() => {
|
||||
cy.get(navigation.staking).click();
|
||||
});
|
||||
});
|
||||
|
||||
describe('with wallets disconnected', function () {
|
||||
describe('description section', function () {
|
||||
it('should have staking tab highlighted', function () {
|
||||
cy.get(navigation.section).within(() => {
|
||||
cy.get(navigation.staking).should('have.attr', 'aria-current');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have STAKING ON VEGA header visible', function () {
|
||||
cy.get(staking.pageHeader)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Staking on Vega');
|
||||
});
|
||||
|
||||
it('should have Staking Guide link visible', function () {
|
||||
cy.get(staking.guideLink)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Read more about staking on Vega')
|
||||
.and(
|
||||
'have.attr',
|
||||
'href',
|
||||
'https://docs.vega.xyz/docs/mainnet/concepts/vega-chain/#staking-on-vega'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe('step 1 section', function () {
|
||||
it('should have header visible', function () {
|
||||
cy.get(staking.step1).within(() => {
|
||||
cy.get(staking.sectionHeader)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Step 1. Connect to a Vega Wallet');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have text visible', function () {
|
||||
cy.get(staking.step1).within(() => {
|
||||
cy.get(staking.link)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Vega Wallet')
|
||||
.and('have.attr', 'href', 'https://vega.xyz/wallet');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have connect to eth button visible', function () {
|
||||
cy.get(staking.step1).within(() => {
|
||||
cy.get(staking.connectToEthBtn)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Connect Ethereum wallet');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have connect to vega button visible', function () {
|
||||
cy.get(staking.step1).within(() => {
|
||||
cy.get(staking.connectToVegaBtn)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Connect Vega wallet');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('step 2 section', function () {
|
||||
it('should have header visible', function () {
|
||||
cy.get(staking.step2).within(() => {
|
||||
cy.get(staking.sectionHeader)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Step 2. Associate tokens with a Vega Wallet');
|
||||
});
|
||||
});
|
||||
|
||||
it('should have warning visible', function () {
|
||||
cy.get(staking.step2).within(() => {
|
||||
cy.get(staking.warning)
|
||||
.should('be.visible')
|
||||
.and(
|
||||
'have.text',
|
||||
'You need to connect to an Ethereum wallet first'
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('step 3 section', function () {
|
||||
it('should have header visible', function () {
|
||||
cy.get(staking.step3).within(() => {
|
||||
cy.get(staking.sectionHeader)
|
||||
.should('be.visible')
|
||||
.and(
|
||||
'have.text',
|
||||
"Step 3. Select the validator you'd like to nominate"
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
@ -18,7 +18,9 @@ context('Vesting Page - verify elements on page', function () {
|
||||
});
|
||||
|
||||
it('should have VESTING header visible', function () {
|
||||
cy.get(vesting.header).should('be.visible').and('have.text', 'Vesting');
|
||||
cy.get(vesting.pageHeader)
|
||||
.should('be.visible')
|
||||
.and('have.text', 'Vesting');
|
||||
});
|
||||
|
||||
it('should have connect Eth wallet info', function () {
|
||||
|
6
apps/token-e2e/src/locators/common.locators.js
Normal file
6
apps/token-e2e/src/locators/common.locators.js
Normal file
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
pageHeader: 'header h1',
|
||||
sectionHeader: 'h2',
|
||||
link: '[data-testid="link"]',
|
||||
warning: '[data-testid="callout"]',
|
||||
};
|
@ -1,4 +1,13 @@
|
||||
import common from './common.locators';
|
||||
|
||||
export default {
|
||||
...common,
|
||||
guideLink: '[data-testid="staking-guide-link"]',
|
||||
step1: '[data-testid="staking-step-1"]',
|
||||
step2: '[data-testid="staking-step-2"]',
|
||||
step3: '[data-testid="staking-step-3"]',
|
||||
connectToEthBtn: '[data-testid="connect-to-eth-btn"]',
|
||||
connectToVegaBtn: '[data-testid="connect-to-vega-wallet-btn"]',
|
||||
validatorNames: '[data-testid="node-list-item-name"]',
|
||||
epochEndingText: '[data-testid="epoch-countdown"]',
|
||||
addStakeRadioButton: '[data-testid="add-stake-radio"]',
|
||||
@ -10,5 +19,5 @@ export default {
|
||||
stakeNextEpochValue: '[data-testid="stake-next-epoch"]',
|
||||
stakeThisEpochValue: '[data-testid="stake-this-epoch"]',
|
||||
stakeMaximumTokens: '[data-testid="token-amount-use-maximum"]',
|
||||
stakeAssociateWalletRadio: '[data-testid="associate-radio-wallet"]',
|
||||
stakeAssociateWalletRadio: '[data-testid="associate-radio-wallet"]'
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
import common from './common.locators';
|
||||
|
||||
export default {
|
||||
header: 'header h1',
|
||||
...common,
|
||||
connectPrompt: '[data-testid="eth-connect-prompt"]',
|
||||
connectButton: '[data-testid="connect-to-eth-btn"]',
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ export const ConnectToVega = () => {
|
||||
isOpen: true,
|
||||
})
|
||||
}
|
||||
data-test-id="connect-to-vega-wallet-btn"
|
||||
data-testid="connect-to-vega-wallet-btn"
|
||||
>
|
||||
{t('connectVegaWallet')}
|
||||
</Button>
|
||||
|
@ -36,19 +36,20 @@ export const Staking = ({ data }: { data?: StakingQueryResult }) => {
|
||||
href={Links.STAKING_GUIDE}
|
||||
className="text-white underline"
|
||||
target="_blank"
|
||||
data-testid="staking-guide-link"
|
||||
>
|
||||
{t('readMoreStaking')}
|
||||
</Link>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<section data-testid="staking-step-1">
|
||||
<BulletHeader tag="h2" style={stakingBulletStyles}>
|
||||
{t('stakingStep1')}
|
||||
</BulletHeader>
|
||||
<StakingStepConnectWallets />
|
||||
</section>
|
||||
<section>
|
||||
<section data-testid="staking-step-2">
|
||||
<BulletHeader tag="h2" style={stakingBulletStyles}>
|
||||
{t('stakingStep2')}
|
||||
</BulletHeader>
|
||||
@ -60,7 +61,7 @@ export const Staking = ({ data }: { data?: StakingQueryResult }) => {
|
||||
}
|
||||
/>
|
||||
</section>
|
||||
<section>
|
||||
<section data-testid="staking-step-3">
|
||||
<BulletHeader tag="h2" style={stakingBulletStyles}>
|
||||
{t('stakingStep3')}
|
||||
</BulletHeader>
|
||||
|
@ -61,8 +61,8 @@ export const limitOrder = generateOrder({
|
||||
type: OrderType.Limit,
|
||||
status: OrderStatus.Active,
|
||||
timeInForce: OrderTimeInForce.GTT,
|
||||
createdAt: new Date('2022-3-3').toISOString(),
|
||||
expiresAt: new Date('2022-3-5').toISOString(),
|
||||
createdAt: new Date(2022, 3, 3).toISOString(),
|
||||
expiresAt: new Date(2022, 3, 5).toISOString(),
|
||||
});
|
||||
|
||||
export const marketOrder = generateOrder({
|
||||
|
@ -13,7 +13,7 @@ const vegaCustomClasses = plugin(function ({ addUtilities }) {
|
||||
overflowX: 'auto',
|
||||
padding: '1em',
|
||||
background: theme.colors.white.DEFAULT,
|
||||
color: theme.colors.black[25],
|
||||
color: theme.colors.black[70],
|
||||
border: `1px solid #${theme.colors.black[40]}`,
|
||||
},
|
||||
'.dark .syntax-highlighter-wrapper .hljs': {
|
||||
|
Loading…
Reference in New Issue
Block a user