From bcbbcbf68e83cffc0e90034554f77ac1721a081d Mon Sep 17 00:00:00 2001 From: saimedhi Date: Fri, 6 Sep 2024 12:34:28 -0700 Subject: [PATCH] workflow_detail tests Signed-off-by: saimedhi --- .../pages/workflow_detail/workflow_detail.test.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/public/pages/workflow_detail/workflow_detail.test.tsx b/public/pages/workflow_detail/workflow_detail.test.tsx index a023b678..070bbba0 100644 --- a/public/pages/workflow_detail/workflow_detail.test.tsx +++ b/public/pages/workflow_detail/workflow_detail.test.tsx @@ -28,7 +28,13 @@ jest.mock('../../services', () => { }; }); -const history = createMemoryHistory(); +const workflowId = '12345'; +const workflowName = 'test_workflow'; + +const history = createMemoryHistory({ + initialEntries: [`/workflow/${workflowId}`], +}); + window.ResizeObserver = resizeObserverMock; const renderWithRouter = ( @@ -46,16 +52,12 @@ const renderWithRouter = ( return ; }} /> - ), }); -const workflowId = '12345'; -const workflowName = 'test_workflow'; - describe('WorkflowDetail', () => { Object.values(WORKFLOW_TYPE).forEach((type) => { test(`renders the page with ${type} type`, () => {