Skip to content

Commit

Permalink
#40 Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
wongchito committed Nov 4, 2022
1 parent 7d9dcac commit f318652
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/param-selector-view/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import ParamSelectorView from './index';
import rootReducer from '../../redux';
import { createMockAppStore, createParamInLocalStorage } from '../../setupTests';
import { fireEvent, screen } from '@testing-library/react';
import { getParamRegistry } from '../../util/param-manager-utils';

const realStore = rootReducer.getState();
const mockStore = createMockAppStore({ ...realStore });

describe('ParamSelectorView', () => {
it('Can disable open button if no project is selected', () => {
createParamInLocalStorage('test-1');
createParamInLocalStorage('test-2');
const paramRegistry = getParamRegistry();
const mockStore = createMockAppStore({ ...realStore, app: { ...realStore.app, paramRegistry } });

render(<ParamSelectorView />, { store: mockStore, route: '/' });

Expand Down

0 comments on commit f318652

Please sign in to comment.