Skip to content

Commit

Permalink
Adds test file for tnt connect page.
Browse files Browse the repository at this point in the history
  • Loading branch information
wjames111 committed Sep 5, 2024
1 parent 3328a39 commit ee2be78
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions pages/accountLists/[accountListId]/tools/import/tnt.page.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import { ThemeProvider } from '@mui/material/styles';
import { render } from '@testing-library/react';
import TestRouter from '__tests__/util/TestRouter';
import TestWrapper from '__tests__/util/TestWrapper';
import theme from 'src/theme';
import TntConnectPage from './tnt.page';

const accountListId = 'accountListId';
const router = {
query: { accountListId },
isReady: true,
};

const RenderGoogleImportPage = () => (
<TestWrapper>
<TestRouter router={router}>
<ThemeProvider theme={theme}>
<TntConnectPage />
</ThemeProvider>
</TestRouter>
</TestWrapper>
);
describe('render', () => {
it('google import page', async () => {
const { findAllByText } = render(<RenderGoogleImportPage />);
const title = await findAllByText('Import from TntConnect');
expect(title).toHaveLength(2);
});
});

0 comments on commit ee2be78

Please sign in to comment.