fix: cypress

This commit is contained in:
asiaznik
2023-07-24 11:30:35 +02:00
parent a717b54117
commit 9f2bb74cf1
2 changed files with 12 additions and 5 deletions
@@ -23,6 +23,7 @@ import {
addDecimalsFormatNumber,
getDateTimeFormat,
} from '@vegaprotocol/utils';
import { FLAGS } from '@vegaprotocol/environment';
describe('Closed markets', { tags: '@smoke' }, () => {
const settlementDataProperty = 'settlement-data-property';
@@ -363,10 +364,13 @@ describe('Closed markets', { tags: '@smoke' }, () => {
.first()
.find('button svg')
.should('exist');
cy.get(rowSelector)
.find('[col-id="successorMarketID"]')
.first()
.should('have.text', ' - ');
if (FLAGS.SUCCESSOR_MARKETS) {
cy.get(rowSelector)
.find('[col-id="successorMarketID"]')
.first()
.should('have.text', ' - ');
}
});
// test market list for market in terminated state
@@ -1,3 +1,4 @@
import { FLAGS } from '@vegaprotocol/environment';
import { MarketTradingModeMapping } from '@vegaprotocol/types';
import { MarketState } from '@vegaprotocol/types';
@@ -68,7 +69,9 @@ describe('market info is displayed', { tags: '@smoke' }, () => {
validateMarketDataRow(0, 'Name', 'BTCUSD Monthly (30 Jun 2022)');
validateMarketDataRow(1, 'Market ID', 'market-0');
validateMarketDataRow(2, 'Parent Market ID', 'market-1');
if (FLAGS.SUCCESSOR_MARKETS) {
validateMarketDataRow(2, 'Parent Market ID', 'market-1');
}
validateMarketDataRow(
3,
'Trading Mode',