ソースを参照

Upgraded RN in example app, detox changes

Jamon Holmgren 5 年 前
コミット
811f606420
共有4 個のファイルを変更した22 個の追加7 個の削除を含む
  1. 2
    2
      .github/workflows/detox-android.yml
  2. 15
    0
      examples/WebTest/e2e/testWebView.spec.js
  3. 1
    1
      examples/WebTest/package.json
  4. 4
    4
      examples/WebTest/yarn.lock

+ 2
- 2
.github/workflows/detox-android.yml ファイルの表示

@@ -17,8 +17,6 @@ jobs:
17 17
           touch ~/.android/repositories.cfg
18 18
           sdkmanager --update
19 19
       - name: Setup - Install Android Platform tools
20
-        run: yes | sdkmanager "platform-tools"
21
-      - name: Setup - Install Android 28
22 20
         run: yes | sdkmanager "platforms;android-28"
23 21
       - name: Setup - Install Android build tools 28.0.3
24 22
         run: yes | sdkmanager "build-tools;28.0.3"
@@ -27,6 +25,8 @@ jobs:
27 25
       - name: Setup - Install Android emulator library
28 26
         run: yes | sdkmanager "emulator"
29 27
       - name: Setup - Install Android emulator
28
+        run: yes | sdkmanager "platform-tools"
29
+      - name: Setup - Install Android 28
30 30
         run: avdmanager create avd -n test -k "system-images;android-28;google_apis;x86"
31 31
       - name: List Android Emulators
32 32
         run: emulator -list-avds

+ 15
- 0
examples/WebTest/e2e/testWebView.spec.js ファイルの表示

@@ -1,8 +1,23 @@
1
+import {Platform} from 'react-native';
2
+
1 3
 describe('WebView basic test', () => {
2 4
   beforeEach(async () => {
3 5
     await device.launchApp({newInstance: true});
4 6
   });
5 7
 
8
+  it('should not have a redbox visible', async () => {
9
+    const platform = Platform.select({
10
+      ios: 'RCTRedBoxWindow',
11
+      android: undefined, // TODO -- need to figure out what RedBox is on Android
12
+    });
13
+    if (platform) {
14
+      expect(element(by.type(platform))).toNotExist();
15
+    }
16
+
17
+    // so there's at least one assertion
18
+    expect(true).toBe(true);
19
+  });
20
+
6 21
   it('should have a webview', async () => {
7 22
     await expect(element(by.id('test_webview'))).toBeVisible();
8 23
   });

+ 1
- 1
examples/WebTest/package.json ファイルの表示

@@ -11,7 +11,7 @@
11 11
   },
12 12
   "dependencies": {
13 13
     "react": "16.9.0",
14
-    "react-native": "0.61.0-rc.0",
14
+    "react-native": "0.61.0-rc.2",
15 15
     "react-native-webview": "^7.0.2"
16 16
   },
17 17
   "devDependencies": {

+ 4
- 4
examples/WebTest/yarn.lock ファイルの表示

@@ -4841,10 +4841,10 @@ react-native-webview@^7.0.2:
4841 4841
     escape-string-regexp "1.0.5"
4842 4842
     invariant "2.2.4"
4843 4843
 
4844
-react-native@0.61.0-rc.0:
4845
-  version "0.61.0-rc.0"
4846
-  resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.61.0-rc.0.tgz#5f376fefee982c463eee52d691a8bdb7a37650c2"
4847
-  integrity sha512-Q7iSVoj2jylbXTdrjBKlEb6YLyVUFTIS7yIUjnKZgzpBj8NDYVCBPuqqRyypmRH/mV4a+lQ1xyhyGaj2LCeptg==
4844
+react-native@0.61.0-rc.2:
4845
+  version "0.61.0-rc.2"
4846
+  resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.61.0-rc.2.tgz#2d60369c2b0cb01e877c10e61f1799513ade5972"
4847
+  integrity sha512-W3IVFkFLjBHfEPqKzrCk755GwGyxpJGxmIXxvB8BdpW9Hx9w51z75+LXHX+6+Dn75TdekjU8spHW8dcJDZxTHg==
4848 4848
   dependencies:
4849 4849
     "@babel/runtime" "^7.0.0"
4850 4850
     "@react-native-community/cli" "^3.0.0-alpha.1"