feat(trading): remove proposal warning from market header (#5385)
This commit is contained in:
parent
52ab0562b0
commit
4f7918f64e
@ -2,8 +2,6 @@ import { aliasGQLQuery } from '@vegaprotocol/cypress';
|
|||||||
import { proposalListQuery, marketUpdateProposal } from '@vegaprotocol/mock';
|
import { proposalListQuery, marketUpdateProposal } from '@vegaprotocol/mock';
|
||||||
import * as Schema from '@vegaprotocol/types';
|
import * as Schema from '@vegaprotocol/types';
|
||||||
|
|
||||||
const marketSummaryBlock = 'header-summary';
|
|
||||||
|
|
||||||
describe('Market proposal notification', { tags: '@smoke' }, () => {
|
describe('Market proposal notification', { tags: '@smoke' }, () => {
|
||||||
before(() => {
|
before(() => {
|
||||||
cy.setVegaWallet();
|
cy.setVegaWallet();
|
||||||
@ -25,12 +23,13 @@ describe('Market proposal notification', { tags: '@smoke' }, () => {
|
|||||||
});
|
});
|
||||||
cy.mockSubscription();
|
cy.mockSubscription();
|
||||||
cy.visit('/#/markets/market-0');
|
cy.visit('/#/markets/market-0');
|
||||||
|
cy.getByTestId('Info').click();
|
||||||
cy.wait('@MarketData');
|
cy.wait('@MarketData');
|
||||||
cy.getByTestId(marketSummaryBlock).should('be.visible');
|
cy.getByTestId('sidebar-content').should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display market proposal notification if proposal found', () => {
|
it('should display market proposal notification if proposal found', () => {
|
||||||
cy.getByTestId(marketSummaryBlock).within(() => {
|
cy.getByTestId('sidebar-content').within(() => {
|
||||||
cy.getByTestId('market-proposal-notification').should(
|
cy.getByTestId('market-proposal-notification').should(
|
||||||
'contain.text',
|
'contain.text',
|
||||||
'Changes have been proposed for this market'
|
'Changes have been proposed for this market'
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { useAssetDetailsDialogStore } from '@vegaprotocol/assets';
|
import { useAssetDetailsDialogStore } from '@vegaprotocol/assets';
|
||||||
import { DocsLinks, useEnvironment } from '@vegaprotocol/environment';
|
import { DocsLinks, useEnvironment } from '@vegaprotocol/environment';
|
||||||
import { ButtonLink, ExternalLink, Link } from '@vegaprotocol/ui-toolkit';
|
import { ButtonLink, ExternalLink, Link } from '@vegaprotocol/ui-toolkit';
|
||||||
import { MarketProposalNotification } from '@vegaprotocol/proposals';
|
|
||||||
import type { Market } from '@vegaprotocol/markets';
|
import type { Market } from '@vegaprotocol/markets';
|
||||||
import {
|
import {
|
||||||
addDecimalsFormatNumber,
|
addDecimalsFormatNumber,
|
||||||
@ -144,7 +143,6 @@ export const MarketHeaderStats = ({ market }: MarketHeaderStatsProps) => {
|
|||||||
/>
|
/>
|
||||||
</HeaderStat>
|
</HeaderStat>
|
||||||
)}
|
)}
|
||||||
<MarketProposalNotification marketId={market.id} />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,7 @@ export const MarketProposalNotification = ({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div className="border-l border-default pl-1 pr-1 pb-1 min-w-min whitespace-nowrap">
|
<div className="border-default min-w-min border-l pb-1 pl-1 pr-1">
|
||||||
<Notification
|
<Notification
|
||||||
intent={Intent.Warning}
|
intent={Intent.Warning}
|
||||||
message={message}
|
message={message}
|
||||||
|
@ -93,7 +93,7 @@ export const Notification = ({
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
'flex flex-col items-start overflow-hidden gap-0 mt-1',
|
'flex flex-col items-start overflow-hidden gap-0',
|
||||||
'text-vega-clight-50 dark:text-vega-cdark-50',
|
'text-vega-clight-50 dark:text-vega-cdark-50',
|
||||||
'font-alpha',
|
'font-alpha',
|
||||||
{ 'text-sm': size === 'small', 'text-base': size === 'medium' }
|
{ 'text-sm': size === 'small', 'text-base': size === 'medium' }
|
||||||
|
Loading…
Reference in New Issue
Block a user