Skip to content

Commit

Permalink
fix: create test/helpers folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ckbedwell committed Nov 26, 2024
1 parent e616da3 commit b933e5c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/routing/InitialisedRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import { useCanWriteSM } from 'hooks/useDSPermission';
import { useLimits } from 'hooks/useLimits';
import { QueryParamMap, useNavigation } from 'hooks/useNavigation';
import { useQuery } from 'hooks/useQuery';
import { CheckList } from 'components/CheckList';
import { ChooseCheckGroup } from 'components/ChooseCheckGroup';
import { SceneRedirecter } from 'components/SceneRedirecter';
import { AlertingPage } from 'page/AlertingPage';
import { ConfigPageLayout } from 'page/ConfigPageLayout';
import { AccessTokensTab } from 'page/ConfigPageLayout/tabs/AccessTokensTab';
Expand All @@ -24,10 +27,6 @@ import { PluginPageNotFound } from 'page/NotFound/NotFound';
import { Probes } from 'page/Probes';
import { SceneHomepage } from 'page/SceneHomepage';

import { CheckList } from '../components/CheckList';
import { ChooseCheckGroup } from '../components/ChooseCheckGroup';
import { SceneRedirecter } from '../components/SceneRedirecter';

export const InitialisedRouter = () => {
const queryParams = useQuery();
const navigate = useNavigation();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { useLocation } from 'react-router-dom-v5-compat';

import { DataTestIds } from '../../dataTestIds';
import { DataTestIds } from '../dataTestIds';

/**
* TestRouteInfo component.
Expand Down
3 changes: 1 addition & 2 deletions src/test/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { render, type RenderOptions } from '@testing-library/react';
import userEventLib from '@testing-library/user-event';
import { createMemoryHistory, type MemoryHistory } from 'history';
import { SM_META } from 'test/fixtures/meta';
import { TestRouteInfo } from 'test/helpers/TestRouteInfo';

import { ProvisioningJsonData } from 'types';
import { MetaContextProvider } from 'contexts/MetaContext';
Expand All @@ -15,8 +16,6 @@ import { SMDatasourceProvider } from 'contexts/SMDatasourceContext';
import { getQueryClient } from 'data/queryClient';
import { FeatureFlagProvider } from 'components/FeatureFlagProvider';

import { TestRouteInfo } from './mocks/routing/TestRouteInfo';

export type ComponentWrapperProps = {
children: ReactNode;
history: MemoryHistory;
Expand Down

0 comments on commit b933e5c

Please sign in to comment.