chore: fix too big margin in tooltips (#2438)
This commit is contained in:
parent
e3ff090915
commit
a830e4729f
@ -31,6 +31,19 @@ describe('markets table', { tags: '@smoke' }, () => {
|
|||||||
cy.getByTestId('taker-fee').should('contain.text', '%');
|
cy.getByTestId('taker-fee').should('contain.text', '%');
|
||||||
cy.getByTestId('market-volume').should('not.be.empty');
|
cy.getByTestId('market-volume').should('not.be.empty');
|
||||||
cy.getByTestId('market-name').should('not.be.empty');
|
cy.getByTestId('market-name').should('not.be.empty');
|
||||||
|
|
||||||
|
cy.getByTestId('trading-mode-col')
|
||||||
|
.contains('Monitoring auction - liquidity')
|
||||||
|
.eq(0)
|
||||||
|
.realHover();
|
||||||
|
cy.get('[data-testid="trading-mode-tooltip"] p').should('have.class', '');
|
||||||
|
cy.get(
|
||||||
|
'[data-testid="market-trading-mode"] [data-testid="item-value"]'
|
||||||
|
).realHover();
|
||||||
|
cy.get('[data-testid="trading-mode-tooltip"] p').should(
|
||||||
|
'have.class',
|
||||||
|
'mb-4'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('able to select market from dropdown', () => {
|
it('able to select market from dropdown', () => {
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
import type { ReactNode } from 'react';
|
||||||
|
import classNames from 'classnames';
|
||||||
|
import { useEnvironment } from '@vegaprotocol/environment';
|
||||||
import { t } from '@vegaprotocol/react-helpers';
|
import { t } from '@vegaprotocol/react-helpers';
|
||||||
import * as Schema from '@vegaprotocol/types';
|
import * as Schema from '@vegaprotocol/types';
|
||||||
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
import { ExternalLink } from '@vegaprotocol/ui-toolkit';
|
||||||
import { createDocsLinks } from '@vegaprotocol/react-helpers';
|
import { createDocsLinks } from '@vegaprotocol/react-helpers';
|
||||||
import { MarketDataGrid } from './market-data-grid';
|
import { MarketDataGrid } from './market-data-grid';
|
||||||
|
|
||||||
import type { ReactNode } from 'react';
|
|
||||||
import { useEnvironment } from '@vegaprotocol/environment';
|
|
||||||
|
|
||||||
type TradingModeTooltipProps = {
|
type TradingModeTooltipProps = {
|
||||||
tradingMode: Schema.MarketTradingMode | null;
|
tradingMode: Schema.MarketTradingMode | null;
|
||||||
trigger: Schema.AuctionTrigger | null;
|
trigger: Schema.AuctionTrigger | null;
|
||||||
@ -32,7 +32,7 @@ export const TradingModeTooltip = ({
|
|||||||
case Schema.MarketTradingMode.TRADING_MODE_OPENING_AUCTION: {
|
case Schema.MarketTradingMode.TRADING_MODE_OPENING_AUCTION: {
|
||||||
return (
|
return (
|
||||||
<section data-testid="trading-mode-tooltip">
|
<section data-testid="trading-mode-tooltip">
|
||||||
<p className="mb-4">
|
<p className={classNames({ 'mb-4': Boolean(compiledGrid) })}>
|
||||||
<span>
|
<span>
|
||||||
{t(
|
{t(
|
||||||
'This new market is in an opening auction to determine a fair mid-price before starting continuous trading.'
|
'This new market is in an opening auction to determine a fair mid-price before starting continuous trading.'
|
||||||
@ -55,7 +55,7 @@ export const TradingModeTooltip = ({
|
|||||||
case Schema.AuctionTrigger.AUCTION_TRIGGER_LIQUIDITY: {
|
case Schema.AuctionTrigger.AUCTION_TRIGGER_LIQUIDITY: {
|
||||||
return (
|
return (
|
||||||
<section data-testid="trading-mode-tooltip">
|
<section data-testid="trading-mode-tooltip">
|
||||||
<p className="mb-4">
|
<p className={classNames({ 'mb-4': Boolean(compiledGrid) })}>
|
||||||
<span>
|
<span>
|
||||||
{t(
|
{t(
|
||||||
'This market is in auction until it reaches sufficient liquidity.'
|
'This market is in auction until it reaches sufficient liquidity.'
|
||||||
@ -79,7 +79,7 @@ export const TradingModeTooltip = ({
|
|||||||
case Schema.AuctionTrigger.AUCTION_TRIGGER_PRICE: {
|
case Schema.AuctionTrigger.AUCTION_TRIGGER_PRICE: {
|
||||||
return (
|
return (
|
||||||
<section data-testid="trading-mode-tooltip">
|
<section data-testid="trading-mode-tooltip">
|
||||||
<p className="mb-4">
|
<p className={classNames({ 'mb-4': Boolean(compiledGrid) })}>
|
||||||
<span>
|
<span>
|
||||||
{t('This market is in auction due to high price volatility.')}
|
{t('This market is in auction due to high price volatility.')}
|
||||||
</span>{' '}
|
</span>{' '}
|
||||||
|
Loading…
Reference in New Issue
Block a user