Browse Source

fixed e2e and silence warnings

Daniel Zlotin 7 years ago
parent
commit
bb7daf7f49

+ 2
- 6
playground/e2e/app.test.js View File

@@ -8,12 +8,12 @@ describe('app', () => {
8 8
   });
9 9
 
10 10
   it('switch to tab based app', () => {
11
-    elementById('btnSwitchToTabs').tap();
11
+    elementByLabel('Switch to tab based app').tap();
12 12
     expect(elementByLabel('This is a tab screen')).toBeVisible();
13 13
   });
14 14
 
15 15
   xit('switch to tabs with side menus', () => {
16
-    elementById('btnSwitchToTabsWithMenus').tap();
16
+    elementByLabel('Switch to tab based app with side menus').tap();
17 17
     expect(elementByLabel('This is a tab screen')).toBeVisible();
18 18
   });
19 19
 });
@@ -21,7 +21,3 @@ describe('app', () => {
21 21
 function elementByLabel(label) {
22 22
   return element(by.label(label));
23 23
 }
24
-
25
-function elementById(id) {
26
-  return element(by.id(id));
27
-}

+ 4
- 1
playground/scripts/ignoreReactWarnings.rb View File

@@ -9,6 +9,9 @@ require 'xcodeproj'
9 9
 
10 10
 project = Xcodeproj::Project.open(__dir__ + "/../node_modules/react-native/React/React.xcodeproj")
11 11
 
12
-project.build_configuration_list['Release'].build_settings['WARNING_CFLAGS'] = ['-Wno-shorten-64-to-32','-Wno-unused-parameter','-Wno-unreachable-code','-Wno-deprecated-declarations','-Wno-extra-tokens','-Wno-unused-variable','-Wno-incompatible-pointer-types','-Wno-conditional-uninitialized','-Wno-undeclared-selector','-Wno-objc-protocol-property-synthesis']
12
+warning_flags = ['-Wno-shorten-64-to-32','-Wno-unused-parameter','-Wno-unreachable-code','-Wno-deprecated-declarations','-Wno-extra-tokens','-Wno-unused-variable','-Wno-incompatible-pointer-types','-Wno-conditional-uninitialized','-Wno-undeclared-selector','-Wno-objc-protocol-property-synthesis']
13
+
14
+project.build_configuration_list['Debug'].build_settings['WARNING_CFLAGS'] = warning_flags
15
+project.build_configuration_list['Release'].build_settings['WARNING_CFLAGS'] = warning_flags
13 16
 
14 17
 raise "Error: Unable to save Xcode project" unless project.save()

+ 0
- 2
playground/src/containers/WelcomeScreen.js View File

@@ -13,12 +13,10 @@ class WelcomeScreen extends Component {
13 13
       <View style={styles.root}>
14 14
         <Text style={styles.h1}>{`React Native Navigation!`}</Text>
15 15
         <Button
16
-          testId="btnSwitchToTabs"
17 16
           title="Switch to tab based app"
18 17
           onPress={this.onClickSwitchToTabs}
19 18
         />
20 19
         <Button
21
-          testId="btnSwitchToTabsWithMenus"
22 20
           title="Switch to tab based app with side menus"
23 21
           onPress={this.onClickSwitchToTabsWithSideMenus}
24 22
         />