diff --git a/apps/trading/components/footer/footer.spec.tsx b/apps/trading/components/footer/footer.spec.tsx index c1631f2f1..5963a39fc 100644 --- a/apps/trading/components/footer/footer.spec.tsx +++ b/apps/trading/components/footer/footer.spec.tsx @@ -1,26 +1,58 @@ import { fireEvent, render, screen } from '@testing-library/react'; -import { Footer } from './footer'; +import { Footer, NodeHealth } from './footer'; import { useEnvironment } from '@vegaprotocol/environment'; jest.mock('@vegaprotocol/environment'); describe('Footer', () => { - it('renders a button to open node switcher', () => { + it('can open node switcher by clicking the node url', () => { const mockOpenNodeSwitcher = jest.fn(); const node = 'n99.somenetwork.vega.xyz'; - const nodeUrl = `https://${node}`; // @ts-ignore mock env hook useEnvironment.mockImplementation(() => ({ VEGA_URL: `https://api.${node}/graphql`, + blockDifference: 0, setNodeSwitcherOpen: mockOpenNodeSwitcher, })); render(