2020-09-21 21:33:50 +08:00
|
|
|
import { render, screen } from '@testing-library/react';
|
2022-04-22 21:33:13 +08:00
|
|
|
import React from 'react';
|
|
|
|
|
|
2018-07-12 02:23:07 +08:00
|
|
|
import { UserPicker } from './UserPicker';
|
2017-12-21 17:30:03 +08:00
|
|
|
|
2020-01-21 17:08:07 +08:00
|
|
|
jest.mock('@grafana/runtime', () => ({
|
|
|
|
|
getBackendSrv: () => ({ get: jest.fn().mockResolvedValue([]) }),
|
2018-07-12 02:23:07 +08:00
|
|
|
}));
|
2017-12-21 17:30:03 +08:00
|
|
|
|
|
|
|
|
describe('UserPicker', () => {
|
2022-02-04 09:36:44 +08:00
|
|
|
it('renders correctly', async () => {
|
2020-09-21 21:33:50 +08:00
|
|
|
render(<UserPicker onSelected={() => {}} />);
|
2022-02-04 09:36:44 +08:00
|
|
|
|
|
|
|
|
expect(await screen.findByTestId('userPicker')).toBeInTheDocument();
|
2017-12-21 17:30:03 +08:00
|
|
|
});
|
|
|
|
|
});
|