forked from elastic/eui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from cjcenizal/tooltip-accessibility
Improve EuiToolTip accessibility, remove ability to display it on click
- Loading branch information
Showing
7 changed files
with
107 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiPortal is rendered 1`] = ` | ||
<div> | ||
Content | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import { render } from 'enzyme'; | ||
import ReactDOM from 'react-dom'; | ||
import { requiredProps } from '../../test'; | ||
import { EuiPortal } from './portal'; | ||
|
||
// TODO: Temporary hack which we can remove once react-test-renderer supports portals. | ||
// More info at https://github.com/facebook/react/issues/11565. | ||
ReactDOM.createPortal = node => node; | ||
|
||
describe('EuiPortal', () => { | ||
test('is rendered', () => { | ||
const component = render( | ||
<div> | ||
<EuiPortal> | ||
Content | ||
</EuiPortal> | ||
</div> | ||
); | ||
|
||
expect(component) | ||
.toMatchSnapshot(); | ||
}); | ||
}); |
11 changes: 6 additions & 5 deletions
11
src/components/tool_tip/__snapshots__/tool_tip.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiToolTip is rendered 1`] = ` | ||
<span | ||
aria-describedby="id" | ||
tabindex="0" | ||
> | ||
trigger | ||
<span> | ||
<button | ||
aria-describedby="id" | ||
> | ||
Trigger | ||
</button> | ||
</span> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters