Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reagan-meant committed Dec 13, 2024
1 parent c6d5626 commit 86d85ab
Showing 1 changed file with 0 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ describe('CompactPatientSearchComponent', () => {
it('renders a compact search bar', () => {
renderWithRouter(<CompactPatientSearchComponent isSearchPage={false} initialSearchTerm="" />);

render(
<BrowserRouter>
<Routes>
<Route path="/" element={<CompactPatientSearchComponent isSearchPage initialSearchTerm="" />} />
</Routes>
</BrowserRouter>,
);
expect(screen.getByPlaceholderText(/Search for a patient by name or identifier number/i)).toBeInTheDocument();
});

Expand All @@ -36,13 +29,6 @@ describe('CompactPatientSearchComponent', () => {

renderWithRouter(<CompactPatientSearchComponent isSearchPage={false} initialSearchTerm="" />);

render(
<BrowserRouter>
<Routes>
<Route path="/" element={<CompactPatientSearchComponent isSearchPage={false} initialSearchTerm="" />} />
</Routes>
</BrowserRouter>,
);
const searchbox = screen.getByPlaceholderText(/Search for a patient by name or identifier number/i);

await user.type(searchbox, 'John');
Expand All @@ -62,13 +48,6 @@ describe('CompactPatientSearchComponent', () => {

renderWithRouter(<CompactPatientSearchComponent isSearchPage={false} initialSearchTerm="" />);

render(
<BrowserRouter>
<Routes>
<Route path="/" element={<CompactPatientSearchComponent isSearchPage={false} initialSearchTerm="" />} />
</Routes>
</BrowserRouter>,
);
const searchResultsContainer = screen.getByTestId('floatingSearchResultsContainer');
expect(searchResultsContainer).toBeInTheDocument();
});
Expand All @@ -78,22 +57,6 @@ describe('CompactPatientSearchComponent', () => {

renderWithRouter(
<CompactPatientSearchComponent isSearchPage={false} initialSearchTerm="" shouldNavigateToPatientSearchPage />,
render(
<BrowserRouter>
<Routes>
<Route
path="/"
element={
<CompactPatientSearchComponent
isSearchPage={false}
initialSearchTerm=""
shouldNavigateToPatientSearchPage
/>
}
/>
</Routes>
</BrowserRouter>,
),
);

const searchbox = screen.getByRole('searchbox');
Expand Down

0 comments on commit 86d85ab

Please sign in to comment.