Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/ui/SearchPageTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,17 @@ describe('SearchPageNarrow', () => {
it('NavigationTabBar should be hidden when the search input is focused', async () => {
renderPage();

await act(async () => {
jest.advanceTimersByTime(0);
});

expect(screen.getByTestId('SearchPageNarrow')).toBeTruthy();

// Initially, there are two NavigationTabBars on screen: one from TopLevelNavigationTabBar and one from SearchPageNarrow.
let navigationTabBars = screen.getAllByTestId('NavigationTabBar');
expect(navigationTabBars).toHaveLength(2);

const searchAutocompleteInput = await screen.findByTestId('search-autocomplete-text-input');
const searchAutocompleteInput = screen.getByTestId('search-autocomplete-text-input');
expect(searchAutocompleteInput).toBeTruthy();

// When the search input is focused, the NavigationTabBar from SearchPageNarrow will unmount, and the one from TopLevelNavigationTabBar will be hidden.
Expand Down
Loading