|
@@ -1,23 +1,16 @@
|
|
|
|
+import {makeTestQueryClient} from 'sentry-test/queryClient';
|
|
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
|
|
import {render, screen, userEvent} from 'sentry-test/reactTestingLibrary';
|
|
|
|
|
|
import ConfigStore from 'sentry/stores/configStore';
|
|
import ConfigStore from 'sentry/stores/configStore';
|
|
import {Event, EventOrGroupType} from 'sentry/types/event';
|
|
import {Event, EventOrGroupType} from 'sentry/types/event';
|
|
import EventView, {EventData} from 'sentry/utils/discover/eventView';
|
|
import EventView, {EventData} from 'sentry/utils/discover/eventView';
|
|
-import {QueryClient, QueryClientProvider} from 'sentry/utils/queryClient';
|
|
|
|
|
|
+import {QueryClientProvider} from 'sentry/utils/queryClient';
|
|
import {useLocation} from 'sentry/utils/useLocation';
|
|
import {useLocation} from 'sentry/utils/useLocation';
|
|
|
|
|
|
import {QuickContextHoverWrapper} from './quickContextWrapper';
|
|
import {QuickContextHoverWrapper} from './quickContextWrapper';
|
|
import {defaultRow, mockedCommit, mockedUser1, mockedUser2} from './testUtils';
|
|
import {defaultRow, mockedCommit, mockedUser1, mockedUser2} from './testUtils';
|
|
import {ContextType} from './utils';
|
|
import {ContextType} from './utils';
|
|
|
|
|
|
-const queryClient = new QueryClient({
|
|
|
|
- defaultOptions: {
|
|
|
|
- queries: {
|
|
|
|
- retry: false,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-});
|
|
|
|
-
|
|
|
|
const renderQuickContextContent = (
|
|
const renderQuickContextContent = (
|
|
dataRow: EventData = defaultRow,
|
|
dataRow: EventData = defaultRow,
|
|
contextType: ContextType = ContextType.ISSUE,
|
|
contextType: ContextType = ContextType.ISSUE,
|
|
@@ -25,7 +18,7 @@ const renderQuickContextContent = (
|
|
) => {
|
|
) => {
|
|
const organization = TestStubs.Organization();
|
|
const organization = TestStubs.Organization();
|
|
render(
|
|
render(
|
|
- <QueryClientProvider client={queryClient}>
|
|
|
|
|
|
+ <QueryClientProvider client={makeTestQueryClient()}>
|
|
<QuickContextHoverWrapper
|
|
<QuickContextHoverWrapper
|
|
dataRow={dataRow}
|
|
dataRow={dataRow}
|
|
contextType={contextType}
|
|
contextType={contextType}
|
|
@@ -61,7 +54,6 @@ describe('Quick Context', function () {
|
|
});
|
|
});
|
|
|
|
|
|
afterEach(() => {
|
|
afterEach(() => {
|
|
- queryClient.clear();
|
|
|
|
MockApiClient.clearMockResponses();
|
|
MockApiClient.clearMockResponses();
|
|
jest.mocked(useLocation).mockReset();
|
|
jest.mocked(useLocation).mockReset();
|
|
});
|
|
});
|