mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboards: Fix folder picker not showing correct results when typing too fast (#50303)
* Use callback form for loadOptions in folder picker * clean up * fix other tests * clarify comment
This commit is contained in:
@@ -19,7 +19,7 @@ jest.mock('@grafana/runtime', () => ({
|
||||
}));
|
||||
|
||||
setBackendSrv({
|
||||
get: jest.fn().mockResolvedValue({}),
|
||||
get: jest.fn().mockResolvedValue([]),
|
||||
} as any);
|
||||
|
||||
describe('DashboardSettings', () => {
|
||||
|
||||
@@ -5,11 +5,16 @@ import { selectOptionInTest } from 'test/helpers/selectOptionInTest';
|
||||
import { byRole } from 'testing-library-selector';
|
||||
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { setBackendSrv } from '@grafana/runtime';
|
||||
|
||||
import { DashboardModel } from '../../state';
|
||||
|
||||
import { GeneralSettingsUnconnected as GeneralSettings, Props } from './GeneralSettings';
|
||||
|
||||
setBackendSrv({
|
||||
get: jest.fn().mockResolvedValue([]),
|
||||
} as any);
|
||||
|
||||
const setupTestContext = (options: Partial<Props>) => {
|
||||
const defaults: Props = {
|
||||
dashboard: {
|
||||
|
||||
Reference in New Issue
Block a user