Skip to content

Commit 771fc59

Browse files
committed
Undo more changes
1 parent 2a0d721 commit 771fc59

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

example/.watchmanconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
}

0 commit comments

Comments
 (0)