Skip to content

Commit 87427fe

Browse files
committed
chore: fix unit tests
1 parent bae40c8 commit 87427fe

File tree

1 file changed

+84
-30
lines changed

1 file changed

+84
-30
lines changed

src/components/__tests__/__snapshots__/BottomNavigation.test.js.snap

+84-30
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ exports[`renders custom icon and label in non-shifting bottom navigation 1`] = `
99
Object {
1010
"flex": 1,
1111
},
12-
Object {
13-
"backgroundColor": "#000000",
14-
},
1512
undefined,
1613
]
1714
}
@@ -132,6 +129,33 @@ exports[`renders custom icon and label in non-shifting bottom navigation 1`] = `
132129
]
133130
}
134131
>
132+
<AnimatedComponent
133+
pointerEvents="none"
134+
style={
135+
Array [
136+
Object {
137+
"position": "absolute",
138+
},
139+
Object {
140+
"backgroundColor": "rgba(0, 0, 0, 0.12)",
141+
"borderRadius": 48,
142+
"height": 96,
143+
"left": -54.666666666666664,
144+
"opacity": 0.002,
145+
"top": -20,
146+
"transform": Array [
147+
Object {
148+
"translateX": 0,
149+
},
150+
Object {
151+
"scale": 0.001,
152+
},
153+
],
154+
"width": 96,
155+
},
156+
]
157+
}
158+
/>
135159
<TouchableWithoutFeedback
136160
key="key-0"
137161
onPress={[Function]}
@@ -599,9 +623,6 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
599623
Object {
600624
"flex": 1,
601625
},
602-
Object {
603-
"backgroundColor": "#000000",
604-
},
605626
undefined,
606627
]
607628
}
@@ -783,12 +804,15 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
783804
"backgroundColor": undefined,
784805
"borderRadius": 0,
785806
"height": 0,
786-
"left": 6,
807+
"left": -4,
787808
"opacity": 0,
788809
"top": 28,
789810
"transform": Array [
790811
Object {
791-
"scale": 0.002,
812+
"translateX": 10,
813+
},
814+
Object {
815+
"scale": 0.008,
792816
},
793817
],
794818
"width": 0,
@@ -805,17 +829,20 @@ exports[`renders custom icon and label in shifting bottom navigation 1`] = `
805829
},
806830
Object {
807831
"backgroundColor": "rgba(255, 255, 255, 0.12)",
808-
"borderRadius": 36,
809-
"height": 72,
810-
"left": -30,
811-
"opacity": 0,
812-
"top": -8,
832+
"borderRadius": 48,
833+
"height": 96,
834+
"left": -52,
835+
"opacity": 0.002,
836+
"top": -20,
813837
"transform": Array [
814838
Object {
815-
"scale": 0.002,
839+
"translateX": 10,
840+
},
841+
Object {
842+
"scale": 0.001,
816843
},
817844
],
818-
"width": 72,
845+
"width": 96,
819846
},
820847
]
821848
}
@@ -1374,9 +1401,6 @@ exports[`renders non-shifting bottom navigation 1`] = `
13741401
Object {
13751402
"flex": 1,
13761403
},
1377-
Object {
1378-
"backgroundColor": "#000000",
1379-
},
13801404
undefined,
13811405
]
13821406
}
@@ -1497,6 +1521,33 @@ exports[`renders non-shifting bottom navigation 1`] = `
14971521
]
14981522
}
14991523
>
1524+
<AnimatedComponent
1525+
pointerEvents="none"
1526+
style={
1527+
Array [
1528+
Object {
1529+
"position": "absolute",
1530+
},
1531+
Object {
1532+
"backgroundColor": "rgba(0, 0, 0, 0.12)",
1533+
"borderRadius": 48,
1534+
"height": 96,
1535+
"left": -54.666666666666664,
1536+
"opacity": 0.002,
1537+
"top": -20,
1538+
"transform": Array [
1539+
Object {
1540+
"translateX": 0,
1541+
},
1542+
Object {
1543+
"scale": 0.001,
1544+
},
1545+
],
1546+
"width": 96,
1547+
},
1548+
]
1549+
}
1550+
/>
15001551
<TouchableWithoutFeedback
15011552
key="key-0"
15021553
onPress={[Function]}
@@ -2072,9 +2123,6 @@ exports[`renders shifting bottom navigation 1`] = `
20722123
Object {
20732124
"flex": 1,
20742125
},
2075-
Object {
2076-
"backgroundColor": "#000000",
2077-
},
20782126
undefined,
20792127
]
20802128
}
@@ -2256,12 +2304,15 @@ exports[`renders shifting bottom navigation 1`] = `
22562304
"backgroundColor": undefined,
22572305
"borderRadius": 0,
22582306
"height": 0,
2259-
"left": 6,
2307+
"left": -4,
22602308
"opacity": 0,
22612309
"top": 28,
22622310
"transform": Array [
22632311
Object {
2264-
"scale": 0.002,
2312+
"translateX": 10,
2313+
},
2314+
Object {
2315+
"scale": 0.008,
22652316
},
22662317
],
22672318
"width": 0,
@@ -2278,17 +2329,20 @@ exports[`renders shifting bottom navigation 1`] = `
22782329
},
22792330
Object {
22802331
"backgroundColor": "rgba(255, 255, 255, 0.12)",
2281-
"borderRadius": 36,
2282-
"height": 72,
2283-
"left": -30,
2284-
"opacity": 0,
2285-
"top": -8,
2332+
"borderRadius": 48,
2333+
"height": 96,
2334+
"left": -52,
2335+
"opacity": 0.002,
2336+
"top": -20,
22862337
"transform": Array [
22872338
Object {
2288-
"scale": 0.002,
2339+
"translateX": 10,
2340+
},
2341+
Object {
2342+
"scale": 0.001,
22892343
},
22902344
],
2291-
"width": 72,
2345+
"width": 96,
22922346
},
22932347
]
22942348
}

0 commit comments

Comments
 (0)