Compare commits

...
Author SHA1 Message Date
Madalina Raicu 835538067b fix(trading): replace All markets with Open markets 2023-08-01 12:01:45 +01:00
2 changed files with 7 additions and 7 deletions
@@ -3,7 +3,7 @@ import type { MarketsQuery } from '@vegaprotocol/markets';
import * as Schema from '@vegaprotocol/types'; import * as Schema from '@vegaprotocol/types';
const rowSelector = const rowSelector =
'[data-testid="tab-all-markets"] .ag-center-cols-container .ag-row'; '[data-testid="tab-open-markets"] .ag-center-cols-container .ag-row';
const colInstrumentCode = '[col-id="tradableInstrument.instrument.code"]'; const colInstrumentCode = '[col-id="tradableInstrument.instrument.code"]';
describe('markets all table', { tags: '@smoke' }, () => { describe('markets all table', { tags: '@smoke' }, () => {
@@ -34,7 +34,7 @@ describe('markets all table', { tags: '@smoke' }, () => {
'Settlement asset', 'Settlement asset',
'', '',
]; ];
cy.getByTestId('tab-all-markets').within(($headers) => { cy.getByTestId('tab-open-markets').within(($headers) => {
cy.wrap($headers) cy.wrap($headers)
.get('.ag-header-cell-text') .get('.ag-header-cell-text')
.each(($header, i) => { .each(($header, i) => {
@@ -44,7 +44,7 @@ describe('markets all table', { tags: '@smoke' }, () => {
}); });
it('markets tab should be rendered properly', () => { it('markets tab should be rendered properly', () => {
cy.get('[data-testid="All markets"]').should( cy.get('[data-testid="Open markets"]').should(
'have.attr', 'have.attr',
'data-state', 'data-state',
'active' 'active'
@@ -166,7 +166,7 @@ describe('markets all table', { tags: '@smoke' }, () => {
'ETHBTC.QM21', 'ETHBTC.QM21',
'SOLUSD', 'SOLUSD',
]; ];
cy.get('[data-testid="All markets"]').click({ force: true }); cy.get('[data-testid="Open markets"]').click({ force: true });
cy.url().should('eq', Cypress.config('baseUrl') + '/#/markets/all'); cy.url().should('eq', Cypress.config('baseUrl') + '/#/markets/all');
cy.contains('AAPL.MF21').should('be.visible'); cy.contains('AAPL.MF21').should('be.visible');
cy.get('.ag-header-cell-label').contains('Market').click(); // sort by market name cy.get('.ag-header-cell-label').contains('Market').click(); // sort by market name
@@ -191,7 +191,7 @@ describe('markets all table', { tags: '@smoke' }, () => {
}); });
}); });
describe('no all markets', { tags: '@smoke', testIsolation: true }, () => { describe('no open markets', { tags: '@smoke', testIsolation: true }, () => {
before(() => { before(() => {
cy.mockTradingPage(); cy.mockTradingPage();
const markets: MarketsQuery = {}; const markets: MarketsQuery = {};
@@ -204,6 +204,6 @@ describe('no all markets', { tags: '@smoke', testIsolation: true }, () => {
it.skip('can see no markets message', () => { it.skip('can see no markets message', () => {
// 6001-MARK-048 // 6001-MARK-048
cy.getByTestId('tab-all-markets').should('contain.text', 'No markets'); cy.getByTestId('tab-open-markets').should('contain.text', 'No markets');
}); });
}); });
@@ -18,7 +18,7 @@ export const MarketsPage = () => {
<div className="h-full pt-0.5 pb-3 px-1.5"> <div className="h-full pt-0.5 pb-3 px-1.5">
<div className="h-full my-1 border border-default rounded-sm"> <div className="h-full my-1 border border-default rounded-sm">
<Tabs storageKey="console-markets"> <Tabs storageKey="console-markets">
<Tab id="all-markets" name={t('All markets')}> <Tab id="open-markets" name={t('Open markets')}>
<Markets /> <Markets />
</Tab> </Tab>
<Tab id="proposed-markets" name={t('Proposed markets')}> <Tab id="proposed-markets" name={t('Proposed markets')}>