mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
prometheus: enable new monaco-based query field (#41357)
* prometheus: enable new monaco-based query field * updated test * updated tests * fix e2e tests * updated comment
This commit is contained in:
@@ -7,6 +7,16 @@ import { PrometheusDatasource } from '../datasource';
|
||||
import { testIds as alertingTestIds } from './PromQueryEditorForAlerting';
|
||||
import { testIds as regularTestIds } from './PromQueryEditor';
|
||||
|
||||
// the monaco-based editor uses lazy-loading and that does not work
|
||||
// well with this test, and we do not need the monaco-related
|
||||
// functionality in this test anyway, so we mock it out.
|
||||
jest.mock('./monaco-query-field/MonacoQueryFieldWrapper', () => {
|
||||
const fakeQueryField = () => <div>prometheus query field</div>;
|
||||
return {
|
||||
MonacoQueryFieldWrapper: fakeQueryField,
|
||||
};
|
||||
});
|
||||
|
||||
function setup(app: CoreApp): RenderResult {
|
||||
const dataSource = ({
|
||||
createQuery: jest.fn((q) => q),
|
||||
|
||||
Reference in New Issue
Block a user