-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rohit Agrawal
committed
Jan 1, 2024
1 parent
17183eb
commit c156062
Showing
36 changed files
with
7,454 additions
and
27 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
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
118 changes: 118 additions & 0 deletions
118
src/components/atoms/collapse/__snapshots__/collapse.spec.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 |
---|---|---|
@@ -0,0 +1,118 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Atoms/Collapse passes the snapshot test when show is false 1`] = ` | ||
<View | ||
style={ | ||
{ | ||
"flex": 1, | ||
} | ||
} | ||
/> | ||
`; | ||
|
||
exports[`Atoms/Collapse passes the snapshot test when show is true 1`] = ` | ||
<View | ||
style={ | ||
{ | ||
"flex": 1, | ||
} | ||
} | ||
> | ||
<View | ||
animate={ | ||
{ | ||
"height": "auto", | ||
"opacity": 1, | ||
} | ||
} | ||
animatedStyle={ | ||
{ | ||
"value": { | ||
"height": 0, | ||
"opacity": 0, | ||
}, | ||
} | ||
} | ||
collapsable={false} | ||
exit={ | ||
{ | ||
"height": 0, | ||
"opacity": 0, | ||
} | ||
} | ||
exitTransition={ | ||
{ | ||
"dampingRatio": 1, | ||
"duration": 150, | ||
"easing": [Function], | ||
"type": "spring", | ||
} | ||
} | ||
from={ | ||
{ | ||
"height": 0, | ||
"opacity": 0, | ||
} | ||
} | ||
style={ | ||
{ | ||
"height": 0, | ||
"opacity": 0, | ||
} | ||
} | ||
transition={ | ||
{ | ||
"dampingRatio": 1, | ||
"duration": 150, | ||
"easing": [Function], | ||
"type": "spring", | ||
} | ||
} | ||
> | ||
<View | ||
animate={{}} | ||
animatedStyle={ | ||
{ | ||
"value": {}, | ||
} | ||
} | ||
collapsable={false} | ||
onLayout={[Function]} | ||
style={{}} | ||
> | ||
<Text | ||
accessibilityRole="text" | ||
accessible={true} | ||
allowFontScaling={true} | ||
animate={ | ||
{ | ||
"color": "#1A2138", | ||
} | ||
} | ||
animatedStyle={ | ||
{ | ||
"value": { | ||
"color": "#1A2138", | ||
}, | ||
} | ||
} | ||
collapsable={false} | ||
style={ | ||
{ | ||
"color": "#1A2138", | ||
"fontFamily": "Poppins-Regular", | ||
"fontSize": 16.099999999999998, | ||
"fontStyle": "normal", | ||
"fontWeight": "400", | ||
"includeFontPadding": false, | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
> | ||
This is a test | ||
</Text> | ||
</View> | ||
</View> | ||
</View> | ||
`; |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
import { render } from "@testing-library/react-native"; | ||
import Collapse from "./collapse"; | ||
import Text from "../text/text"; | ||
import { ThemeProvider } from "../../../theme/src/theme-context"; | ||
|
||
jest.useFakeTimers(); | ||
|
||
describe("Atoms/Collapse", () => { | ||
it("passes the snapshot test when show is true", () => { | ||
const tree = render( | ||
<ThemeProvider> | ||
<Collapse show={true}> | ||
<Text>This is a test</Text> | ||
</Collapse> | ||
</ThemeProvider> | ||
).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
|
||
it("passes the snapshot test when show is false", () => { | ||
const tree = render( | ||
<ThemeProvider> | ||
<Collapse show={false}> | ||
<Text>This is a test</Text> | ||
</Collapse> | ||
</ThemeProvider> | ||
).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
}); |
99 changes: 99 additions & 0 deletions
99
src/components/atoms/fade/__snapshots__/fade.spec.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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Atoms/Fade passes the snapshot test when show is false 1`] = ` | ||
<View | ||
style={ | ||
{ | ||
"flex": 1, | ||
} | ||
} | ||
/> | ||
`; | ||
|
||
exports[`Atoms/Fade passes the snapshot test when show is true 1`] = ` | ||
<View | ||
style={ | ||
{ | ||
"flex": 1, | ||
} | ||
} | ||
> | ||
<View | ||
animate={ | ||
{ | ||
"opacity": 1, | ||
} | ||
} | ||
animatedStyle={ | ||
{ | ||
"value": { | ||
"opacity": 0, | ||
}, | ||
} | ||
} | ||
collapsable={false} | ||
exit={ | ||
{ | ||
"opacity": 0, | ||
} | ||
} | ||
exitTransition={ | ||
{ | ||
"dampingRatio": 1, | ||
"duration": 100, | ||
"type": "spring", | ||
} | ||
} | ||
from={ | ||
{ | ||
"opacity": 0, | ||
} | ||
} | ||
style={ | ||
{ | ||
"opacity": 0, | ||
} | ||
} | ||
transition={ | ||
{ | ||
"dampingRatio": 1, | ||
"duration": 100, | ||
"type": "spring", | ||
} | ||
} | ||
> | ||
<Text | ||
accessibilityRole="text" | ||
accessible={true} | ||
allowFontScaling={true} | ||
animate={ | ||
{ | ||
"color": "#1A2138", | ||
} | ||
} | ||
animatedStyle={ | ||
{ | ||
"value": { | ||
"color": "#1A2138", | ||
}, | ||
} | ||
} | ||
collapsable={false} | ||
style={ | ||
{ | ||
"color": "#1A2138", | ||
"fontFamily": "Poppins-Regular", | ||
"fontSize": 16.099999999999998, | ||
"fontStyle": "normal", | ||
"fontWeight": "400", | ||
"includeFontPadding": false, | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
> | ||
This is a test | ||
</Text> | ||
</View> | ||
</View> | ||
`; |
Oops, something went wrong.