Browse Source

fixed e2e and silence warnings

Daniel Zlotin 8 years ago
parent
commit
bb7daf7f49

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

8
   });
8
   });
9
 
9
 
10
   it('switch to tab based app', () => {
10
   it('switch to tab based app', () => {
11
-    elementById('btnSwitchToTabs').tap();
11
+    elementByLabel('Switch to tab based app').tap();
12
     expect(elementByLabel('This is a tab screen')).toBeVisible();
12
     expect(elementByLabel('This is a tab screen')).toBeVisible();
13
   });
13
   });
14
 
14
 
15
   xit('switch to tabs with side menus', () => {
15
   xit('switch to tabs with side menus', () => {
16
-    elementById('btnSwitchToTabsWithMenus').tap();
16
+    elementByLabel('Switch to tab based app with side menus').tap();
17
     expect(elementByLabel('This is a tab screen')).toBeVisible();
17
     expect(elementByLabel('This is a tab screen')).toBeVisible();
18
   });
18
   });
19
 });
19
 });
21
 function elementByLabel(label) {
21
 function elementByLabel(label) {
22
   return element(by.label(label));
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
 
9
 
10
 project = Xcodeproj::Project.open(__dir__ + "/../node_modules/react-native/React/React.xcodeproj")
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
 raise "Error: Unable to save Xcode project" unless project.save()
17
 raise "Error: Unable to save Xcode project" unless project.save()

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

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