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: facebook/react-native#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 a58a059 commit 6b13aa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 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 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

0 comments on commit 6b13aa5

Please # to comment.