Skip to content

Commit 7407a63

Browse files
authored
Merge pull request #7 from saimedhi/tests2_copy
workflow_detail tests
2 parents b8ed7d9 + bcbbcbf commit 7407a63

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

public/pages/workflow_detail/workflow_detail.test.tsx

+7-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ jest.mock('../../services', () => {
2828
};
2929
});
3030

31-
const history = createMemoryHistory();
31+
const workflowId = '12345';
32+
const workflowName = 'test_workflow';
33+
34+
const history = createMemoryHistory({
35+
initialEntries: [`/workflow/${workflowId}`],
36+
});
37+
3238
window.ResizeObserver = resizeObserverMock;
3339

3440
const renderWithRouter = (
@@ -46,16 +52,12 @@ const renderWithRouter = (
4652
return <WorkflowDetail setActionMenu={jest.fn()} {...props} />;
4753
}}
4854
/>
49-
<Redirect from="/" to={`/workflow/${workflowId}`} />
5055
</Switch>
5156
</Router>
5257
</Provider>
5358
),
5459
});
5560

56-
const workflowId = '12345';
57-
const workflowName = 'test_workflow';
58-
5961
describe('WorkflowDetail', () => {
6062
Object.values(WORKFLOW_TYPE).forEach((type) => {
6163
test(`renders the page with ${type} type`, () => {

0 commit comments

Comments
 (0)