-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nux: Refactor DotTip tests to @testing-library/react (#43768)
- Loading branch information
Showing
2 changed files
with
60 additions
and
42 deletions.
There are no files selected for viewing
57 changes: 32 additions & 25 deletions
57
packages/nux/src/components/dot-tip/test/__snapshots__/index.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,38 +1,45 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DotTip should render correctly 1`] = ` | ||
<ForwardRef(Popover) | ||
<div | ||
aria-label="Editor tips" | ||
className="nux-dot-tip" | ||
focusOnMount="container" | ||
onClick={[Function]} | ||
onFocusOutside={[Function]} | ||
position="middle right" | ||
class="components-popover nux-dot-tip" | ||
role="dialog" | ||
style="position: absolute; opacity: 0; transform: translateX(-2em) scale(0) translateZ(0); transform-origin: 0% 50% 0;" | ||
tabindex="-1" | ||
> | ||
<p> | ||
It looks like you’re writing a letter. Would you like help? | ||
</p> | ||
<p> | ||
<ForwardRef(Button) | ||
variant="link" | ||
<div | ||
class="components-popover__content" | ||
> | ||
<p> | ||
It looks like you’re writing a letter. Would you like help? | ||
</p> | ||
<p> | ||
<button | ||
class="components-button is-link" | ||
type="button" | ||
> | ||
Got it | ||
</button> | ||
</p> | ||
<button | ||
aria-label="Disable tips" | ||
class="components-button nux-dot-tip__disable has-icon" | ||
type="button" | ||
> | ||
Got it | ||
</ForwardRef(Button)> | ||
</p> | ||
<ForwardRef(Button) | ||
className="nux-dot-tip__disable" | ||
icon={ | ||
<SVG | ||
<svg | ||
aria-hidden="true" | ||
focusable="false" | ||
height="24" | ||
viewBox="0 0 24 24" | ||
width="24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<Path | ||
<path | ||
d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" | ||
/> | ||
</SVG> | ||
} | ||
label="Disable tips" | ||
/> | ||
</ForwardRef(Popover)> | ||
</svg> | ||
</button> | ||
</div> | ||
</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