From 4f7918f64ef35bbc014969f864a4e3d119b00b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C5=82ownia?= Date: Wed, 29 Nov 2023 18:05:53 +0100 Subject: [PATCH] feat(trading): remove proposal warning from market header (#5385) --- .../src/integration/market-proposal-notification.cy.ts | 7 +++---- apps/trading/client-pages/market/market-header-stats.tsx | 2 -- .../src/components/market-proposal-notification.tsx | 2 +- .../src/components/notification/notification.tsx | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/trading-e2e/src/integration/market-proposal-notification.cy.ts b/apps/trading-e2e/src/integration/market-proposal-notification.cy.ts index c78fc8786..d700a3ae1 100644 --- a/apps/trading-e2e/src/integration/market-proposal-notification.cy.ts +++ b/apps/trading-e2e/src/integration/market-proposal-notification.cy.ts @@ -2,8 +2,6 @@ import { aliasGQLQuery } from '@vegaprotocol/cypress'; import { proposalListQuery, marketUpdateProposal } from '@vegaprotocol/mock'; import * as Schema from '@vegaprotocol/types'; -const marketSummaryBlock = 'header-summary'; - describe('Market proposal notification', { tags: '@smoke' }, () => { before(() => { cy.setVegaWallet(); @@ -25,12 +23,13 @@ describe('Market proposal notification', { tags: '@smoke' }, () => { }); cy.mockSubscription(); cy.visit('/#/markets/market-0'); + cy.getByTestId('Info').click(); 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', () => { - cy.getByTestId(marketSummaryBlock).within(() => { + cy.getByTestId('sidebar-content').within(() => { cy.getByTestId('market-proposal-notification').should( 'contain.text', 'Changes have been proposed for this market' diff --git a/apps/trading/client-pages/market/market-header-stats.tsx b/apps/trading/client-pages/market/market-header-stats.tsx index 7906f6801..9f4569657 100644 --- a/apps/trading/client-pages/market/market-header-stats.tsx +++ b/apps/trading/client-pages/market/market-header-stats.tsx @@ -1,7 +1,6 @@ import { useAssetDetailsDialogStore } from '@vegaprotocol/assets'; import { DocsLinks, useEnvironment } from '@vegaprotocol/environment'; import { ButtonLink, ExternalLink, Link } from '@vegaprotocol/ui-toolkit'; -import { MarketProposalNotification } from '@vegaprotocol/proposals'; import type { Market } from '@vegaprotocol/markets'; import { addDecimalsFormatNumber, @@ -144,7 +143,6 @@ export const MarketHeaderStats = ({ market }: MarketHeaderStatsProps) => { /> )} - ); }; diff --git a/libs/proposals/src/components/market-proposal-notification.tsx b/libs/proposals/src/components/market-proposal-notification.tsx index 07f82804d..e5206edba 100644 --- a/libs/proposals/src/components/market-proposal-notification.tsx +++ b/libs/proposals/src/components/market-proposal-notification.tsx @@ -29,7 +29,7 @@ export const MarketProposalNotification = ({ ); return ( -
+