From e162fba41366e3fedfd27ed9a8f2689486e67b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Norte?= Date: Mon, 28 Apr 2025 06:55:25 -0700 Subject: [PATCH] Update interruptible rendering test to use feature flag to fix React<>Fabric priorities (#50959) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/50959 Changelog: [internal] This updates the test for interruptible rendering to use the feature flag that fixes priority mapping between Fabric and React. In this case, it shows how the change fixed how React Native implements the React programming model, as before this change continuous events weren't interrupting transitions (and they should): https://github.com/facebook/react/blob/c498bfce8b9baa3dd21bd0d5124eb3a4549886f1/packages/react-reconciler/src/__tests__/ReactUpdatePriority-test.js#L109 Reviewed By: sammy-SC Differential Revision: D73662527 fbshipit-source-id: 6276fe6f02b6c4e1af8dbb7d46c9a14ee6846636 --- .../ReactNative/__tests__/InterruptibleRendering-itest.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/ReactNative/__tests__/InterruptibleRendering-itest.js b/packages/react-native/Libraries/ReactNative/__tests__/InterruptibleRendering-itest.js index d7328aa56ff..55183e37066 100644 --- a/packages/react-native/Libraries/ReactNative/__tests__/InterruptibleRendering-itest.js +++ b/packages/react-native/Libraries/ReactNative/__tests__/InterruptibleRendering-itest.js @@ -7,6 +7,7 @@ * @flow strict-local * @format * @oncall react_native + * @fantom_flags fixMappingOfEventPrioritiesBetweenFabricAndReact:true */ import 'react-native/Libraries/Core/InitializeCore'; @@ -213,8 +214,8 @@ describe('continuous event category', () => { deferredText: 'first render', }); expect(effectMock.mock.calls[1][0]).toEqual({ - text: 'initial text', - deferredText: 'transition', + text: 'start: 1, end: 5', + deferredText: 'first render', }); expect(effectMock.mock.calls[2][0]).toEqual({ text: 'start: 1, end: 5',