Skip to content

Commit

Permalink
Merge pull request #7 from saimedhi/tests2_copy
Browse files Browse the repository at this point in the history
workflow_detail tests
  • Loading branch information
saimedhi authored Sep 6, 2024
2 parents b8ed7d9 + bcbbcbf commit 7407a63
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 7407a63

Please sign in to comment.