Skip to content

Commit

Permalink
add infinite scroll on target
Browse files Browse the repository at this point in the history
Signed-off-by: Augustin Husson <[email protected]>
  • Loading branch information
Nexucis committed Feb 7, 2022
1 parent a64b514 commit f0acd64
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 230 deletions.
18 changes: 1 addition & 17 deletions pkg/ui/react-app/src/pages/targets/ScrapePoolList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { mount, ReactWrapper } from 'enzyme';
import { act } from 'react-dom/test-utils';
import { UncontrolledAlert } from 'reactstrap';
import { sampleApiResponse } from './__testdata__/testdata';
import ScrapePoolList from './ScrapePoolList';
import ScrapePoolPanel from './ScrapePoolPanel';
import ScrapePoolList, { ScrapePoolPanel } from './ScrapePoolList';
import { Target } from './target';
import { FetchMock } from 'jest-fetch-mock/types';

describe('ScrapePoolList', () => {
const defaultProps = {
filter: { showHealthy: true, showUnhealthy: true },
pathPrefix: '..',
};

Expand Down Expand Up @@ -48,20 +46,6 @@ describe('ScrapePoolList', () => {
expect(panel).toHaveLength(1);
});
});

it('filters by health', async () => {
const props = {
...defaultProps,
filter: { showHealthy: false, showUnhealthy: true },
};
await act(async () => {
scrapePoolList = mount(<ScrapePoolList {...props} />);
});
scrapePoolList.update();
expect(mock).toHaveBeenCalledWith('../api/v1/targets?state=active', { cache: 'no-store', credentials: 'same-origin' });
const panels = scrapePoolList.find(ScrapePoolPanel);
expect(panels).toHaveLength(0);
});
});

describe('when an error is returned', () => {
Expand Down
129 changes: 0 additions & 129 deletions pkg/ui/react-app/src/pages/targets/ScrapePoolPanel.test.tsx

This file was deleted.

84 changes: 0 additions & 84 deletions pkg/ui/react-app/src/pages/targets/ScrapePoolPanel.tsx

This file was deleted.

0 comments on commit f0acd64

Please sign in to comment.