Grafana UI: Fix plugin unit test errors (#69210)

* fix(grafana-ui): import from package to prevent import errors occurring in plugin tests

* style(grafana-ui): add e2e-selectors path to restricted imports rule
This commit is contained in:
Jack Westbrook 2023-05-30 15:34:13 +02:00 committed by GitHub
parent 2f0728ac67
commit 82f353c696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
"no-restricted-imports": [
"error",
{
"patterns": ["@grafana/runtime", "@grafana/data/*", "@grafana/ui", "@grafana/e2e"],
"patterns": ["@grafana/runtime", "@grafana/data/*", "@grafana/ui", "@grafana/e2e", "@grafana/e2e-selectors/*"],
"paths": [
{
"name": "react-i18next",

View File

@ -2,7 +2,7 @@ import { css, cx } from '@emotion/css';
import React, { ReactElement, useCallback, useRef, useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { selectors as e2eSelectors } from '@grafana/e2e-selectors/src';
import { selectors as e2eSelectors } from '@grafana/e2e-selectors';
import { useStyles2 } from '../../themes';
import { Icon } from '../Icon/Icon';