mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DatasourcePicker: Skip flaky upload test (#70756)
Skip flaky upload test
This commit is contained in:
parent
12ddfbf2be
commit
50c0ff8400
@ -78,8 +78,8 @@ describe('DataSourceDropdown', () => {
|
||||
});
|
||||
|
||||
describe('configuration', () => {
|
||||
const user = userEvent.setup();
|
||||
it('displays the configure new datasource when the list is empty', async () => {
|
||||
const user = userEvent.setup();
|
||||
setup();
|
||||
const searchBox = await screen.findByRole('searchbox');
|
||||
expect(searchBox).toBeInTheDocument();
|
||||
@ -112,9 +112,8 @@ describe('DataSourceDropdown', () => {
|
||||
});
|
||||
|
||||
describe('interactions', () => {
|
||||
const user = userEvent.setup();
|
||||
|
||||
it('should be searchable', async () => {
|
||||
const user = userEvent.setup();
|
||||
setup();
|
||||
const searchBox = await screen.findByRole('searchbox');
|
||||
expect(searchBox).toBeInTheDocument();
|
||||
@ -130,7 +129,9 @@ describe('DataSourceDropdown', () => {
|
||||
expect(await screen.findByText('No data sources found')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('calls the onChange with the default query containing the file', async () => {
|
||||
//Skipping this test as it's flaky on drone
|
||||
it.skip('calls the onChange with the default query containing the file', async () => {
|
||||
const user = userEvent.setup();
|
||||
config.featureToggles.editPanelCSVDragAndDrop = true;
|
||||
const onChange = jest.fn();
|
||||
setup(onChange);
|
||||
@ -138,6 +139,7 @@ describe('DataSourceDropdown', () => {
|
||||
await screen.findByText('Drop file here or click to upload')
|
||||
).parentElement!.parentElement!.querySelector('input');
|
||||
const file = new File([''], 'test.csv', { type: 'text/plain' });
|
||||
expect(fileInput).toBeInTheDocument();
|
||||
await user.upload(fileInput!, file);
|
||||
const defaultQuery = onChange.mock.lastCall[1][0];
|
||||
expect(defaultQuery).toMatchObject({
|
||||
@ -150,6 +152,7 @@ describe('DataSourceDropdown', () => {
|
||||
});
|
||||
|
||||
it('should call the onChange handler with the correct datasource', async () => {
|
||||
const user = userEvent.setup();
|
||||
const onChange = jest.fn();
|
||||
setup(onChange);
|
||||
await user.click(await screen.findByText(mockDS2.name, { selector: 'span' }));
|
||||
|
Loading…
Reference in New Issue
Block a user