Skip to content

Commit

Permalink
Fix E2E warnings (#22621)
Browse files Browse the repository at this point in the history
Summary:
Fixes two types of warnings that occur when running E2E tests:

1. A deprecation warning from Jest: 'Option "setupTestFrameworkScriptFile" was replaced by configuration "setupFilesAfterEnv", which supports multiple paths.'
2. YellowBox warnings when running the app in debug mode, about components that are deprecated and that require main queue setup.

By fixing these warnings, we increase contributors' confidence that things are working correctly, and draw attention to any warnings that they _should_ pay attention to, if and when they arise.

I feel confident that we should hide the deprecated-component warnings; we _want_ to use these components because we want them to be tested, until they're removed entirely.

For the warning "Module RCTImagePickerManager requires main queue setup", if that's something that can be fixed with reasonable effort in the RNTester code then I think it would be better to do so. Otherwise, I think it is good to hide the warning, because this is a condition we expect: it's not something a contributor should pay attention to.
Pull Request resolved: #22621

Differential Revision: D13468553

Pulled By: hramos

fbshipit-source-id: 1a5952087dd6fcc9ba08ff7a60ad9f5b075bef57
  • Loading branch information
CodingItWrong authored and facebook-github-bot committed Dec 14, 2018
1 parent 0eeb94e commit ac30f64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RNTester/e2e/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"setupTestFrameworkScriptFile" : "./test-init.js",
"setupFilesAfterEnv" : ["./test-init.js"],
"testEnvironment": "node",
"bail": true,
"verbose": true
Expand Down
7 changes: 7 additions & 0 deletions RNTester/js/RNTesterApp.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const {
Text,
View,
SafeAreaView,
YellowBox,
} = ReactNative;

import type {RNTesterExample} from './RNTesterList.ios';
Expand All @@ -40,6 +41,12 @@ type Props = {
exampleFromAppetizeParams: string,
};

YellowBox.ignoreWarnings([
'ListView and SwipeableListView are deprecated',
'ListView is deprecated',
'Module RCTImagePickerManager requires main queue setup',
]);

const APP_STATE_KEY = 'RNTesterAppState.v2';

const Header = ({onBack, title}: {onBack?: () => mixed, title: string}) => (
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"test-android-unit": "yarn run docker-build-android && yarn run test-android-run-unit",
"test-android-e2e": "yarn run docker-build-android && yarn run test-android-run-e2e",
"build-ios-e2e": "detox build -c ios.sim.release",
"test-ios-e2e": "detox test -c ios.sim.release --cleanup"
"test-ios-e2e": "detox test -c ios.sim.release"
},
"peerDependencies": {
"react": "16.6.3"
Expand Down

0 comments on commit ac30f64

Please sign in to comment.