mirror of https://github.com/grafana/grafana
Explore: Fix loading error for empty queries (#18488)
* Explore: Fix loading error for empty queries * Explore: Render tests for QueryFieldpull/18259/head
parent
445f1dabcc
commit
b3d2cc3e2f
@ -0,0 +1,19 @@ |
||||
import React from 'react'; |
||||
import { shallow } from 'enzyme'; |
||||
|
||||
import { QueryField } from './QueryField'; |
||||
|
||||
describe('<QueryField />', () => { |
||||
it('renders with null initial value', () => { |
||||
const wrapper = shallow(<QueryField initialQuery={null} />); |
||||
expect(wrapper.find('div').exists()).toBeTruthy(); |
||||
}); |
||||
it('renders with empty initial value', () => { |
||||
const wrapper = shallow(<QueryField initialQuery="" />); |
||||
expect(wrapper.find('div').exists()).toBeTruthy(); |
||||
}); |
||||
it('renders with initial value', () => { |
||||
const wrapper = shallow(<QueryField initialQuery="my query" />); |
||||
expect(wrapper.find('div').exists()).toBeTruthy(); |
||||
}); |
||||
}); |
Loading…
Reference in new issue