Skip to content

Commit

Permalink
Add TokenSelectButton label prop to test
Browse files Browse the repository at this point in the history
  • Loading branch information
wachunei committed Nov 16, 2020
1 parent 637452f commit f9ba8af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/components/UI/Swaps/components/TokenSelectButton.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@ import TokenSelectButton from './TokenSelectButton';
describe('TokenSelectButton component', () => {
it('should Render correctly', () => {
const dummyHandler = jest.fn();
const empty = shallow(<TokenSelectButton />);
const empty = shallow(<TokenSelectButton label="Select a token" />);
expect(empty).toMatchSnapshot();
const eth = shallow(<TokenSelectButton symbol="ETH" />);
const eth = shallow(<TokenSelectButton label="Select a token" symbol="ETH" />);
expect(eth).toMatchSnapshot();
const symbol = shallow(<TokenSelectButton symbol="cDAI" />);
const symbol = shallow(<TokenSelectButton label="Select a token" symbol="cDAI" />);
expect(symbol).toMatchSnapshot();
const icon = shallow(
<TokenSelectButton
label="Select a token"
symbol="DAI"
icon="https://cloudflare-ipfs.com/ipfs/QmNYVMm3iC7HEoxfvxsZbRoapdjDHj9EREFac4BPeVphSJ"
/>
);
expect(icon).toMatchSnapshot();
const onPress = shallow(
<TokenSelectButton
label="Select a token"
symbol="DAI"
icon="https://cloudflare-ipfs.com/ipfs/QmNYVMm3iC7HEoxfvxsZbRoapdjDHj9EREFac4BPeVphSJ"
onPress={dummyHandler}
Expand Down

0 comments on commit f9ba8af

Please sign in to comment.