-
Notifications
You must be signed in to change notification settings - Fork 959
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(common): ui testing integration
- Loading branch information
Artur Yorsh
committed
Oct 30, 2018
1 parent
6b9825b
commit 7b45ad7
Showing
5 changed files
with
60 additions
and
67 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,20 @@ | ||
import React from 'react'; | ||
import * as UITest from 'react-native-testing-library'; | ||
import {Sample} from './sample.component'; | ||
|
||
it('Checks Sample component renders correctly', async () => { | ||
const component = UITest.render( | ||
<Sample/>, | ||
); | ||
const textComponent = component.getByName('Text'); | ||
expect(textComponent).not.toBeNull(); | ||
}); | ||
|
||
it('Checks Sample component passes correct text props', async () => { | ||
const text = 'Hello, World!'; | ||
const component = UITest.render( | ||
<Sample text={text}/>, | ||
); | ||
const textComponent = component.getByName('Text'); | ||
expect(textComponent.props.children).toEqual(text); | ||
}); |