Skip to content

Commit

Permalink
test: update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Aug 3, 2023
1 parent 47b16fd commit 4286fbf
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/test/__snapshots__/tooltip-attributes.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`tooltip attributes basic tooltip 1`] = `
Hello World!
<div
class="react-tooltip-arrow"
style="left: 5px; bottom: -4px;"
style="left: -1px; bottom: -4px;"
/>
</div>
</div>
Expand All @@ -39,7 +39,7 @@ exports[`tooltip attributes tooltip with place 1`] = `
Hello World!
<div
class="react-tooltip-arrow"
style="left: -4px; top: 5px;"
style="left: -4px; top: -1px;"
/>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions src/test/__snapshots__/tooltip-props.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`tooltip props basic tooltip 1`] = `
Hello World!
<div
class="react-tooltip-arrow"
style="left: 5px; bottom: -4px;"
style="left: -1px; bottom: -4px;"
/>
</div>
</div>
Expand All @@ -38,7 +38,7 @@ exports[`tooltip props clickable tooltip 1`] = `
</button>
<div
class="react-tooltip-arrow"
style="left: 5px; bottom: -4px;"
style="left: -1px; bottom: -4px;"
/>
</div>
</div>
Expand All @@ -59,7 +59,7 @@ exports[`tooltip props tooltip with custom position 1`] = `
Hello World!
<div
class="react-tooltip-arrow"
style="left: 5px; bottom: -4px;"
style="left: -1px; bottom: -4px;"
/>
</div>
</div>
Expand Down Expand Up @@ -90,7 +90,7 @@ exports[`tooltip props tooltip with delay show 1`] = `
Hello World!
<div
class="react-tooltip-arrow"
style="left: 5px; bottom: -4px;"
style="left: -1px; bottom: -4px;"
/>
</div>
</div>
Expand All @@ -111,7 +111,7 @@ exports[`tooltip props tooltip with float 1`] = `
Hello World!
<div
class="react-tooltip-arrow"
style="left: 5px; bottom: -4px;"
style="left: -1px; bottom: -4px;"
/>
</div>
</div>
Expand All @@ -137,7 +137,7 @@ exports[`tooltip props tooltip with html 1`] = `
</span>
<div
class="react-tooltip-arrow"
style="left: 5px; bottom: -4px;"
style="left: -1px; bottom: -4px;"
/>
</div>
</div>
Expand All @@ -158,7 +158,7 @@ exports[`tooltip props tooltip with place 1`] = `
Hello World!
<div
class="react-tooltip-arrow"
style="left: -4px; top: 5px;"
style="left: -4px; top: -1px;"
/>
</div>
</div>
Expand Down
18 changes: 18 additions & 0 deletions src/test/__snapshots__/utils.spec.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`compute positions all reference elements 1`] = `
{
"place": "top",
"tooltipArrowStyles": {
"bottom": "-4px",
"left": "-1px",
"right": "",
"top": "",
},
"tooltipStyles": {
"border": undefined,
"left": "5px",
"top": "-10px",
},
}
`;
14 changes: 1 addition & 13 deletions src/test/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,7 @@ describe('compute positions', () => {
tooltipArrowReference: elementTooltipArrow,
})

expect(value).toEqual({
tooltipArrowStyles: {
bottom: '-4px',
left: '5px',
right: '',
top: '',
},
tooltipStyles: {
left: '5px',
top: '-10px',
},
place: 'top',
})
expect(value).toMatchSnapshot()
})
})

Expand Down

0 comments on commit 4286fbf

Please sign in to comment.