Skip to content

Commit

Permalink
test: update ss and add place to expected object
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Mar 6, 2023
1 parent a19203b commit 8d4e8b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 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 @@ -9,7 +9,7 @@ exports[`tooltip attributes basic tooltip 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-top"
role="tooltip"
>
Hello World!
Expand All @@ -30,7 +30,7 @@ exports[`tooltip attributes tooltip with place 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-right"
role="tooltip"
>
Hello World!
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 @@ -8,7 +8,7 @@ exports[`tooltip props basic tooltip 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-top"
role="tooltip"
>
Hello World!
Expand All @@ -27,7 +27,7 @@ exports[`tooltip props clickable tooltip 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip undefined"
class="react-tooltip undefined react-tooltip__place-top"
role="tooltip"
style="left: 5px; top: -10px;"
>
Expand All @@ -50,7 +50,7 @@ exports[`tooltip props tooltip with custom position 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-top"
role="tooltip"
>
Hello World!
Expand Down Expand Up @@ -79,7 +79,7 @@ exports[`tooltip props tooltip with delay show 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-top"
role="tooltip"
>
Hello World!
Expand All @@ -98,7 +98,7 @@ exports[`tooltip props tooltip with float 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-top"
role="tooltip"
>
Hello World!
Expand All @@ -117,7 +117,7 @@ exports[`tooltip props tooltip with html 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-top"
role="tooltip"
>
<span>
Expand All @@ -141,7 +141,7 @@ exports[`tooltip props tooltip with place 1`] = `
Lorem Ipsum
</span>
<div
class="react-tooltip"
class="react-tooltip react-tooltip__place-right"
role="tooltip"
>
Hello World!
Expand Down
6 changes: 4 additions & 2 deletions src/test/utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('compute positions', () => {
tooltipArrowReference: null,
})

expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {} })
expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {}, place: 'top' })
})

test('empty tooltip reference element', async () => {
Expand All @@ -23,7 +23,7 @@ describe('compute positions', () => {
tooltipArrowReference: null,
})

expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {} })
expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {}, place: 'top' })
})

test('empty tooltip arrow reference element', async () => {
Expand All @@ -41,6 +41,7 @@ describe('compute positions', () => {
left: '5px',
top: '10px',
},
place: 'bottom',
})
})

Expand All @@ -65,6 +66,7 @@ describe('compute positions', () => {
left: '5px',
top: '-10px',
},
place: 'top',
})
})
})
Expand Down

0 comments on commit 8d4e8b0

Please sign in to comment.