mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
E2E: Adding selectors to improve interactions with panel edit options (#97802)
* added selector for older versions of selector menu. * added test-id to the portal container. * fixed import order.
This commit is contained in:
parent
5ed2a4c624
commit
299e16b61a
@ -881,6 +881,7 @@ export const versionedComponents = {
|
||||
Select: {
|
||||
menu: {
|
||||
'11.4.0': 'data-testid Select menu',
|
||||
[MIN_GRAFANA_VERSION]: 'Select options menu',
|
||||
},
|
||||
option: {
|
||||
'11.1.0': 'data-testid Select option',
|
||||
@ -1234,6 +1235,11 @@ export const versionedComponents = {
|
||||
'11.2.0': 'data-testid entity-not-found',
|
||||
},
|
||||
},
|
||||
Portal: {
|
||||
container: {
|
||||
'11.4.1': 'data-testid portal-container',
|
||||
},
|
||||
},
|
||||
} satisfies VersionedSelectorGroup;
|
||||
|
||||
export type VersionedComponents = typeof versionedComponents;
|
||||
|
@ -4,6 +4,7 @@ import * as React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
import { useStyles2, useTheme2 } from '../../themes';
|
||||
|
||||
@ -51,7 +52,13 @@ export function getPortalContainer() {
|
||||
/** @internal */
|
||||
export function PortalContainer() {
|
||||
const styles = useStyles2(getStyles);
|
||||
return <div id="grafana-portal-container" className={styles.grafanaPortalContainer} />;
|
||||
return (
|
||||
<div
|
||||
id="grafana-portal-container"
|
||||
data-testid={selectors.components.Portal.container}
|
||||
className={styles.grafanaPortalContainer}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const getStyles = (theme: GrafanaTheme2) => {
|
||||
|
Loading…
Reference in New Issue
Block a user