-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move logic for Handler search form to our central redux state, and ad…
…d a custom hook (useHandlerSearchConfigs) to interface with the logic. This commit also stores generator and TSDF epa ID in url search parameter for draft manifests
- Loading branch information
1 parent
d6541da
commit aba3cef
Showing
21 changed files
with
326 additions
and
105 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
client/src/components/Manifest/Generator/GeneratorSection.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import '@testing-library/jest-dom'; | ||
import { cleanup, renderWithProviders, screen } from 'test-utils'; | ||
import { createMockHandler } from 'test-utils/fixtures'; | ||
import { afterEach, describe, expect, test } from 'vitest'; | ||
import { GeneratorSection } from './GeneratorSection'; | ||
|
||
afterEach(() => cleanup()); | ||
|
||
const TestComponent = () => { | ||
return <GeneratorSection setupSign={() => undefined} signAble={true} />; | ||
}; | ||
|
||
describe('GeneratorSection', () => { | ||
test('renders', () => { | ||
renderWithProviders(<TestComponent />, { | ||
useFormProps: { | ||
values: { | ||
status: 'NotAssigned', | ||
generator: createMockHandler({ epaSiteId: 'VATEST123' }), | ||
}, | ||
}, | ||
}); | ||
expect(screen.getByText(/vatest123/i)).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { Handler, handlerSchema, Signer } from 'components/Manifest/manifestSchema'; | ||
import { AddHandler } from './AddHandler'; | ||
import { HandlerSearchForm } from './Search/HandlerSearchForm'; | ||
import { HandlerSearchModal } from './Search/HandlerSearchModal'; | ||
|
||
export { HandlerSearchForm, AddHandler, handlerSchema }; | ||
export { HandlerSearchForm, HandlerSearchModal, handlerSchema }; | ||
export type { Handler, Signer }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.