Skip to content

Commit 6b13aa5

Browse files
CodingItWrongfacebook-github-bot
authored andcommitted
Fix E2E warnings (#22621)
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
1 parent a58a059 commit 6b13aa5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

e2e/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"setupTestFrameworkScriptFile" : "./test-init.js",
2+
"setupFilesAfterEnv" : ["./test-init.js"],
33
"testEnvironment": "node",
44
"bail": true,
55
"verbose": true

js/RNTesterApp.ios.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const {
3030
Text,
3131
View,
3232
SafeAreaView,
33+
YellowBox,
3334
} = ReactNative;
3435

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

44+
YellowBox.ignoreWarnings([
45+
'ListView and SwipeableListView are deprecated',
46+
'ListView is deprecated',
47+
'Module RCTImagePickerManager requires main queue setup',
48+
]);
49+
4350
const APP_STATE_KEY = 'RNTesterAppState.v2';
4451

4552
const Header = ({onBack, title}: {onBack?: () => mixed, title: string}) => (

0 commit comments

Comments
 (0)