-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Showing
2 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
app/components/UI/Stake/components/StakingBalance/StakingCta/StakingCta.test.tsx
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,21 @@ | ||
import React from 'react'; | ||
import { screen, render } from '@testing-library/react-native'; | ||
import StakingCta from './StakingCta'; | ||
|
||
const mockNavigate = jest.fn(); | ||
|
||
jest.mock('@react-navigation/native', () => { | ||
const actualReactNavigation = jest.requireActual('@react-navigation/native'); | ||
return { | ||
...actualReactNavigation, | ||
useNavigation: () => ({ | ||
navigate: mockNavigate, | ||
}), | ||
}; | ||
}); | ||
describe('StakingCta', () => { | ||
it('render matches snapshot', () => { | ||
render(<StakingCta estimatedRewardRate="2.6%" />); | ||
expect(screen.toJSON()).toMatchSnapshot(); | ||
}); | ||
}); |
156 changes: 156 additions & 0 deletions
156
...ents/UI/Stake/components/StakingBalance/StakingCta/__snapshots__/StakingCta.test.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,156 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`StakingCta render matches snapshot 1`] = ` | ||
<View> | ||
<Text | ||
style={ | ||
[ | ||
{ | ||
"color": "#141618", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 30, | ||
"fontWeight": "400", | ||
"marginVertical": 2, | ||
}, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
[ | ||
{ | ||
"color": "#141618", | ||
"fontFamily": "EuclidCircularB-Bold", | ||
"fontSize": 18, | ||
"fontWeight": "600", | ||
"marginVertical": 3, | ||
}, | ||
undefined, | ||
undefined, | ||
{ | ||
"fontFamily": "Euclid Circular B", | ||
"fontSize": 16, | ||
"fontWeight": "700", | ||
"letterSpacing": 0, | ||
"lineHeight": 24, | ||
"marginVertical": 0, | ||
"paddingBottom": 16, | ||
"paddingTop": 14, | ||
}, | ||
], | ||
] | ||
} | ||
> | ||
Stake ETH and earn | ||
</Text> | ||
<View | ||
style={ | ||
{ | ||
"flexDirection": "row", | ||
"flexWrap": "wrap", | ||
} | ||
} | ||
> | ||
<Text | ||
accessibilityRole="text" | ||
style={ | ||
{ | ||
"color": "#141618", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
> | ||
Stake your ETH with MetaMask Pool and earn | ||
</Text> | ||
<Text | ||
accessibilityRole="text" | ||
style={ | ||
{ | ||
"color": "#1c8234", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
> | ||
2.6% | ||
</Text> | ||
<Text | ||
accessibilityRole="text" | ||
style={ | ||
{ | ||
"color": "#141618", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
> | ||
annually. | ||
</Text> | ||
<Text | ||
accessibilityRole="link" | ||
accessible={true} | ||
onPress={[Function]} | ||
onPressIn={[Function]} | ||
onPressOut={[Function]} | ||
style={ | ||
{ | ||
"backgroundColor": "transparent", | ||
"color": "#141618", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
suppressHighlighting={true} | ||
> | ||
<Text | ||
accessibilityRole="text" | ||
style={ | ||
{ | ||
"color": "#0376c9", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
> | ||
Learn more. | ||
</Text> | ||
</Text> | ||
</View> | ||
</View> | ||
`; |