Skip to content

Commit 8d4e8b0

Browse files
test: update ss and add place to expected object
1 parent a19203b commit 8d4e8b0

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/test/__snapshots__/tooltip-attributes.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exports[`tooltip attributes basic tooltip 1`] = `
99
Lorem Ipsum
1010
</span>
1111
<div
12-
class="react-tooltip"
12+
class="react-tooltip react-tooltip__place-top"
1313
role="tooltip"
1414
>
1515
Hello World!
@@ -30,7 +30,7 @@ exports[`tooltip attributes tooltip with place 1`] = `
3030
Lorem Ipsum
3131
</span>
3232
<div
33-
class="react-tooltip"
33+
class="react-tooltip react-tooltip__place-right"
3434
role="tooltip"
3535
>
3636
Hello World!

src/test/__snapshots__/tooltip-props.spec.js.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exports[`tooltip props basic tooltip 1`] = `
88
Lorem Ipsum
99
</span>
1010
<div
11-
class="react-tooltip"
11+
class="react-tooltip react-tooltip__place-top"
1212
role="tooltip"
1313
>
1414
Hello World!
@@ -27,7 +27,7 @@ exports[`tooltip props clickable tooltip 1`] = `
2727
Lorem Ipsum
2828
</span>
2929
<div
30-
class="react-tooltip undefined"
30+
class="react-tooltip undefined react-tooltip__place-top"
3131
role="tooltip"
3232
style="left: 5px; top: -10px;"
3333
>
@@ -50,7 +50,7 @@ exports[`tooltip props tooltip with custom position 1`] = `
5050
Lorem Ipsum
5151
</span>
5252
<div
53-
class="react-tooltip"
53+
class="react-tooltip react-tooltip__place-top"
5454
role="tooltip"
5555
>
5656
Hello World!
@@ -79,7 +79,7 @@ exports[`tooltip props tooltip with delay show 1`] = `
7979
Lorem Ipsum
8080
</span>
8181
<div
82-
class="react-tooltip"
82+
class="react-tooltip react-tooltip__place-top"
8383
role="tooltip"
8484
>
8585
Hello World!
@@ -98,7 +98,7 @@ exports[`tooltip props tooltip with float 1`] = `
9898
Lorem Ipsum
9999
</span>
100100
<div
101-
class="react-tooltip"
101+
class="react-tooltip react-tooltip__place-top"
102102
role="tooltip"
103103
>
104104
Hello World!
@@ -117,7 +117,7 @@ exports[`tooltip props tooltip with html 1`] = `
117117
Lorem Ipsum
118118
</span>
119119
<div
120-
class="react-tooltip"
120+
class="react-tooltip react-tooltip__place-top"
121121
role="tooltip"
122122
>
123123
<span>
@@ -141,7 +141,7 @@ exports[`tooltip props tooltip with place 1`] = `
141141
Lorem Ipsum
142142
</span>
143143
<div
144-
class="react-tooltip"
144+
class="react-tooltip react-tooltip__place-right"
145145
role="tooltip"
146146
>
147147
Hello World!

src/test/utils.spec.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('compute positions', () => {
1212
tooltipArrowReference: null,
1313
})
1414

15-
expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {} })
15+
expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {}, place: 'top' })
1616
})
1717

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

26-
expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {} })
26+
expect(value).toEqual({ tooltipStyles: {}, tooltipArrowStyles: {}, place: 'top' })
2727
})
2828

2929
test('empty tooltip arrow reference element', async () => {
@@ -41,6 +41,7 @@ describe('compute positions', () => {
4141
left: '5px',
4242
top: '10px',
4343
},
44+
place: 'bottom',
4445
})
4546
})
4647

@@ -65,6 +66,7 @@ describe('compute positions', () => {
6566
left: '5px',
6667
top: '-10px',
6768
},
69+
place: 'top',
6870
})
6971
})
7072
})

0 commit comments

Comments
 (0)