File tree 1 file changed +31
-0
lines changed
example/android/src/androidTest/java/com/microsoft/reacttestapp
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .microsoft .reacttestapp ;
2
+
3
+ import com .wix .detox .Detox ;
4
+ import com .wix .detox .config .DetoxConfig ;
5
+
6
+ import org .junit .Rule ;
7
+ import org .junit .Test ;
8
+ import org .junit .runner .RunWith ;
9
+
10
+ import androidx .test .ext .junit .runners .AndroidJUnit4 ;
11
+ import androidx .test .filters .LargeTest ;
12
+ import androidx .test .rule .ActivityTestRule ;
13
+
14
+ @ RunWith (AndroidJUnit4 .class )
15
+ @ LargeTest
16
+ public class DetoxTest {
17
+ @ Rule
18
+ // Replace 'MainActivity' with the value of android:name entry in
19
+ // <activity> in AndroidManifest.xml
20
+ public ActivityTestRule <com .microsoft .reacttestapp .MainActivity > mActivityRule = new ActivityTestRule <>(com .microsoft .reacttestapp .MainActivity .class , false , false );
21
+
22
+ @ Test
23
+ public void runDetoxTests () {
24
+ DetoxConfig detoxConfig = new DetoxConfig ();
25
+ detoxConfig .idlePolicyConfig .masterTimeoutSec = 90 ;
26
+ detoxConfig .idlePolicyConfig .idleResourceTimeoutSec = 60 ;
27
+ detoxConfig .rnContextLoadTimeoutSec = (com .microsoft .reacttestapp .BuildConfig .DEBUG ? 180 : 60 );
28
+
29
+ Detox .runTests (mActivityRule , detoxConfig );
30
+ }
31
+ }
You can’t perform that action at this time.
0 commit comments