add selector for code editor (#33554)

This commit is contained in:
Erik Sundell
2021-04-30 13:07:34 -07:00
committed by GitHub
parent 759a0cd71b
commit cedac5f4d4
2 changed files with 6 additions and 1 deletions
@@ -192,4 +192,7 @@ export const Components = {
DataLinksContextMenu: {
singleLink: 'Data link',
},
CodeEditor: {
container: 'Code editor container',
},
};
@@ -1,4 +1,6 @@
import React from 'react';
import { selectors } from '@grafana/e2e-selectors';
import { withTheme } from '../../themes';
import { Themeable } from '../../types';
import { Monaco, MonacoEditor as MonacoEditorType, CodeEditorProps, MonacoOptions } from './types';
@@ -124,7 +126,7 @@ class UnthemedCodeEditor extends React.PureComponent<Props> {
}
return (
<div onBlur={this.onBlur}>
<div onBlur={this.onBlur} aria-label={selectors.components.CodeEditor.container}>
<MonacoEditor
width={width}
height={height}