Skip to content

Commit

Permalink
workflow_detail tests
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <[email protected]>
  • Loading branch information
saimedhi committed Sep 6, 2024
1 parent b34a878 commit bcbbcbf
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions public/pages/workflow_detail/workflow_detail.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand All @@ -46,16 +52,12 @@ const renderWithRouter = (
return <WorkflowDetail setActionMenu={jest.fn()} {...props} />;
}}
/>
<Redirect from="/" to={`/workflow/${workflowId}`} />
</Switch>
</Router>
</Provider>
),
});

const workflowId = '12345';
const workflowName = 'test_workflow';

describe('WorkflowDetail', () => {
Object.values(WORKFLOW_TYPE).forEach((type) => {
test(`renders the page with ${type} type`, () => {
Expand Down

0 comments on commit bcbbcbf

Please sign in to comment.