File tree Expand file tree Collapse file tree 4 files changed +41
-1
lines changed
Expand file tree Collapse file tree 4 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ export default class App extends Component<{}> {
4040
4141 render ( ) {
4242 return (
43- < View style = { styles . container } >
43+ < View testID = 'welcome' style = { styles . container } >
4444 < ScrollView contentContainerStyle = { styles . contentContainer } >
4545 < Text style = { styles . details } >
4646 Hello { "Instabug's" } awesome user! The purpose of this application is to show you the different
Original file line number Diff line number Diff line change 1+ {
2+ "setupFilesAfterEnv" : [" ./init.js" ],
3+ "testEnvironment" : " node" ,
4+ "reporters" : [" detox/runners/jest/streamlineReporter" ],
5+ "verbose" : true
6+ }
Original file line number Diff line number Diff line change 1+ describe ( 'Example' , ( ) => {
2+ beforeEach ( async ( ) => {
3+ await device . reloadReactNative ( ) ;
4+ } ) ;
5+
6+ it ( 'should have welcome screen' , async ( ) => {
7+ await expect ( element ( by . id ( 'welcome' ) ) ) . toBeVisible ( ) ;
8+ } ) ;
9+ } ) ;
Original file line number Diff line number Diff line change 1+ const detox = require ( 'detox' ) ;
2+ const config = require ( '../package.json' ) . detox ;
3+ const adapter = require ( 'detox/runners/jest/adapter' ) ;
4+ const specReporter = require ( 'detox/runners/jest/specReporter' ) ;
5+
6+ // Set the default timeout
7+ jest . setTimeout ( 120000 ) ;
8+ jasmine . getEnv ( ) . addReporter ( adapter ) ;
9+
10+ // This takes care of generating status logs on a per-spec basis. By default, jest only reports at file-level.
11+ // This is strictly optional.
12+ jasmine . getEnv ( ) . addReporter ( specReporter ) ;
13+
14+ beforeAll ( async ( ) => {
15+ await detox . init ( config ) ;
16+ } ) ;
17+
18+ beforeEach ( async ( ) => {
19+ await adapter . beforeEach ( ) ;
20+ } ) ;
21+
22+ afterAll ( async ( ) => {
23+ await adapter . afterAll ( ) ;
24+ await detox . cleanup ( ) ;
25+ } ) ;
You can’t perform that action at this time.
0 commit comments