-
-
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.
Merge branch 'main' into test/quarantine-import-wallet-account
- Loading branch information
Showing
41 changed files
with
2,722 additions
and
949 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
22 changes: 16 additions & 6 deletions
22
...rary/components/Avatars/Avatar/variants/AvatarIcon/__snapshots__/AvatarIcon.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 |
---|---|---|
@@ -1,20 +1,30 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AvatarIcon should render correctly 1`] = ` | ||
<AvatarBase | ||
size="32" | ||
<View | ||
style={ | ||
{ | ||
"alignItems": "center", | ||
"backgroundColor": "#ffffff", | ||
"borderRadius": 16, | ||
"height": 32, | ||
"justifyContent": "center", | ||
"overflow": "hidden", | ||
"width": 32, | ||
} | ||
} | ||
> | ||
<Icon | ||
color="Default" | ||
<SvgMock | ||
color="#141618" | ||
height={20} | ||
name="AddSquare" | ||
size="20" | ||
style={ | ||
{ | ||
"height": 20, | ||
"width": 20, | ||
} | ||
} | ||
width={20} | ||
/> | ||
</AvatarBase> | ||
</View> | ||
`; |
10 changes: 4 additions & 6 deletions
10
app/component-library/components/Buttons/Button/variants/ButtonLink/ButtonLink.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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
// Third party dependencies. | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { render, screen } from '@testing-library/react-native'; | ||
|
||
// Internal dependencies. | ||
import ButtonLink from './ButtonLink'; | ||
|
||
describe('Link', () => { | ||
describe('ButtonLink', () => { | ||
it('should render correctly', () => { | ||
const wrapper = shallow( | ||
<ButtonLink onPress={jest.fn} label={`I'm a Link!`} />, | ||
); | ||
expect(wrapper).toMatchSnapshot(); | ||
render(<ButtonLink onPress={jest.fn()} label="I'm a Link!" />); | ||
expect(screen.toJSON()).toMatchSnapshot(); | ||
}); | ||
}); |
46 changes: 29 additions & 17 deletions
46
...rary/components/Buttons/Button/variants/ButtonLink/__snapshots__/ButtonLink.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 |
---|---|---|
@@ -1,27 +1,39 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Link should render correctly 1`] = ` | ||
<Fragment> | ||
exports[`ButtonLink should render correctly 1`] = ` | ||
<Text | ||
accessibilityRole="link" | ||
accessible={true} | ||
onPress={[MockFunction]} | ||
onPressIn={[Function]} | ||
onPressOut={[Function]} | ||
style={ | ||
{ | ||
"backgroundColor": "transparent", | ||
"color": "#141618", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
suppressHighlighting={true} | ||
> | ||
<Text | ||
accessibilityRole="link" | ||
accessible={true} | ||
onPress={[Function]} | ||
onPressIn={[Function]} | ||
onPressOut={[Function]} | ||
accessibilityRole="text" | ||
style={ | ||
{ | ||
"backgroundColor": "transparent", | ||
"color": "#0376c9", | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
suppressHighlighting={true} | ||
> | ||
<Text | ||
color="Primary" | ||
style={false} | ||
variant="sBodyMD" | ||
> | ||
I'm a Link! | ||
</Text> | ||
I'm a Link! | ||
</Text> | ||
</Fragment> | ||
</Text> | ||
`; |
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
35 changes: 15 additions & 20 deletions
35
app/components/UI/AnimatedTransactionModal/__snapshots__/index.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 |
---|---|---|
@@ -1,28 +1,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`AnimatedTransactionModal should render correctly 1`] = ` | ||
<ForwardRef | ||
<View | ||
collapsable={false} | ||
onLayout={[Function]} | ||
style={ | ||
[ | ||
{ | ||
"backgroundColor": "#ffffff", | ||
"borderTopLeftRadius": 20, | ||
"borderTopRightRadius": 20, | ||
"minHeight": 200, | ||
"paddingBottom": 24, | ||
}, | ||
{ | ||
"transform": [ | ||
{ | ||
"translateY": 70, | ||
}, | ||
], | ||
}, | ||
{ | ||
"height": 470, | ||
}, | ||
] | ||
{ | ||
"backgroundColor": "white", | ||
"borderTopLeftRadius": 20, | ||
"borderTopRightRadius": 20, | ||
"height": 470, | ||
"minHeight": 200, | ||
"paddingBottom": 24, | ||
"transform": [ | ||
{ | ||
"translateY": 70, | ||
}, | ||
], | ||
} | ||
} | ||
/> | ||
`; |
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 |
---|---|---|
@@ -1,15 +1,23 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { render, screen } from '@testing-library/react-native'; | ||
import AnimatedTransactionModal from './'; | ||
import { View } from 'react-native'; | ||
import { ThemeContext } from '../../../util/theme'; | ||
|
||
const mockTheme = { | ||
colors: { background: { default: 'white' } }, | ||
themeAppearance: 'light', | ||
}; | ||
|
||
describe('AnimatedTransactionModal', () => { | ||
it('should render correctly', () => { | ||
const wrapper = shallow( | ||
<AnimatedTransactionModal> | ||
<View /> | ||
</AnimatedTransactionModal>, | ||
render( | ||
<ThemeContext.Provider value={mockTheme}> | ||
<AnimatedTransactionModal> | ||
<View /> | ||
</AnimatedTransactionModal> | ||
</ThemeContext.Provider>, | ||
); | ||
expect(wrapper).toMatchSnapshot(); | ||
expect(screen.toJSON()).toMatchSnapshot(); | ||
}); | ||
}); |
Oops, something went wrong.