expo-dev-client 0.8.4 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.detoxrc.js +66 -0
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/android/build.gradle +27 -9
- package/build/DevClient.d.ts +2 -0
- package/build/DevClient.d.ts.map +1 -0
- package/build/DevClient.js +1 -0
- package/build/DevClient.js.map +1 -1
- package/e2e/DevLauncher.e2e.ts +65 -46
- package/e2e/android/MainApplication.java +4 -4
- package/e2e/ios/AppDelegate.m +1 -0
- package/package.json +10 -9
- package/src/DevClient.ts +1 -0
- package/test-runner.config.js +66 -52
- package/.detoxrc.json +0 -41
package/.detoxrc.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
function getArtifactsPath() {
|
|
4
|
+
if (process.env.GITHUB_WORKSPACE) {
|
|
5
|
+
return path.join(process.env.GITHUB_WORKSPACE, 'packages', 'expo-dev-client', 'artifacts');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
return './artifacts';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const artifactsPath = getArtifactsPath();
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
'test-runner': 'jest',
|
|
15
|
+
runnerConfig: 'e2e/config.json',
|
|
16
|
+
skipLegacyWorkersInjection: true,
|
|
17
|
+
devices: {
|
|
18
|
+
emulator: {
|
|
19
|
+
type: 'android.emulator',
|
|
20
|
+
device: {
|
|
21
|
+
avdName: 'DevClientEmulator',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
simulator: {
|
|
25
|
+
type: 'ios.simulator',
|
|
26
|
+
device: {
|
|
27
|
+
type: 'iPhone 8',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
apps: {
|
|
32
|
+
'android.debug': {
|
|
33
|
+
type: 'android.apk',
|
|
34
|
+
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk',
|
|
35
|
+
build:
|
|
36
|
+
'cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ..',
|
|
37
|
+
},
|
|
38
|
+
'ios.debug': {
|
|
39
|
+
type: 'ios.app',
|
|
40
|
+
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/{{= it.name }}.app',
|
|
41
|
+
build:
|
|
42
|
+
'xcodebuild -workspace ios/{{= it.name }}.xcworkspace -scheme {{= it.name }} -configuration Debug -sdk iphonesimulator -arch x86_64 -derivedDataPath ios/build',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
configurations: {
|
|
46
|
+
android: {
|
|
47
|
+
device: 'emulator',
|
|
48
|
+
app: 'android.debug',
|
|
49
|
+
},
|
|
50
|
+
ios: {
|
|
51
|
+
device: 'simulator',
|
|
52
|
+
app: 'ios.debug',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
artifacts: {
|
|
56
|
+
rootDir: artifactsPath,
|
|
57
|
+
plugins: {
|
|
58
|
+
uiHierarchy: { enabled: true, keepOnlyFailedTestsArtifacts: true },
|
|
59
|
+
log: { enabled: true, keepOnlyFailedTestsArtifacts: true },
|
|
60
|
+
screenshot: {
|
|
61
|
+
enabled: true,
|
|
62
|
+
keepOnlyFailedTestsArtifacts: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,24 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 0.9.2 — 2022-04-25
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 0.9.1 — 2022-04-21
|
|
18
|
+
|
|
19
|
+
_This version does not introduce any user-facing changes._
|
|
20
|
+
|
|
21
|
+
## 0.9.0 — 2022-04-20
|
|
22
|
+
|
|
23
|
+
### 🐛 Bug fixes
|
|
24
|
+
|
|
25
|
+
- Removed the unused `jcenter()` maven dependencies. ([#16846](https://github.com/expo/expo/pull/16846) by [@kudo](https://github.com/kudo))
|
|
26
|
+
|
|
27
|
+
### ⚠️ Notices
|
|
28
|
+
|
|
29
|
+
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
|
|
30
|
+
|
|
13
31
|
## 0.8.4 — 2022-02-07
|
|
14
32
|
|
|
15
33
|
_This version does not introduce any user-facing changes._
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ next time you need to upgrade, install a new module, or otherwise change the nat
|
|
|
5
5
|
|
|
6
6
|
## Documentation
|
|
7
7
|
|
|
8
|
-
You can find the documentation under [https://docs.expo.
|
|
8
|
+
You can find the documentation under [https://docs.expo.dev/clients/introduction](https://docs.expo.dev/clients/introduction).
|
|
9
9
|
|
|
10
10
|
## Issues
|
|
11
11
|
|
package/android/build.gradle
CHANGED
|
@@ -3,27 +3,42 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
buildscript {
|
|
6
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
7
|
+
if (expoModulesCorePlugin.exists()) {
|
|
8
|
+
apply from: expoModulesCorePlugin
|
|
9
|
+
applyKotlinExpoModulesCorePlugin()
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
7
13
|
ext.safeExtGet = { prop, fallback ->
|
|
8
14
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
9
15
|
}
|
|
10
16
|
|
|
17
|
+
// Ensures backward compatibility
|
|
18
|
+
ext.getKotlinVersion = {
|
|
19
|
+
if (ext.has("kotlinVersion")) {
|
|
20
|
+
ext.kotlinVersion()
|
|
21
|
+
} else {
|
|
22
|
+
ext.safeExtGet("kotlinVersion", "1.6.10")
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
11
26
|
repositories {
|
|
12
27
|
mavenCentral()
|
|
13
28
|
}
|
|
14
29
|
|
|
15
30
|
dependencies {
|
|
16
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${
|
|
31
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
17
32
|
}
|
|
18
33
|
}
|
|
19
34
|
|
|
20
35
|
android {
|
|
21
|
-
compileSdkVersion safeExtGet(
|
|
36
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
22
37
|
defaultConfig {
|
|
23
38
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
24
|
-
targetSdkVersion safeExtGet(
|
|
39
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
25
40
|
versionCode 1
|
|
26
|
-
versionName "0.
|
|
41
|
+
versionName "0.9.2"
|
|
27
42
|
|
|
28
43
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
29
44
|
}
|
|
@@ -31,12 +46,12 @@ android {
|
|
|
31
46
|
abortOnError false
|
|
32
47
|
}
|
|
33
48
|
compileOptions {
|
|
34
|
-
sourceCompatibility JavaVersion.
|
|
35
|
-
targetCompatibility JavaVersion.
|
|
49
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
50
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
36
51
|
}
|
|
37
52
|
|
|
38
53
|
kotlinOptions {
|
|
39
|
-
jvmTarget =
|
|
54
|
+
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
40
55
|
}
|
|
41
56
|
|
|
42
57
|
buildTypes {
|
|
@@ -73,7 +88,6 @@ repositories {
|
|
|
73
88
|
url "$rootDir/../node_modules/jsc-android/dist"
|
|
74
89
|
}
|
|
75
90
|
google()
|
|
76
|
-
jcenter()
|
|
77
91
|
}
|
|
78
92
|
|
|
79
93
|
dependencies {
|
|
@@ -106,5 +120,9 @@ dependencies {
|
|
|
106
120
|
androidTestImplementation "androidx.appcompat:appcompat:1.1.0"
|
|
107
121
|
|
|
108
122
|
androidTestImplementation "com.google.truth:truth:1.1.2"
|
|
109
|
-
androidTestImplementation 'io.mockk:mockk-android:1.
|
|
123
|
+
androidTestImplementation 'io.mockk:mockk-android:1.12.3'
|
|
124
|
+
|
|
125
|
+
// Fixes "e: java.lang.AssertionError: No such enum entry LIBRARY_GROUP_PREFIX in org.jetbrains.kotlin.ir.types.impl.IrSimpleTypeImpl@b254b575"
|
|
126
|
+
// According to the https://stackoverflow.com/a/67736351
|
|
127
|
+
implementation 'androidx.annotation:annotation:1.2.0'
|
|
110
128
|
}
|
package/build/DevClient.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ import * as DevLauncher from 'expo-dev-launcher';
|
|
|
2
2
|
import * as DevMenu from 'expo-dev-menu';
|
|
3
3
|
export { DevMenu, DevLauncher };
|
|
4
4
|
export declare const registerErrorHandlers: typeof DevLauncher.registerErrorHandlers;
|
|
5
|
+
export declare const isDevelopmentBuild: typeof DevLauncher.isDevelopmentBuild;
|
|
6
|
+
//# sourceMappingURL=DevClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DevClient.d.ts","sourceRoot":"","sources":["../src/DevClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AAEhC,eAAO,MAAM,qBAAqB,0CAAoC,CAAC;AACvE,eAAO,MAAM,kBAAkB,uCAAiC,CAAC"}
|
package/build/DevClient.js
CHANGED
|
@@ -2,4 +2,5 @@ import * as DevLauncher from 'expo-dev-launcher';
|
|
|
2
2
|
import * as DevMenu from 'expo-dev-menu';
|
|
3
3
|
export { DevMenu, DevLauncher };
|
|
4
4
|
export const registerErrorHandlers = DevLauncher.registerErrorHandlers;
|
|
5
|
+
export const isDevelopmentBuild = DevLauncher.isDevelopmentBuild;
|
|
5
6
|
//# sourceMappingURL=DevClient.js.map
|
package/build/DevClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevClient.js","sourceRoot":"","sources":["../src/DevClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AAEhC,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC","sourcesContent":["import * as DevLauncher from 'expo-dev-launcher';\nimport * as DevMenu from 'expo-dev-menu';\n\nexport { DevMenu, DevLauncher };\n\nexport const registerErrorHandlers = DevLauncher.registerErrorHandlers;\n"]}
|
|
1
|
+
{"version":3,"file":"DevClient.js","sourceRoot":"","sources":["../src/DevClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;AAEhC,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC,qBAAqB,CAAC;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC,kBAAkB,CAAC","sourcesContent":["import * as DevLauncher from 'expo-dev-launcher';\nimport * as DevMenu from 'expo-dev-menu';\n\nexport { DevMenu, DevLauncher };\n\nexport const registerErrorHandlers = DevLauncher.registerErrorHandlers;\nexport const isDevelopmentBuild = DevLauncher.isDevelopmentBuild;\n"]}
|
package/e2e/DevLauncher.e2e.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { element, expect, waitFor, by, device } from 'detox';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const LocalAppTimeout =
|
|
3
|
+
const LauncherMainScreenTimeout = 100 * 1000;
|
|
4
|
+
const MenuTimeout = 100 * 1000;
|
|
5
|
+
const LocalAppTimeout = 160 * 1000;
|
|
6
6
|
|
|
7
7
|
const sleep = (duration: number) =>
|
|
8
8
|
new Promise<void>((resolve) => setTimeout(() => resolve(), duration));
|
|
9
9
|
|
|
10
|
-
async function
|
|
10
|
+
async function pressElementByString(buttonString: string) {
|
|
11
|
+
const button = element(by.text(buttonString));
|
|
12
|
+
expect(button).toBeVisible();
|
|
13
|
+
await tapButton(button);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async function pressMenuElementByString(buttonString: string, timeout: number = 0) {
|
|
11
17
|
let button = element(by.text(buttonString));
|
|
12
18
|
|
|
13
|
-
await waitFor(button).toBeVisible().withTimeout(
|
|
19
|
+
await waitFor(button).toBeVisible().withTimeout(timeout);
|
|
14
20
|
|
|
15
21
|
// When we open the dev-menu, we will see an animation.
|
|
16
22
|
// Unfortunately, if we try to click to button before the
|
|
@@ -21,7 +27,13 @@ async function pressMenuButton(buttonString: string) {
|
|
|
21
27
|
button = element(by.text(buttonString));
|
|
22
28
|
await waitFor(button).toBeVisible();
|
|
23
29
|
|
|
24
|
-
await button
|
|
30
|
+
await tapButton(button);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async function runWithoutSynchronization(block: () => Promise<void>) {
|
|
34
|
+
await device.disableSynchronization();
|
|
35
|
+
await block();
|
|
36
|
+
await device.enableSynchronization();
|
|
25
37
|
}
|
|
26
38
|
|
|
27
39
|
function getInvocationManager() {
|
|
@@ -30,9 +42,6 @@ function getInvocationManager() {
|
|
|
30
42
|
}
|
|
31
43
|
|
|
32
44
|
function getLocalIPAddress(): string {
|
|
33
|
-
if (device.getPlatform() === 'ios') {
|
|
34
|
-
return 'localhost';
|
|
35
|
-
}
|
|
36
45
|
return require('os')
|
|
37
46
|
.networkInterfaces()
|
|
38
47
|
.en0.find((elm: { family: string }) => elm.family === 'IPv4').address;
|
|
@@ -40,7 +49,7 @@ function getLocalIPAddress(): string {
|
|
|
40
49
|
|
|
41
50
|
async function openMenu(): Promise<void> {
|
|
42
51
|
if (device.getPlatform() === 'android') {
|
|
43
|
-
return getInvocationManager().execute({
|
|
52
|
+
return await getInvocationManager().execute({
|
|
44
53
|
target: {
|
|
45
54
|
type: 'Class',
|
|
46
55
|
value: 'com.testrunner.DevClientDetoxHelper',
|
|
@@ -52,48 +61,61 @@ async function openMenu(): Promise<void> {
|
|
|
52
61
|
return await device.shake();
|
|
53
62
|
}
|
|
54
63
|
|
|
64
|
+
async function waitForLauncherMainScreen() {
|
|
65
|
+
await waitFor(element(by.id('DevLauncherMainScreen')))
|
|
66
|
+
.toBeVisible()
|
|
67
|
+
.withTimeout(LauncherMainScreenTimeout);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function waitForAppMainScreen() {
|
|
71
|
+
await waitFor(element(by.id('LocalAppMainScreen')))
|
|
72
|
+
.toBeVisible()
|
|
73
|
+
.withTimeout(LocalAppTimeout);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async function ensureThatLauncherMainScreenIsVisible() {
|
|
77
|
+
if (device.getPlatform() === 'ios') {
|
|
78
|
+
await expect(element(by.id('DevLauncherMainScreen'))).toBeVisible();
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
await waitForLauncherMainScreen();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function tapButton(button: Detox.IndexableNativeElement) {
|
|
86
|
+
// We have to make 2 tap - it is a bug in React Native.
|
|
87
|
+
await button.multiTap(2);
|
|
88
|
+
}
|
|
89
|
+
|
|
55
90
|
describe('DevLauncher', () => {
|
|
56
91
|
beforeEach(async () => {
|
|
57
92
|
await device.launchApp({ newInstance: true });
|
|
58
93
|
});
|
|
59
94
|
|
|
60
95
|
it('should render main screen', async () => {
|
|
61
|
-
await
|
|
96
|
+
await ensureThatLauncherMainScreenIsVisible();
|
|
62
97
|
});
|
|
63
98
|
|
|
64
|
-
it('should be able to
|
|
65
|
-
await
|
|
99
|
+
it('should be able to go to the settings screen and come back to the main screen', async () => {
|
|
100
|
+
await ensureThatLauncherMainScreenIsVisible();
|
|
66
101
|
|
|
67
|
-
await
|
|
102
|
+
await pressElementByString('Settings');
|
|
103
|
+
await expect(element(by.id('DevLauncherSettingsScreen'))).toBeVisible();
|
|
68
104
|
|
|
69
|
-
await
|
|
70
|
-
|
|
71
|
-
.withTimeout(MenuTimeout);
|
|
105
|
+
await pressElementByString('Home');
|
|
106
|
+
await expect(element(by.id('DevLauncherMainScreen'))).toBeVisible();
|
|
72
107
|
});
|
|
73
108
|
|
|
74
|
-
it('should be able to load app from URL', async () => {
|
|
75
|
-
|
|
76
|
-
const loadButton = element(by.id('DevLauncherLoadAppButton'));
|
|
77
|
-
|
|
78
|
-
await expect(urlInput).toBeVisible();
|
|
79
|
-
await expect(loadButton).toBeVisible();
|
|
80
|
-
|
|
81
|
-
await urlInput.typeText(`http://${getLocalIPAddress()}:8081`);
|
|
82
|
-
if (device.getPlatform() === 'android') {
|
|
83
|
-
// close keyboard
|
|
84
|
-
await device.pressBack();
|
|
85
|
-
}
|
|
86
|
-
await loadButton.multiTap(2);
|
|
87
|
-
|
|
88
|
-
await waitFor(element(by.id('LocalAppMainScreen')))
|
|
89
|
-
.toBeVisible()
|
|
90
|
-
.withTimeout(LocalAppTimeout);
|
|
91
|
-
});
|
|
109
|
+
it('should be able to load app from URL and come back to the launcher screen', async () => {
|
|
110
|
+
await ensureThatLauncherMainScreenIsVisible();
|
|
92
111
|
|
|
93
|
-
|
|
112
|
+
const urlToggle = element(by.id('DevLauncherURLToggle'));
|
|
94
113
|
const urlInput = element(by.id('DevLauncherURLInput'));
|
|
95
114
|
const loadButton = element(by.id('DevLauncherLoadAppButton'));
|
|
96
115
|
|
|
116
|
+
await expect(urlToggle).toBeVisible();
|
|
117
|
+
urlToggle.tap();
|
|
118
|
+
|
|
97
119
|
await expect(urlInput).toBeVisible();
|
|
98
120
|
await expect(loadButton).toBeVisible();
|
|
99
121
|
|
|
@@ -102,18 +124,15 @@ describe('DevLauncher', () => {
|
|
|
102
124
|
// close keyboard
|
|
103
125
|
await device.pressBack();
|
|
104
126
|
}
|
|
105
|
-
await loadButton.multiTap(2);
|
|
106
127
|
|
|
107
|
-
await
|
|
108
|
-
|
|
109
|
-
|
|
128
|
+
await runWithoutSynchronization(async () => {
|
|
129
|
+
await tapButton(loadButton);
|
|
130
|
+
await waitForAppMainScreen();
|
|
131
|
+
await openMenu();
|
|
110
132
|
|
|
111
|
-
|
|
133
|
+
await pressMenuElementByString('Go home', MenuTimeout);
|
|
112
134
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
await waitFor(element(by.id('DevLauncherMainScreen')))
|
|
116
|
-
.toBeVisible()
|
|
117
|
-
.withTimeout(LauncherMainScreenTimeout);
|
|
135
|
+
await waitForLauncherMainScreen();
|
|
136
|
+
});
|
|
118
137
|
});
|
|
119
138
|
});
|
|
@@ -12,11 +12,11 @@ import com.facebook.react.ReactNativeHost;
|
|
|
12
12
|
import com.facebook.react.ReactPackage;
|
|
13
13
|
import com.facebook.soloader.SoLoader;
|
|
14
14
|
|
|
15
|
-
import expo.interfaces.devmenu.
|
|
15
|
+
import expo.interfaces.devmenu.DevMenuPreferencesInterface;
|
|
16
16
|
import expo.modules.ApplicationLifecycleDispatcher;
|
|
17
17
|
import expo.modules.ReactNativeHostWrapper;
|
|
18
18
|
import expo.modules.devlauncher.DevLauncherController;
|
|
19
|
-
import expo.modules.devmenu.
|
|
19
|
+
import expo.modules.devmenu.DevMenuDefaultPreferences;
|
|
20
20
|
import expo.modules.devmenu.DevMenuManager;
|
|
21
21
|
import expo.modules.devmenu.tests.DevMenuTestInterceptor;
|
|
22
22
|
|
|
@@ -55,8 +55,8 @@ public class MainApplication extends Application implements ReactApplication {
|
|
|
55
55
|
DevMenuManager.INSTANCE.setTestInterceptor(new DevMenuTestInterceptor() {
|
|
56
56
|
@Nullable
|
|
57
57
|
@Override
|
|
58
|
-
public
|
|
59
|
-
return new
|
|
58
|
+
public DevMenuPreferencesInterface overrideSettings() {
|
|
59
|
+
return new DevMenuDefaultPreferences() {
|
|
60
60
|
@Override
|
|
61
61
|
public boolean getShowsAtLaunch() {
|
|
62
62
|
return false;
|
package/e2e/ios/AppDelegate.m
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-dev-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Expo Development Client",
|
|
5
5
|
"main": "build/DevClient.js",
|
|
6
6
|
"types": "build/DevClient.d.ts",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"prepare": "expo-module prepare",
|
|
13
13
|
"prepublishOnly": "expo-module prepublishOnly",
|
|
14
14
|
"expo-module": "expo-module",
|
|
15
|
-
"e2e": "expo-test-runner run-test -t e2e"
|
|
15
|
+
"e2e": "expo-test-runner run-test -t e2e",
|
|
16
|
+
"latest-e2e": "expo-test-runner run-test -t latest-e2e"
|
|
16
17
|
},
|
|
17
18
|
"keywords": [
|
|
18
19
|
"react-native",
|
|
@@ -32,15 +33,15 @@
|
|
|
32
33
|
"homepage": "https://docs.expo.dev/clients/introduction/",
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"@expo/config-plugins": "^4.0.14",
|
|
35
|
-
"expo-dev-launcher": "0.
|
|
36
|
-
"expo-dev-menu": "0.
|
|
37
|
-
"expo-dev-menu-interface": "0.
|
|
38
|
-
"expo-manifests": "~0.
|
|
39
|
-
"expo-updates-interface": "~0.
|
|
36
|
+
"expo-dev-launcher": "0.11.2",
|
|
37
|
+
"expo-dev-menu": "0.10.3",
|
|
38
|
+
"expo-dev-menu-interface": "0.6.0",
|
|
39
|
+
"expo-manifests": "~0.3.0",
|
|
40
|
+
"expo-updates-interface": "~0.6.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"expo-module-scripts": "^2.0.0",
|
|
43
|
-
"expo-test-runner": "0.0.
|
|
44
|
+
"expo-test-runner": "0.0.10"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"expo": "*"
|
|
@@ -48,5 +49,5 @@
|
|
|
48
49
|
"jest": {
|
|
49
50
|
"preset": "expo-module-scripts"
|
|
50
51
|
},
|
|
51
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "21565c002f9c0abb2b844ee5d0e220d85caa041f"
|
|
52
53
|
}
|
package/src/DevClient.ts
CHANGED
package/test-runner.config.js
CHANGED
|
@@ -1,58 +1,62 @@
|
|
|
1
|
+
const baseDevClientE2E = {
|
|
2
|
+
preset: 'detox',
|
|
3
|
+
reactVersion: '17.0.1',
|
|
4
|
+
reactNativeVersion: '0.67.3',
|
|
5
|
+
detoxConfigFile: '.detoxrc.js',
|
|
6
|
+
appEntryPoint: 'e2e/app/App.tsx',
|
|
7
|
+
android: {
|
|
8
|
+
mainApplication: 'e2e/android/MainApplication.java',
|
|
9
|
+
mainActivity: 'e2e/android/MainActivity.java',
|
|
10
|
+
detoxTestFile: 'e2e/android/DetoxTest.java',
|
|
11
|
+
},
|
|
12
|
+
ios: {
|
|
13
|
+
appDelegate: 'e2e/ios/AppDelegate.m',
|
|
14
|
+
},
|
|
15
|
+
dependencies: [
|
|
16
|
+
{
|
|
17
|
+
name: 'expo',
|
|
18
|
+
path: '../expo',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'expo-modules-core',
|
|
22
|
+
path: '../expo-modules-core',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'expo-modules-autolinking',
|
|
26
|
+
path: '../expo-modules-autolinking',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'expo-dev-client',
|
|
30
|
+
path: '../expo-dev-client',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'expo-dev-launcher',
|
|
34
|
+
path: '../expo-dev-launcher',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'expo-dev-menu',
|
|
38
|
+
path: '../expo-dev-menu',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'expo-dev-menu-interface',
|
|
42
|
+
path: '../expo-dev-menu-interface',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'expo-manifests',
|
|
46
|
+
path: '../expo-manifests',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'expo-updates-interface',
|
|
50
|
+
path: '../expo-updates-interface',
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
additionalFiles: ['e2e'],
|
|
54
|
+
};
|
|
55
|
+
|
|
1
56
|
module.exports = {
|
|
2
57
|
applications: {
|
|
3
58
|
'dev-client-e2e': {
|
|
4
|
-
|
|
5
|
-
reactVersion: '17.0.1',
|
|
6
|
-
reactNativeVersion: '0.64.2',
|
|
7
|
-
detoxConfigFile: '.detoxrc.json',
|
|
8
|
-
appEntryPoint: 'e2e/app/App.tsx',
|
|
9
|
-
android: {
|
|
10
|
-
mainApplication: 'e2e/android/MainApplication.java',
|
|
11
|
-
mainActivity: 'e2e/android/MainActivity.java',
|
|
12
|
-
detoxTestFile: 'e2e/android/DetoxTest.java',
|
|
13
|
-
},
|
|
14
|
-
ios: {
|
|
15
|
-
appDelegate: 'e2e/ios/AppDelegate.m',
|
|
16
|
-
},
|
|
17
|
-
dependencies: [
|
|
18
|
-
{
|
|
19
|
-
name: 'expo',
|
|
20
|
-
path: '../expo',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'expo-modules-core',
|
|
24
|
-
path: '../expo-modules-core',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'expo-modules-autolinking',
|
|
28
|
-
path: '../expo-modules-autolinking',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'expo-dev-client',
|
|
32
|
-
path: '../expo-dev-client',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'expo-dev-launcher',
|
|
36
|
-
path: '../expo-dev-launcher',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: 'expo-dev-menu',
|
|
40
|
-
path: '../expo-dev-menu',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'expo-dev-menu-interface',
|
|
44
|
-
path: '../expo-dev-menu-interface',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: 'expo-manifests',
|
|
48
|
-
path: '../expo-manifests',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'expo-updates-interface',
|
|
52
|
-
path: '../expo-updates-interface',
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
additionalFiles: ['e2e'],
|
|
59
|
+
...baseDevClientE2E,
|
|
56
60
|
tests: {
|
|
57
61
|
e2e: {
|
|
58
62
|
shouldRunBundler: true,
|
|
@@ -60,5 +64,15 @@ module.exports = {
|
|
|
60
64
|
},
|
|
61
65
|
},
|
|
62
66
|
},
|
|
67
|
+
'dev-client-latest-e2e': {
|
|
68
|
+
...baseDevClientE2E,
|
|
69
|
+
reactNativeVersion: 'next',
|
|
70
|
+
tests: {
|
|
71
|
+
'latest-e2e': {
|
|
72
|
+
shouldRunBundler: true,
|
|
73
|
+
configurations: ['ios', 'android'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
63
77
|
},
|
|
64
78
|
};
|
package/.detoxrc.json
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"test-runner": "jest",
|
|
3
|
-
"runnerConfig": "e2e/config.json",
|
|
4
|
-
"skipLegacyWorkersInjection": true,
|
|
5
|
-
"devices": {
|
|
6
|
-
"emulator": {
|
|
7
|
-
"type": "android.emulator",
|
|
8
|
-
"device": {
|
|
9
|
-
"avdName": "DevClientEmulator"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"simulator": {
|
|
13
|
-
"type": "ios.simulator",
|
|
14
|
-
"device": {
|
|
15
|
-
"type": "iPhone 8"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"apps": {
|
|
20
|
-
"android.debug": {
|
|
21
|
-
"type": "android.apk",
|
|
22
|
-
"binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
|
|
23
|
-
"build": "cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug && cd .."
|
|
24
|
-
},
|
|
25
|
-
"ios.debug": {
|
|
26
|
-
"type": "ios.app",
|
|
27
|
-
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/dev-client-e2e.app",
|
|
28
|
-
"build": "xcodebuild -workspace ios/dev-client-e2e.xcworkspace -scheme dev-client-e2e -configuration Debug -sdk iphonesimulator -arch x86_64 -derivedDataPath ios/build"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"configurations": {
|
|
32
|
-
"android": {
|
|
33
|
-
"device": "emulator",
|
|
34
|
-
"app": "android.debug"
|
|
35
|
-
},
|
|
36
|
-
"ios": {
|
|
37
|
-
"device": "simulator",
|
|
38
|
-
"app": "ios.debug"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|