From 0fd6ff6eec25ffca66157444e047a628d0ef598e Mon Sep 17 00:00:00 2001 From: Matthew Russell Date: Sat, 25 Feb 2023 11:14:12 -0800 Subject: [PATCH] test: check block height in mocked e2e tests --- apps/trading-e2e/src/integration/home.cy.ts | 7 +++++++ apps/trading/components/footer/footer.tsx | 5 ++++- libs/cypress/src/lib/mock-gql.ts | 10 +++++++++- libs/environment/src/hooks/use-node-health.ts | 17 ++++++++++++----- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/apps/trading-e2e/src/integration/home.cy.ts b/apps/trading-e2e/src/integration/home.cy.ts index f9eeb4937..7307a4ae4 100644 --- a/apps/trading-e2e/src/integration/home.cy.ts +++ b/apps/trading-e2e/src/integration/home.cy.ts @@ -304,4 +304,11 @@ describe('home', { tags: '@regression' }, () => { }); }); }); + + describe('footer', () => { + it('shows current block height', () => { + cy.visit('/'); + cy.getByTestId('app-footer').contains('Operational').contains('100'); + }); + }); }); diff --git a/apps/trading/components/footer/footer.tsx b/apps/trading/components/footer/footer.tsx index 41dfa6d73..0d055ad97 100644 --- a/apps/trading/components/footer/footer.tsx +++ b/apps/trading/components/footer/footer.tsx @@ -13,7 +13,10 @@ export const Footer = () => { const { blockDiff, datanodeBlockHeight } = useNodeHealth(); return ( -