Compare commits

...

1 Commits

Author SHA1 Message Date
Dariusz Majcherczyk
2c95d0fd86
chore(trading): bring back governance tests 2024-03-08 22:08:53 +01:00
8 changed files with 25 additions and 19 deletions

View File

@ -21,6 +21,7 @@ import {
navigation, navigation,
closeDialog, closeDialog,
turnTelemetryOff, turnTelemetryOff,
setRiskAccepted,
} from '../../support/common.functions'; } from '../../support/common.functions';
import { import {
clickOnValidatorFromList, clickOnValidatorFromList,
@ -82,6 +83,7 @@ context(
beforeEach('visit governance tab', function () { beforeEach('visit governance tab', function () {
cy.clearLocalStorage(); cy.clearLocalStorage();
turnTelemetryOff(); turnTelemetryOff();
setRiskAccepted();
cy.reload(); cy.reload();
cy.mockChainId(); cy.mockChainId();
waitForSpinner(); waitForSpinner();
@ -92,7 +94,7 @@ context(
}); });
// Test can only pass if run before other proposal tests. // Test can only pass if run before other proposal tests.
it.skip('Should be able to see that no proposals exist', function () { it('Should be able to see that no proposals exist', function () {
// 3001-VOTE-003 // 3001-VOTE-003
cy.getByTestId(noOpenProposals) cy.getByTestId(noOpenProposals)
.should('be.visible') .should('be.visible')

View File

@ -3,6 +3,7 @@ import {
dissociateFromSecondWalletKey, dissociateFromSecondWalletKey,
navigateTo, navigateTo,
navigation, navigation,
setRiskAccepted,
turnTelemetryOff, turnTelemetryOff,
waitForSpinner, waitForSpinner,
} from '../../support/common.functions'; } from '../../support/common.functions';
@ -74,6 +75,7 @@ context(
beforeEach('visit governance tab', function () { beforeEach('visit governance tab', function () {
cy.clearLocalStorage(); cy.clearLocalStorage();
turnTelemetryOff(); turnTelemetryOff();
setRiskAccepted();
cy.mockChainId(); cy.mockChainId();
cy.reload(); cy.reload();
waitForSpinner(); waitForSpinner();
@ -215,7 +217,7 @@ context(
}); });
// 3003-PMAN-001 // 3003-PMAN-001
it.skip( it(
'Able to submit valid new market proposal', 'Able to submit valid new market proposal',
// @ts-ignore clash between jest and cypress // @ts-ignore clash between jest and cypress
{ tags: '@smoke' }, { tags: '@smoke' },
@ -299,7 +301,7 @@ context(
// Will fail if run after 'Able to submit update market proposal and vote for proposal' // Will fail if run after 'Able to submit update market proposal and vote for proposal'
// 3002-PROP-022 // 3002-PROP-022
it.skip('Unable to submit update market proposal without equity-like share in the market', function () { it('Unable to submit update market proposal without equity-like share in the market', function () {
switchVegaWalletPubKey(); switchVegaWalletPubKey();
stakingPageAssociateTokens('1'); stakingPageAssociateTokens('1');
goToMakeNewProposal(governanceProposalType.UPDATE_MARKET); goToMakeNewProposal(governanceProposalType.UPDATE_MARKET);

View File

@ -238,7 +238,7 @@ context(
}); });
// 1002-STKE-041 1002-STKE-053 // 1002-STKE-041 1002-STKE-053
it.skip( it(
'Able to remove part of a stake against a validator', 'Able to remove part of a stake against a validator',
// @ts-ignore clash between jest and cypress // @ts-ignore clash between jest and cypress
{ tags: '@smoke' }, { tags: '@smoke' },
@ -428,7 +428,7 @@ context(
validateValidatorListTotalStakeAndShare('0', '3,002.00', '50.02%'); validateValidatorListTotalStakeAndShare('0', '3,002.00', '50.02%');
}); });
it.skip('Associating wallet tokens - when some already staked - auto stakes tokens to staked validator', function () { it('Associating wallet tokens - when some already staked - auto stakes tokens to staked validator', function () {
// 1002-STKE-004 // 1002-STKE-004
stakingPageAssociateTokens('3'); stakingPageAssociateTokens('3');
verifyUnstakedBalance(3.0); verifyUnstakedBalance(3.0);
@ -442,7 +442,7 @@ context(
verifyStakedBalance(7.0); verifyStakedBalance(7.0);
}); });
it.skip('Associating vesting contract tokens - when some already staked - auto stakes tokens to staked validator', function () { it('Associating vesting contract tokens - when some already staked - auto stakes tokens to staked validator', function () {
// 1002-STKE-004 // 1002-STKE-004
stakingPageAssociateTokens('3', { type: 'contract' }); stakingPageAssociateTokens('3', { type: 'contract' });
verifyUnstakedBalance(3.0); verifyUnstakedBalance(3.0);
@ -456,7 +456,7 @@ context(
verifyStakedBalance(7.0); verifyStakedBalance(7.0);
}); });
it.skip('Associating vesting contract tokens - when wallet tokens already staked - auto stakes tokens to staked validator', function () { it('Associating vesting contract tokens - when wallet tokens already staked - auto stakes tokens to staked validator', function () {
// 1002-STKE-004 // 1002-STKE-004
stakingPageAssociateTokens('3', { type: 'wallet' }); stakingPageAssociateTokens('3', { type: 'wallet' });
verifyUnstakedBalance(3.0); verifyUnstakedBalance(3.0);
@ -470,7 +470,7 @@ context(
verifyStakedBalance(7.0); verifyStakedBalance(7.0);
}); });
it.skip('Associating tokens - with multiple validators already staked - auto stakes to staked validators - abiding by existing stake ratio', function () { it('Associating tokens - with multiple validators already staked - auto stakes to staked validators - abiding by existing stake ratio', function () {
// 1002-STKE-004 // 1002-STKE-004
stakingPageAssociateTokens('6'); stakingPageAssociateTokens('6');
verifyUnstakedBalance(6.0); verifyUnstakedBalance(6.0);

View File

@ -100,7 +100,7 @@ context(
}); });
// eslint-disable-next-line // eslint-disable-next-line
it.skip( it(
'Able to withdraw asset: -eth wallet connected -withdraw funds button', 'Able to withdraw asset: -eth wallet connected -withdraw funds button',
// @ts-ignore clash between jest and cypress // @ts-ignore clash between jest and cypress
{ tags: '@smoke' }, { tags: '@smoke' },
@ -284,7 +284,7 @@ context(
}); });
// Skipping test due to bug #3882 // Skipping test due to bug #3882
it.skip('Unable to withdraw asset on pub key view', function () { it('Unable to withdraw asset on pub key view', function () {
const vegaWalletPubKey = Cypress.env('vegaWalletPublicKey'); const vegaWalletPubKey = Cypress.env('vegaWalletPublicKey');
const expectedErrorTxt = `You are connected in a view only state for public key: ${vegaWalletPubKey}. In order to send transactions you must connect to a real wallet.`; const expectedErrorTxt = `You are connected in a view only state for public key: ${vegaWalletPubKey}. In order to send transactions you must connect to a real wallet.`;

View File

@ -27,7 +27,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
cy.getByTestId('app-announcement').should('not.exist'); cy.getByTestId('app-announcement').should('not.exist');
}); });
it.skip('should show open or enacted proposals without proposal summary', function () { it('should show open or enacted proposals without proposal summary', function () {
cy.get('body').then(($body) => { cy.get('body').then(($body) => {
if (!$body.find('[data-testid="proposals-list-item"]').length) { if (!$body.find('[data-testid="proposals-list-item"]').length) {
cy.createMarket(); cy.createMarket();
@ -189,7 +189,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
cy.viewport('iphone-xr'); cy.viewport('iphone-xr');
}); });
it.skip('should have burger button', () => { it('should have burger button', () => {
cy.getByTestId('button-menu-drawer').should('be.visible').click(); cy.getByTestId('button-menu-drawer').should('be.visible').click();
cy.getByTestId('menu-drawer').should('be.visible'); cy.getByTestId('menu-drawer').should('be.visible');
}); });

View File

@ -255,7 +255,7 @@ context(
}); });
// 3009-NTWU-001 3009-NTWU-002 3009-NTWU-006 3009-NTWU-009 // 3009-NTWU-001 3009-NTWU-002 3009-NTWU-006 3009-NTWU-009
it.skip('should display network upgrade banner with estimate', function () { it('should display network upgrade banner with estimate', function () {
mockNetworkUpgradeProposal(); mockNetworkUpgradeProposal();
cy.visit('/'); cy.visit('/');
cy.getByTestId('banners').within(() => { cy.getByTestId('banners').within(() => {

View File

@ -34,14 +34,14 @@ context('View functionality with public key', { tags: '@smoke' }, function () {
cy.connectPublicKey(vegaWalletPubKey); cy.connectPublicKey(vegaWalletPubKey);
}); });
it.skip('Able to connect public key via wallet and view assets in wallet', function () { it('Able to connect public key via wallet and view assets in wallet', function () {
verifyConnectedToPubKey(); verifyConnectedToPubKey();
cy.getByTestId('currency-title', { timeout: 10000 }) cy.getByTestId('currency-title', { timeout: 80000 })
.should('have.length.at.least', 2) .should('have.length.at.least', 2)
.and('contain.text', 'USDC (fake)'); .and('contain.text', 'USDC (fake)');
}); });
it.skip('Unable to submit proposal with public key', function () { it('Unable to submit proposal with public key', function () {
const expectedErrorTxt = `You are connected in a view only state for public key: ${vegaWalletPubKey}. In order to send transactions you must connect to a real wallet.`; const expectedErrorTxt = `You are connected in a view only state for public key: ${vegaWalletPubKey}. In order to send transactions you must connect to a real wallet.`;
goToMakeNewProposal(governanceProposalType.RAW); goToMakeNewProposal(governanceProposalType.RAW);

View File

@ -40,7 +40,7 @@ context(
}); });
// Skipping due to bug #3471 causing flaky failuress // Skipping due to bug #3471 causing flaky failuress
it.skip('should have option to view go to next and previous page', function () { it('should have option to view go to next and previous page', function () {
waitForBeginningOfEpoch(); waitForBeginningOfEpoch();
cy.getByTestId('page-info') cy.getByTestId('page-info')
.should('contain.text', 'Page ') .should('contain.text', 'Page ')
@ -63,7 +63,7 @@ context(
}); });
}); });
it('should have option to go to last and newest page', function () { it.only('should have option to go to last and newest page', function () {
cy.getByTestId('goto-last-page').click(); cy.getByTestId('goto-last-page').click();
cy.getByTestId('epoch-total-rewards-table') cy.getByTestId('epoch-total-rewards-table')
.last() .last()
@ -71,7 +71,9 @@ context(
.first() .first()
.should('have.text', 'EPOCH 1'); .should('have.text', 'EPOCH 1');
cy.getByTestId('goto-first-page').click(); cy.getByTestId('goto-first-page').click();
cy.get('h2').should('not.contain.text', 'EPOCH 1'); cy.getByTestId('epoch-total-rewards-table')
.get('h2')
.should('not.contain.text', 'EPOCH 1');
}); });
}); });
} }