mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix Fabric SSTs, so they actually run in Fabric instead of Paper, convert ServerSnapshotTestsAppImpl to functional component
Summary: Update instrumentation test infra for Fabric tests. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D19961919 fbshipit-source-id: 17264b6308712dddece730effd57832817e148cf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fb89730e66
commit
5c4425a456
@@ -75,6 +75,8 @@ public class ReactAppTestActivity extends FragmentActivity
|
||||
rootView.addView(mScreenshotingFrameLayout);
|
||||
|
||||
mReactRootView = new ReactRootView(this);
|
||||
|
||||
// This is useful for standalone instrumentation tests, but not SSTs
|
||||
Intent intent = getIntent();
|
||||
if (intent != null && intent.getBooleanExtra(EXTRA_IS_FABRIC_TEST, false)) {
|
||||
mReactRootView.setIsFabric(true);
|
||||
@@ -165,6 +167,11 @@ public class ReactAppTestActivity extends FragmentActivity
|
||||
}
|
||||
|
||||
public void renderComponent(final String appKey, final @Nullable Bundle initialProps) {
|
||||
// This is used by SSTs
|
||||
boolean fabricEnabled =
|
||||
(initialProps != null ? initialProps.getBoolean(EXTRA_IS_FABRIC_TEST, false) : false);
|
||||
mReactRootView.setIsFabric(fabricEnabled);
|
||||
|
||||
final CountDownLatch currentLayoutEvent = mLayoutEvent = new CountDownLatch(1);
|
||||
runOnUiThread(
|
||||
new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user