test(trading): reverted node tests (#3992)
This commit is contained in:
parent
adfd2f41b6
commit
22af89e78c
@ -199,7 +199,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
|||||||
.first()
|
.first()
|
||||||
.should('contain.text', 'Operational')
|
.should('contain.text', 'Operational')
|
||||||
.next()
|
.next()
|
||||||
.should('contain.text', new URL(Cypress.env('VEGA_URL')).origin)
|
.should('contain.text', new URL(Cypress.env('VEGA_URL')).hostname)
|
||||||
.next()
|
.next()
|
||||||
.then(($el) => {
|
.then(($el) => {
|
||||||
const blockHeight = parseInt($el.text());
|
const blockHeight = parseInt($el.text());
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
const dialogContent = 'dialog-content';
|
const dialogContent = 'dialog-content';
|
||||||
const nodeHealth = 'node-health';
|
const nodeHealth = 'node-health';
|
||||||
|
const statusIncidentsLink = 'footer [data-testid=external-link]';
|
||||||
|
|
||||||
describe.skip('home', { tags: '@regression' }, () => {
|
describe('home', { tags: '@regression' }, () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.clearAllLocalStorage();
|
cy.clearAllLocalStorage();
|
||||||
cy.mockTradingPage();
|
cy.mockTradingPage();
|
||||||
@ -12,34 +13,17 @@ describe.skip('home', { tags: '@regression' }, () => {
|
|||||||
describe('footer', () => {
|
describe('footer', () => {
|
||||||
it('shows current block height', () => {
|
it('shows current block height', () => {
|
||||||
// 0006-NETW-004
|
// 0006-NETW-004
|
||||||
// 0006-NETW-005
|
|
||||||
// 0006-NETW-008
|
// 0006-NETW-008
|
||||||
// 0006-NETW-009
|
// 0006-NETW-009
|
||||||
// 0006-NETW-011
|
|
||||||
|
|
||||||
cy.intercept('POST', 'http://localhost:3008/graphql', (req) => {
|
|
||||||
req.on('response', (res) => {
|
|
||||||
res.setDelay(3001);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
cy.getByTestId(nodeHealth)
|
cy.getByTestId(nodeHealth)
|
||||||
.children()
|
.children()
|
||||||
.first()
|
.first()
|
||||||
.should('contain.text', 'Warning delay ( >3 sec)');
|
.should('contain.text', 'Operational', {
|
||||||
|
timeout: 10000,
|
||||||
cy.intercept('POST', 'http://localhost:3008/graphql', (req) => {
|
})
|
||||||
req.on('response', (res) => {
|
|
||||||
res.setDelay(1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
cy.getByTestId(nodeHealth)
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.should('contain.text', 'Operational', { timeout: 10000 })
|
|
||||||
.next()
|
.next()
|
||||||
.should('contain.text', new URL(Cypress.env('VEGA_URL')).origin)
|
.should('contain.text', new URL(Cypress.env('VEGA_URL')).hostname)
|
||||||
.next()
|
.next()
|
||||||
.should('contain.text', '100'); // all mocked queries have x-block-height header set to 100
|
.should('contain.text', '100'); // all mocked queries have x-block-height header set to 100
|
||||||
});
|
});
|
||||||
@ -82,12 +66,9 @@ describe.skip('home', { tags: '@regression' }, () => {
|
|||||||
.focus()
|
.focus()
|
||||||
.type(new URL(Cypress.env('VEGA_URL')).origin + '/graphql');
|
.type(new URL(Cypress.env('VEGA_URL')).origin + '/graphql');
|
||||||
cy.getByTestId('connect').click();
|
cy.getByTestId('connect').click();
|
||||||
cy.getByTestId(nodeHealth)
|
|
||||||
.children()
|
|
||||||
.first()
|
|
||||||
.should('contain.text', 'Operational');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Network switcher', () => {
|
describe('Network switcher', () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.mockTradingPage();
|
cy.mockTradingPage();
|
||||||
@ -97,10 +78,21 @@ describe.skip('home', { tags: '@regression' }, () => {
|
|||||||
|
|
||||||
// 0006-NETW-002
|
// 0006-NETW-002
|
||||||
// 0006-NETW-003
|
// 0006-NETW-003
|
||||||
it('switch to fairground network', () => {
|
// 0006-NETW-011
|
||||||
cy.getByTestId('network-switcher').click();
|
it('switch to fairground network and check status & incidents link', () => {
|
||||||
|
cy.getByTestId('navigation')
|
||||||
|
.find('[data-testid="network-switcher"]')
|
||||||
|
.click();
|
||||||
cy.getByTestId('network-item').contains('Fairground testnet').click();
|
cy.getByTestId('network-item').contains('Fairground testnet').click();
|
||||||
cy.get('[aria-haspopup="menu"]').should('contain.text', 'Fairground');
|
cy.get('[aria-haspopup="menu"]').should('contain.text', 'Fairground');
|
||||||
|
cy.url().should('include', 'fairground.wtf');
|
||||||
|
cy.contains('Continue').click();
|
||||||
|
cy.get(statusIncidentsLink)
|
||||||
|
.children('span')
|
||||||
|
.should('have.text', 'Mainnet status & incidents');
|
||||||
|
cy.get(statusIncidentsLink)
|
||||||
|
.should('have.attr', 'href')
|
||||||
|
.and('contain', 'https://blog.vega.xyz/tagged/vega-incident-reports');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user