Skip to content

Commit

Permalink
fix: fix test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb committed Oct 16, 2024
1 parent 5809ba9 commit 9cecfde
Show file tree
Hide file tree
Showing 3 changed files with 2,835 additions and 1 deletion.
14 changes: 14 additions & 0 deletions app/components/Views/NetworkSelector/NetworkSelector.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,20 @@ describe('Network Selector', () => {
expect(toJSON()).toMatchSnapshot();
});

it('renders correctly when network UI redesign is enabled', () => {
(isNetworkUiRedesignEnabled as jest.Mock).mockImplementation(() => true);
const { toJSON } = renderComponent(initialState);
expect(toJSON()).toMatchSnapshot();
});

it('shows popular networks when UI redesign is enabled', () => {
(isNetworkUiRedesignEnabled as jest.Mock).mockImplementation(() => true);
const { getByText } = renderComponent(initialState);

const popularNetworksTitle = getByText('Additional networks');
expect(popularNetworksTitle).toBeTruthy();
});

it('changes network when another network cell is pressed', async () => {
(isNetworkUiRedesignEnabled as jest.Mock).mockImplementation(() => false);
const { getByText } = renderComponent(initialState);
Expand Down
Loading

0 comments on commit 9cecfde

Please sign in to comment.