Skip to content

Commit

Permalink
[EuiCodeEditor] Provide selection target for functional tests (#939)
Browse files Browse the repository at this point in the history
* Providing selection target for functional tests

With this change, functional tests of code consuming this component can select the code editor element.

* Adding release note
  • Loading branch information
ycombinator authored Jun 21, 2018
1 parent fae538f commit 8f8293b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Added `getPopoverScreenCoordinates` service function for positioining popover/tooltip content, updated `EuiToolTip` to use it ([#924](https://github.com/elastic/eui/pull/924))
- Allow `mode` prop in `EuiCodeEditor` to take custom mode object ([#935](https://github.com/elastic/eui/pull/935))
- `EuiCodeEditor` is now decorated with a `data-test-subj` selector (`codeEditorContainer`) ([#939](https://github.com/elastic/eui/pull/939))

## [`0.0.54`](https://github.com/elastic/eui/tree/v0.0.54)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ exports[`EuiCodeEditor behavior hint element should be tabable 1`] = `
exports[`EuiCodeEditor is rendered 1`] = `
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
>
<div
class="euiCodeEditorKeyboardHint"
Expand Down Expand Up @@ -192,6 +193,7 @@ exports[`EuiCodeEditor is rendered 1`] = `
exports[`EuiCodeEditor props isReadOnly renders alternate hint text 1`] = `
<div
class="euiCodeEditorWrapper"
data-test-subj="codeEditorContainer"
>
<div
class="euiCodeEditorKeyboardHint"
Expand Down
1 change: 1 addition & 0 deletions src/components/code_editor/code_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ export class EuiCodeEditor extends Component {
<div
className={classes}
style={{ width, height }}
data-test-subj="codeEditorContainer"
>
{prompt}

Expand Down

0 comments on commit 8f8293b

Please sign in to comment.