test(trading): markets selector ACs update (#4107)
This commit is contained in:
parent
a675576a52
commit
9c6dd9f254
@ -102,7 +102,6 @@ describe('liquidity table - trading', { tags: '@smoke' }, () => {
|
|||||||
cy.get(rowSelector).first().find(colCreatedAt).should('not.be.empty');
|
cy.get(rowSelector).first().find(colCreatedAt).should('not.be.empty');
|
||||||
cy.get(rowSelector).first().find(colUpdatedAt).should('not.be.empty');
|
cy.get(rowSelector).first().find(colUpdatedAt).should('not.be.empty');
|
||||||
});
|
});
|
||||||
// #4079
|
|
||||||
it.skip('liquidity status column should be sorted properly', () => {
|
it.skip('liquidity status column should be sorted properly', () => {
|
||||||
// 5002-LIQP-003
|
// 5002-LIQP-003
|
||||||
const liquidityColDefault = ['Active', 'Pending'];
|
const liquidityColDefault = ['Active', 'Pending'];
|
||||||
|
@ -68,6 +68,7 @@ describe('markets selector', { tags: '@smoke' }, () => {
|
|||||||
.each((item, i) => {
|
.each((item, i) => {
|
||||||
const market = data[i];
|
const market = data[i];
|
||||||
// 6001-MARK-021
|
// 6001-MARK-021
|
||||||
|
// 6001-MARK-022
|
||||||
expect(item.find('h3').text()).equals(market.code);
|
expect(item.find('h3').text()).equals(market.code);
|
||||||
expect(
|
expect(
|
||||||
item.find('[data-testid="market-selector-data-row"]').eq(0).text()
|
item.find('[data-testid="market-selector-data-row"]').eq(0).text()
|
||||||
@ -85,8 +86,19 @@ describe('markets selector', { tags: '@smoke' }, () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 6001-MARK-027
|
it('can see all markets link', () => {
|
||||||
|
// 6001-MARK-026
|
||||||
|
cy.getByTestId('market-selector').within(() => {
|
||||||
|
cy.getByTestId('all-markets-link')
|
||||||
|
.should('be.visible')
|
||||||
|
.and('have.text', 'All markets')
|
||||||
|
.and('have.attr', 'href')
|
||||||
|
.and('contain', '#/markets/all');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('can use the filter options', () => {
|
it('can use the filter options', () => {
|
||||||
|
// 6001-MARK-027
|
||||||
// product type
|
// product type
|
||||||
cy.getByTestId('product-Spot').click();
|
cy.getByTestId('product-Spot').click();
|
||||||
cy.getByTestId(list).contains('Spot markets coming soon.');
|
cy.getByTestId(list).contains('Spot markets coming soon.');
|
||||||
@ -104,4 +116,29 @@ describe('markets selector', { tags: '@smoke' }, () => {
|
|||||||
cy.getByTestId(searchInput).clear();
|
cy.getByTestId(searchInput).clear();
|
||||||
cy.getByTestId(list).find('a').should('have.length', 4);
|
cy.getByTestId(list).find('a').should('have.length', 4);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('can sort by by top gaining and top losing market', () => {
|
||||||
|
// 6001-MARK-030
|
||||||
|
// 6001-MARK-031
|
||||||
|
// 6001-MARK-032
|
||||||
|
// 6001-MARK-033
|
||||||
|
cy.getByTestId(' sort-trigger').click();
|
||||||
|
cy.getByTestId('sort-item-Gained')
|
||||||
|
.contains('Top gaining')
|
||||||
|
.should('be.visible');
|
||||||
|
cy.getByTestId('sort-item-Lost')
|
||||||
|
.contains('Top losing')
|
||||||
|
.should('be.visible');
|
||||||
|
cy.getByTestId('sort-item-New')
|
||||||
|
.contains('New markets')
|
||||||
|
.should('be.visible');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can filter by settlement asset', () => {
|
||||||
|
// 6001-MARK-028
|
||||||
|
cy.getByTestId('asset-trigger').click();
|
||||||
|
cy.getByTestId('asset-id-asset-3').contains('tBTC').click();
|
||||||
|
cy.getByTestId(list).find('a').should('have.length', 1);
|
||||||
|
cy.getByTestId(list).find('a').eq(0).contains('ETHBTC.QM21');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -129,6 +129,7 @@ describe('accounts', { tags: '@smoke' }, () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 7001-COLL-010
|
||||||
it('sorting by asset', () => {
|
it('sorting by asset', () => {
|
||||||
cy.getByTestId('Collateral').click();
|
cy.getByTestId('Collateral').click();
|
||||||
const marketsSortedDefault = ['tBTC', 'tEURO', 'tDAI', 'tBTC'];
|
const marketsSortedDefault = ['tBTC', 'tEURO', 'tDAI', 'tBTC'];
|
||||||
|
@ -151,7 +151,11 @@ export const MarketSelector = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className="px-4 py-2">
|
<div className="px-4 py-2">
|
||||||
<span className="inline-block border-b border-black dark:border-white">
|
<span className="inline-block border-b border-black dark:border-white">
|
||||||
<Link to={'/markets/all'} className="flex items-center gap-x-2">
|
<Link
|
||||||
|
to={'/markets/all'}
|
||||||
|
data-testid="all-markets-link"
|
||||||
|
className="flex items-center gap-x-2"
|
||||||
|
>
|
||||||
{t('All markets')}
|
{t('All markets')}
|
||||||
<VegaIcon name={VegaIconNames.ARROW_RIGHT} />
|
<VegaIcon name={VegaIconNames.ARROW_RIGHT} />
|
||||||
</Link>
|
</Link>
|
||||||
|
Loading…
Reference in New Issue
Block a user