This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate
ZoomButtons-test
to react-testing-library (#10104)
- Loading branch information
1 parent
cb67457
commit 2c30e6d
Showing
4 changed files
with
29 additions
and
80 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
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
76 changes: 17 additions & 59 deletions
76
test/components/views/location/__snapshots__/ZoomButtons-test.tsx.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,74 +1,32 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<ZoomButtons /> renders buttons 1`] = ` | ||
<ZoomButtons | ||
map={ | ||
MockMap { | ||
"_events": {}, | ||
"_eventsCount": 0, | ||
"_maxListeners": undefined, | ||
"addControl": [MockFunction], | ||
"fitBounds": [MockFunction], | ||
"removeControl": [MockFunction], | ||
"setCenter": [MockFunction], | ||
"setStyle": [MockFunction], | ||
"zoomIn": [MockFunction], | ||
"zoomOut": [MockFunction], | ||
Symbol(kCapture): false, | ||
} | ||
} | ||
> | ||
<DocumentFragment> | ||
<div | ||
className="mx_ZoomButtons" | ||
class="mx_ZoomButtons" | ||
> | ||
<AccessibleButton | ||
className="mx_ZoomButtons_button" | ||
data-test-id="map-zoom-in-button" | ||
element="div" | ||
onClick={[Function]} | ||
<div | ||
class="mx_AccessibleButton mx_ZoomButtons_button" | ||
data-testid="map-zoom-in-button" | ||
role="button" | ||
tabIndex={0} | ||
tabindex="0" | ||
title="Zoom in" | ||
> | ||
<div | ||
className="mx_AccessibleButton mx_ZoomButtons_button" | ||
data-test-id="map-zoom-in-button" | ||
onClick={[Function]} | ||
onKeyDown={[Function]} | ||
onKeyUp={[Function]} | ||
role="button" | ||
tabIndex={0} | ||
title="Zoom in" | ||
> | ||
<div | ||
className="mx_ZoomButtons_icon" | ||
/> | ||
</div> | ||
</AccessibleButton> | ||
<AccessibleButton | ||
className="mx_ZoomButtons_button" | ||
data-test-id="map-zoom-out-button" | ||
element="div" | ||
onClick={[Function]} | ||
class="mx_ZoomButtons_icon" | ||
/> | ||
</div> | ||
<div | ||
class="mx_AccessibleButton mx_ZoomButtons_button" | ||
data-testid="map-zoom-out-button" | ||
role="button" | ||
tabIndex={0} | ||
tabindex="0" | ||
title="Zoom out" | ||
> | ||
<div | ||
className="mx_AccessibleButton mx_ZoomButtons_button" | ||
data-test-id="map-zoom-out-button" | ||
onClick={[Function]} | ||
onKeyDown={[Function]} | ||
onKeyUp={[Function]} | ||
role="button" | ||
tabIndex={0} | ||
title="Zoom out" | ||
> | ||
<div | ||
className="mx_ZoomButtons_icon" | ||
/> | ||
</div> | ||
</AccessibleButton> | ||
class="mx_ZoomButtons_icon" | ||
/> | ||
</div> | ||
</div> | ||
</ZoomButtons> | ||
</DocumentFragment> | ||
`; |