Skip to content

Commit 3056ec8

Browse files
committed
remove configure store with redux from promsetting test file
1 parent 18d0655 commit 3056ec8

File tree

2 files changed

+3
-98
lines changed

2 files changed

+3
-98
lines changed

src/configuration/PromSettings.test.tsx

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { SelectableValue } from '@grafana/data';
22
import { render, screen } from '@testing-library/react';
3-
import { configureStore } from 'gcopypaste/app/store/configureStore';
43
import React, { SyntheticEvent } from 'react';
5-
import { Provider } from 'react-redux';
6-
7-
// removed and hacked in gcopypaste
8-
// import { configureStore } from '../../../../store/configureStore';
94

105
import { getValueFromEventItem, PromSettings } from './PromSettings';
116
import { createDefaultConfigOptions } from './mocks';
@@ -46,42 +41,24 @@ describe('PromSettings', () => {
4641
const options = defaultProps;
4742
options.url = '';
4843
options.jsonData.httpMethod = '';
49-
const store = configureStore();
5044

51-
render(
52-
<Provider store={store}>
53-
{/* @ts-ignore until we get the tests working */}
54-
<PromSettings onOptionsChange={() => {}} options={options} />
55-
</Provider>
56-
);
45+
render(<PromSettings onOptionsChange={() => {}} options={options} />);
5746
expect(screen.getByText('POST')).toBeInTheDocument();
5847
});
5948
it('should show POST httpMethod if POST httpMethod is configured', () => {
6049
const options = defaultProps;
6150
options.url = 'test_url';
6251
options.jsonData.httpMethod = 'POST';
63-
const store = configureStore();
6452

65-
render(
66-
<Provider store={store}>
67-
{/* @ts-ignore until we get the tests working */}
68-
<PromSettings onOptionsChange={() => {}} options={options} />
69-
</Provider>
70-
);
53+
render(<PromSettings onOptionsChange={() => {}} options={options} />);
7154
expect(screen.getByText('POST')).toBeInTheDocument();
7255
});
7356
it('should show GET httpMethod if GET httpMethod is configured', () => {
7457
const options = defaultProps;
7558
options.url = 'test_url';
7659
options.jsonData.httpMethod = 'GET';
77-
const store = configureStore();
7860

79-
render(
80-
<Provider store={store}>
81-
{/* @ts-ignore until we get the tests working */}
82-
<PromSettings onOptionsChange={() => {}} options={options} />
83-
</Provider>
84-
);
61+
render(<PromSettings onOptionsChange={() => {}} options={options} />);
8562
expect(screen.getByText('GET')).toBeInTheDocument();
8663
});
8764
});

src/gcopypaste/app/store/configureStore.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)