Chore: Don't import from outside of grafana-ui (#81160)

don't import from outside of grafana-ui
This commit is contained in:
Ashley Harrison 2024-01-25 09:20:09 +00:00 committed by GitHub
parent 0bcc60f437
commit c741697333
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -1,13 +1,16 @@
import { render, screen, fireEvent } from '@testing-library/react';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React, { useState } from 'react';
import { select } from 'react-select-event';
import { SelectableValue } from '@grafana/data';
import { selectOptionInTest } from '../../../../../public/test/helpers/selectOptionInTest';
import { SelectBase } from './SelectBase';
// Used to select an option or options from a Select in unit tests
const selectOptionInTest = async (input: HTMLElement, optionOrOptions: string | RegExp | Array<string | RegExp>) =>
await waitFor(() => select(input, optionOrOptions, { container: document.body }));
describe('SelectBase', () => {
const onChangeHandler = jest.fn();
const options: Array<SelectableValue<number>> = [

View File

@ -1,7 +1,7 @@
import { FieldMatcherID, fieldMatchers, FieldType, MutableDataFrame } from '@grafana/data';
import { BarAlignment, GraphDrawStyle, GraphTransform, LineInterpolation, StackingMode } from '@grafana/schema';
import { preparePlotFrame } from '../../../../../public/app/core/components/GraphNG/utils';
import { preparePlotFrame } from '..';
import { getStackingGroups, preparePlotData2, timeFormatToTemplate } from './utils';